From noreply at sourceforge.net Tue Jan 17 22:03:33 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 17 Jan 2006 13:03:33 -0800 Subject: [Python-mode] [ python-mode-Bugs-1408496 ] py-execute-region fails if py-python-command has a space Message-ID: Bugs item #1408496, was opened at 2006-01-17 21: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=1408496&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: Pete Forman (pete_forman) Assigned to: Nobody/Anonymous (nobody) Summary: py-execute-region fails if py-python-command has a space Initial Comment: My py-python-command is set to c:\Program Files\Python24\python.exe If I call py-execute-region I get an error buffer saying that c:\Program is not found. If I start an an interpreter using py-shell first then all is well. The custom variable py-python-command does double duty to both launch the interpreter and process a region. (This is via the py-which-shell intermediate.) If I surround the command with double quotes, then py- execute-region works but py-shell does not as it adds an extra set of quotes. My suggested patch supplies the extra quoting needed by py-execute-region. I'm using python-mode 1.0, XEmacs 21.5.17 native, XP Home SP2, Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on win32. *** c:\Program Files\XEmacs\site-packages\lisp\python- mode-1.0\python-mode.el.orig Fri Dec 2 16:30:11 2005 --- c:\Program Files\XEmacs\site-packages\lisp\python- mode-1.0\python-mode.el Tue Jan 17 20:38:28 2006 *************** *** 1756,1764 **** (setq py-exception-buffer (cons file (current- buffer)))) (t ;; TBD: a horrible hack, but why create new Custom variables? ! (let ((cmd (concat py-which-shell (if (string- equal py-which-bufname ! "Jython") ! " -" "")))) ;; otherwise either run it synchronously in a subprocess (save-excursion (set-buffer buf) --- 1756,1764 ---- (setq py-exception-buffer (cons file (current- buffer)))) (t ;; TBD: a horrible hack, but why create new Custom variables? ! (let ((cmd (concat (shell-quote-argument py- which-shell) ! (if (string-equal py-which- bufname "Jython") ! " -" "")))) ;; otherwise either run it synchronously in a subprocess (save-excursion (set-buffer buf) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=581349&aid=1408496&group_id=86916 From barry at python.org Mon Jan 23 00:05:54 2006 From: barry at python.org (Barry Warsaw) Date: Sun, 22 Jan 2006 18:05:54 -0500 Subject: [Python-mode] py-XXX-tag-face Message-ID: <1137971154.18472.6.camel@geddy.wooz.org> In python-mode.el 4.77, I added a new face, called py-XXX-tag-face. This will let you highlight the comment tags XXX, TODO, and FIXME. A friend of mine who was a VIM user suggested I add this. -Barry -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 307 bytes Desc: This is a digitally signed message part Url : http://mail.python.org/pipermail/python-mode/attachments/20060122/37eafa2d/attachment.pgp From noreply at sourceforge.net Tue Jan 31 18:19:43 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 31 Jan 2006 09:19:43 -0800 Subject: [Python-mode] [ python-mode-Bugs-912521 ] python-mode kills arrow in gdb (gud.el) Message-ID: Bugs item #912521, was opened at 2004-03-09 07:34 Message generated for change (Comment added) made by schlotter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=581349&aid=912521&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: Matthias Klose (doko) Assigned to: Nobody/Anonymous (nobody) Summary: python-mode kills arrow in gdb (gud.el) Initial Comment: [this is http://python.org/sf/606250, reopened] forwarded from http://bugs.debian.org/159628 ] Once python-mode.el has been loaded, all GDB buffers stop showing the little arrow that lives in the "fringe" on the left side of an emacs21 frame. To be specific, the arrow appears and then disappears right away, each time a 'step' or 'next' command is run. I traced the problem down to the unconditional hooking of 'comint-output-filter-functions, python-mode.el line 3472 to be exact: (add-hook 'comint-output-filter-functions 'py-pdbtrack-track-stack-file) I haven't tested it fully, but I've found that if I take this line out, GDB can show its arrow once more. There is code in python-mode.el to insert this hook in a buffer-local fashion only in the '*Python*' buffer.. maybe that should be reviewed and used instead of this global hook? (took forever to figure out it was python-mode causing the problem..) Followup: This one is still broken for me, in python-mode 4.40. (I'm the submitter of the original debian bug report). Here are some instructions to reproduce the problem: =============== 574:warner at cinla% cat hello.c #include int main(void) { printf("hello\n"); printf("world\n"); printf("\n"); return 0; } 575:warner at cinla% gcc -g -o hello hello.c 576:warner at cinla% ./hello hello world 577:warner at cinla% cat foo.py #! /usr/bin/python print "hiya" 578:warner at cinla% emacs -q M-x gdb hello RET # starts GUD session (gdb) b main RET (gdb) run RET # GDB stops on "hello". Note arrow in fringe. C-x C-f foo.py RET # loads python-mode.el C-x b *gud-hello* RET # switch back to GDB buffer (gdb) next RET # GDB stops on "world". Note lack of arrow. (gdb) next RET # arrow flickers and disappears each time =================== emacs-version reports "GNU Emacs 21.3.1 (i386-pc-linux-gnu, X toolkit) of 2003-10-31 on raven, modified by Debian" this is package emacs21, version 21.3+1-4 (from unstable) python-elisp is version 2.3.2.91-1, with py-version at $Revision: 4.40 $ let me know if there is anything I can do to further track it down. thanks! -Brian ---------------------------------------------------------------------- Comment By: Christian Schlotter (schlotter) Date: 2006-01-31 18:19 Message: Logged In: YES user_id=1440711 Is the patch added to the last comment the official workaround? I would like to submit a package to my favorite distribution which fixes this problem, as I find it highly annoying. Regards Christian ---------------------------------------------------------------------- Comment By: Gustav H?llberg (gustavh) Date: 2005-07-10 08:13 Message: Logged In: YES user_id=1310184 I did some testing around this about two years ago, and I then concluded that the right fix is similar to what d_kagedal suggests, but that you want the deactivation to be run iff py-pdbtrack-is-tracking-p: --- python-mode.el~ 2004-10-21 14:27:30.000000000 -0700 +++ python-mode.el 2005-07-09 23:03:43.417759376 -0700 @@ -1334,7 +1334,7 @@ (setq overlay-arrow-string "=>") (set-marker overlay-arrow-position (py-point 'bol) (current-buffer)) (setq py-pdbtrack-is-tracking-p t)) - (overlay-arrow-position + (py-pdbtrack-is-tracking-p (setq overlay-arrow-position nil) (setq py-pdbtrack-is-tracking-p nil)) )) ---------------------------------------------------------------------- Comment By: David K?gedal (d_kagedal) Date: 2005-06-29 14:30 Message: Logged In: YES user_id=1260741 I usually work around this by applying this patch: --- python-mode.el~ 2005-04-08 16:45:30.000000000 +0200 +++ python-mode.el 2005-06-21 11:53:55.000000000 +0200 @@ -1334,7 +1334,7 @@ (setq overlay-arrow-string "=>") (set-marker overlay-arrow-position (py-point 'bol) (current-buffer)) (setq py-pdbtrack-is-tracking-p t)) - (overlay-arrow-position + (nil ;; overlay-arrow-position (setq overlay-arrow-position nil) (setq py-pdbtrack-is-tracking-p nil)) )) The problem is that the comint filter function is called even when running gud, and sinc it doesn't detect a python line to show, it disables the overlay arrow. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=581349&aid=912521&group_id=86916