From crowell at MIT.EDU Sat Feb 4 02:55:04 2006 From: crowell at MIT.EDU (Robert Crowell) Date: Fri, 3 Feb 2006 20:55:04 -0500 Subject: [Python-mode] Site is broken Message-ID: <20060203205504.y3j3ww0w47b40k0c@webmail.mit.edu> The links "Customize" and "Related Packages" on the sourceforge site are broken. Anywhere I can turn to for customization info until it's back up? (Looking for syntax hilighting.) Thanks! -Rob Crowell From skip at pobox.com Sat Feb 4 05:00:40 2006 From: skip at pobox.com (skip at pobox.com) Date: Fri, 3 Feb 2006 22:00:40 -0600 Subject: [Python-mode] Site is broken In-Reply-To: <20060203205504.y3j3ww0w47b40k0c@webmail.mit.edu> References: <20060203205504.y3j3ww0w47b40k0c@webmail.mit.edu> Message-ID: <17380.9960.11166.36696@montanaro.dyndns.org> Rob> The links "Customize" and "Related Packages" on the sourceforge Rob> site are broken. I can't tell where you are looking. Can you provide a URL? Rob> Anywhere I can turn to for customization info until it's back up? Rob> (Looking for syntax hilighting.) Syntax highlighting of Python within GNU Emacs or XEmacs? Try here: http://sourceforge.net/project/showfiles.php?group_id=86916 -- Skip Montanaro http://www.musi-cal.com/ skip at pobox.com From skip at pobox.com Sat Feb 4 13:28:22 2006 From: skip at pobox.com (skip at pobox.com) Date: Sat, 4 Feb 2006 06:28:22 -0600 Subject: [Python-mode] Site is broken In-Reply-To: <20060204031146.st472yk4dnk0sksg@webmail.mit.edu> References: <20060203205504.y3j3ww0w47b40k0c@webmail.mit.edu> <17380.9960.11166.36696@montanaro.dyndns.org> <20060204031146.st472yk4dnk0sksg@webmail.mit.edu> Message-ID: <17380.40422.903205.816653@montanaro.dyndns.org> Rob> Thanks for the reply, sorry I was non-specific. I was looking at Rob> the sourceforge home page, URI: Rob> http://python-mode.sourceforge.net/docs/index.html Rob> The specific resources which could not be located (404) are Rob> http://python-mode.sourceforge.net/docs/customize.html and Rob> http://python-mode.sourceforge.net/docs/related.html. Ah, I see. I started working on some documentation quite awhile ago but never got very far. You hit the various endpoints. I should have at least made stubs for those pages. My apologies. I've at least corrected that particular deficiency now. Anybody out there want to take on the task? Skip From noreply at sourceforge.net Wed Feb 8 17:03:15 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 08 Feb 2006 08:03:15 -0800 Subject: [Python-mode] [ python-mode-Bugs-1427650 ] async bug with py-execute-region Message-ID: Bugs item #1427650, was opened at 2006-02-08 11:03 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=581349&aid=1427650&group_id=86916 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: David Goodger (goodger) Assigned to: Nobody/Anonymous (nobody) Summary: async bug with py-execute-region Initial Comment: python-mode.el revision 4.78, GNU Emacs 21.3.1 (i386-mingw-nt5.1.2600) of 2004-03-10 (NTEmacs), Cygwin. When executing py-execute-region with the optional async parameter set, I get the following bug: let*: Wrong type argument: stringp, cpython I traced the problem to line 1749: (start-process py-which-bufname buf shell arg file) The "shell" variable evaluates to a symbol, 'cpython, but start-process is expecting a string. Hard-coding the string "python" fixes the immediate problem for me. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=581349&aid=1427650&group_id=86916 From noreply at sourceforge.net Thu Feb 23 10:52:38 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 23 Feb 2006 01:52:38 -0800 Subject: [Python-mode] [ python-mode-Patches-1437306 ] Patch for pydb debuggercompatibility Message-ID: Patches item #1437306, was opened at 2006-02-23 04:52 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=581351&aid=1437306&group_id=86916 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Rocky Bernstein (rockyb) Assigned to: Nobody/Anonymous (nobody) Summary: Patch for pydb debuggercompatibility Initial Comment: Recently I've been extending the pdb and merging it with pydb which is suitable for use by ddd. Here are the small changes I made to python-mode.el's pdbtracker to allow it to work with either pdb or pydb. (I realize it is a failing of mine not to appreciate the superiority of pdb's location-reporting format and this coupled with my rather small brain which needs to sometimes parse locations reported in the bash, GNU make and perl debuggers caused me such confusion that I found it expedient when debugging ddd regular expressions to just to stick with the regexps I used in a couple of those other debuggers.) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=581351&aid=1437306&group_id=86916 From noreply at sourceforge.net Thu Feb 23 10:54:59 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 23 Feb 2006 01:54:59 -0800 Subject: [Python-mode] [ python-mode-Patches-1437306 ] Patch for pydb debuggercompatibility Message-ID: Patches item #1437306, was opened at 2006-02-23 04:52 Message generated for change (Comment added) made by rockyb You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=581351&aid=1437306&group_id=86916 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Rocky Bernstein (rockyb) Assigned to: Nobody/Anonymous (nobody) Summary: Patch for pydb debuggercompatibility Initial Comment: Recently I've been extending the pdb and merging it with pydb which is suitable for use by ddd. Here are the small changes I made to python-mode.el's pdbtracker to allow it to work with either pdb or pydb. (I realize it is a failing of mine not to appreciate the superiority of pdb's location-reporting format and this coupled with my rather small brain which needs to sometimes parse locations reported in the bash, GNU make and perl debuggers caused me such confusion that I found it expedient when debugging ddd regular expressions to just to stick with the regexps I used in a couple of those other debuggers.) ---------------------------------------------------------------------- >Comment By: Rocky Bernstein (rockyb) Date: 2006-02-23 04:54 Message: Logged In: YES user_id=158581 Probably should also mention that the pydb project homepage is http://bashdb.sourceforge.net/pydb/ ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=581351&aid=1437306&group_id=86916 From noreply at sourceforge.net Sun Feb 26 17:18:57 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Sun, 26 Feb 2006 08:18:57 -0800 Subject: [Python-mode] [ python-mode-Bugs-1180180 ] Proposed improvement for pycomplete Message-ID: Bugs item #1180180, was opened at 2005-04-10 20:33 Message generated for change (Comment added) made by liujin You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=581349&aid=1180180&group_id=86916 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Hugo Haas (hugoh) Assigned to: Nobody/Anonymous (nobody) Summary: Proposed improvement for pycomplete Initial Comment: Hi. I really like the idea of pycomplete a lot. However, it only completes simple cases: "sys.cl" becomes "sys.clock" once completed. What would be interesting would be to get a list of completions for "sys.". I believe that what needs to be changed is the following: - have pycomplete.py return a list of all possibilities - in py-complete() in pycomplete.el, use the output of pycomplete.py to call try-completion; if it works, use it, if not and there are several possibilities, display all the possibilities given by all-completions and allow to chose between them. The former is trivial (patch attached). I tried to do the latter, but my lack of knowledge in elisp put a rapid stop to it, so in case somebody knows elisp and is interested by this (I think it would be a cool feature), I thought I'd record the idea here. Regards, Hugo ---------------------------------------------------------------------- Comment By: Liu Jin (liujin) Date: 2006-02-27 00:18 Message: Logged In: YES user_id=1462104 Unable to see errebepe's patch, but here's my attempt following IPython's implemention. It's like other completions in Emacs: - No completion: ring bell and display in echo area "Can't find completion for 'foo'" - Sole completion: complete - Multiple completion: open a window with mouse-clickable entries [pycomplete.py] --- pycomplete.py.old Wed Jan 11 21:07:19 2006 +++ pycomplete.py Sun Feb 26 23:49:19 2006 @@ -74,12 +74,21 @@ def pycomplete(s, imports=None): completions = get_all_completions(s, imports) + if len(completions) == 0: + return None + dots = s.split(".") - return os.path.commonprefix([k[len(dots[-1]):] for k in completions]) + prefix = os.path.commonprefix([k for k in completions]) + if len(completions)==1 or len(prefix)>len(dots[-1]): + return [prefix[len(dots[-1]):]] + + return completions [pycomplete.el] --- pycomplete.el.old Sat Dec 3 00:30:11 2005 +++ pycomplete.el Sun Feb 26 23:51:16 2006 @@ -10,9 +10,21 @@ (defun py-complete () (interactive) - (let ((pymacs-forget-mutability t)) - (insert (pycomplete-pycomplete (py-symbol-near-point) - (py-find-global- imports))))) + (let* ((pymacs-forget-mutability t) + (symbol (py-symbol-near-point)) + (completions + (pycomplete-pycomplete symbol + (py-find-global- imports)))) + (cond ((null completions) ; no matching symbol + (message "Can't find completion for \"%s\"" symbol) + (ding)) + ((null (cdr completions)) ; sole completion + (insert (car completions))) + (t + (message "Making completion list...") + (with-output-to-temp-buffer "*Python Completions*" + (display-completion-list completions)) + (message "Making completion list...% s" "done"))))) (defun py-find-global-imports () (save-excursion ---------------------------------------------------------------------- Comment By: Rodrigo Bernardo Pimentel (errebepe) Date: 2005-06-28 11:26 Message: Logged In: YES user_id=374783 Ahn... Sorry, false alarm. I was still using my code completion code and hadn't realized it. No wonder it was so similar ;) Haven't had much luck using Semantic yet, though I still think it's the best approach. ---------------------------------------------------------------------- Comment By: Rodrigo Bernardo Pimentel (errebepe) Date: 2005-06-28 05:44 Message: Logged In: YES user_id=374783 I just managed to use Semantic with ECB (http://ecb.sourceforge.net/). Installed both, fired up ECB (M-x ecb-activate). From then on, on a source file, I type M-Tab and it completes (using the same "interface" my patch provides, which I found cool, BTW). I've spotted what is apparently a bug (when importing a module from a file I created on the current directory), but otherwise it seems to work! ---------------------------------------------------------------------- Comment By: Rodrigo Bernardo Pimentel (errebepe) Date: 2005-06-28 04:13 Message: Logged In: YES user_id=374783 I used minibuffer because it seems to be the way Emacs usually handles these things. It's also a close analogy with the way Eclipse does it. Anyway, I've been thinking about code-completion for a while, and it seems the best way to do it would be to parse the code and act according to context. Apparently, the Semantic package (http://cedet.sourceforge.net/semantic.shtml) does this. Now, if I can get it to work... ---------------------------------------------------------------------- Comment By: Hugo Haas (hugoh) Date: 2005-06-27 06:37 Message: Logged In: YES user_id=331657 It seems to do exactly what I was after! Except maybe for the completion prompt, as maybe it could just give a list of possibilities in a separate buffer without requiring the use of the mini-buffer, but that's a detail. Thanks a lot. ---------------------------------------------------------------------- Comment By: Rodrigo Bernardo Pimentel (errebepe) Date: 2005-05-27 08:52 Message: Logged In: YES user_id=374783 I've implemented these suggestions and put the resulting files at http://isnomore.net/prog/pycomplete/ . Please take a look and let me know what you (all) think. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=581349&aid=1180180&group_id=86916