From ben at 666.com Tue Dec 6 08:38:55 2005 From: ben at 666.com (Ben Wing) Date: Tue, 06 Dec 2005 01:38:55 -0600 Subject: [Python-mode] evil underscore as word Message-ID: <4395400F.4040806@666.com> btw is anyone maintaining python-mode? despite the following comment: ;; For historical reasons, underscore is word class instead of ;; symbol class. GNU conventions say it should be symbol class, but ;; there's a natural conflict between what major mode authors want ;; and what users expect from `forward-word' and `backward-word'. ;; Guido and I have hashed this out and have decided to keep ;; underscore in word class. If you're tempted to change it, try ;; binding M-f and M-b to py-forward-into-nomenclature and ;; py-backward-into-nomenclature instead. This doesn't help in all ;; situations where you'd want the different behavior ;; (e.g. backward-kill-word). (modify-syntax-entry ?\_ "w" py-mode-syntax-table) imho it is *not* acceptable to have a random deviation like this. python is no different from c, perl, etc. in its treatment of underscores and should absolutely not have such a gratuitous incompatibility. there's a reason why backward-word and backword-sexp don't do the same thing; if you want to move by entire identifier, use the latter. with _ as symbol, you have a choice; with _ as word, there's no way to [e.g.] delete a single word of an identifier like `word_with_final_syllable'. ben From stephen at xemacs.org Tue Dec 6 09:50:03 2005 From: stephen at xemacs.org (Stephen J. Turnbull) Date: Tue, 06 Dec 2005 17:50:03 +0900 Subject: [Python-mode] evil underscore as word In-Reply-To: <4395400F.4040806@666.com> (Ben Wing's message of "Tue, 06 Dec 2005 01:38:55 -0600") References: <4395400F.4040806@666.com> Message-ID: <87psoaobic.fsf@tleepslib.sk.tsukuba.ac.jp> >>>>> "Ben" == Ben Wing writes: Ben> btw is anyone maintaining python-mode? Yes. despite the following comment: ;; For historical reasons, underscore is word class instead of ;; symbol class. GNU conventions say it should be symbol class, but ;; there's a natural conflict between what major mode authors want ;; and what users expect from `forward-word' and `backward-word'. ;; Guido and I have hashed this out and have decided to keep ;; underscore in word class. If you're tempted to change it, try ;; binding M-f and M-b to py-forward-into-nomenclature and ;; py-backward-into-nomenclature instead. This doesn't help in all ;; situations where you'd want the different behavior ;; (e.g. backward-kill-word). (modify-syntax-entry ?\_ "w" py-mode-syntax-table) imho it is *not* acceptable to have a random deviation like this. python is no different from c, perl, etc. in its treatment of underscores and should absolutely not have such a gratuitous incompatibility. there's a reason why backward-word and backword-sexp don't do the same thing; if you want to move by entire identifier, use the latter. with _ as symbol, you have a choice; with _ as word, there's no way to [e.g.] delete a single word of an identifier like `word_with_final_syllable'. ben -- School of Systems and Information Engineering http://turnbull.sk.tsukuba.ac.jp University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN Ask not how you can "do" free software business; ask what your business can "do for" free software. From stephen at xemacs.org Tue Dec 6 10:00:49 2005 From: stephen at xemacs.org (Stephen J. Turnbull) Date: Tue, 06 Dec 2005 18:00:49 +0900 Subject: [Python-mode] evil underscore as word In-Reply-To: <4395400F.4040806@666.com> (Ben Wing's message of "Tue, 06 Dec 2005 01:38:55 -0600") References: <4395400F.4040806@666.com> Message-ID: <87oe3uob0e.fsf@tleepslib.sk.tsukuba.ac.jp> Sorry about the premature send. >>>>> "Ben" == Ben Wing writes: Ben> btw is anyone maintaining python-mode? Yes. Skip Montanaro , as it says in MAINTAINERS. Ben> despite the following comment: [...] Ben> imho it is *not* acceptable to have a random deviation like Ben> this. Point taken. However, imho it's not our place to decide what's "acceptable" for externally maintained packages. I would like to revisit this issue with the author and/or maintainer, but please, let's respect the external maintainer's opinion. -- School of Systems and Information Engineering http://turnbull.sk.tsukuba.ac.jp University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN Ask not how you can "do" free software business; ask what your business can "do for" free software. From barry at python.org Tue Dec 6 16:49:40 2005 From: barry at python.org (Barry Warsaw) Date: Tue, 06 Dec 2005 10:49:40 -0500 Subject: [Python-mode] evil underscore as word In-Reply-To: <87oe3uob0e.fsf@tleepslib.sk.tsukuba.ac.jp> References: <4395400F.4040806@666.com> <87oe3uob0e.fsf@tleepslib.sk.tsukuba.ac.jp> Message-ID: <1133884180.15748.33.camel@geddy.wooz.org> On Tue, 2005-12-06 at 18:00 +0900, Stephen J. Turnbull wrote: > Sorry about the premature send. > > >>>>> "Ben" == Ben Wing writes: > > Ben> btw is anyone maintaining python-mode? > > Yes. Skip Montanaro , as it says in MAINTAINERS. Others on the python-mode at python.org list also help, as time allows. > Ben> despite the following comment: > [...] > Ben> imho it is *not* acceptable to have a random deviation like > Ben> this. > > Point taken. However, imho it's not our place to decide what's > "acceptable" for externally maintained packages. > > I would like to revisit this issue with the author and/or maintainer, > but please, let's respect the external maintainer's opinion. It's been a /long/ time since these issues were hashed out, but I'll try to give some history as best I can recall. There was a lot of debate about this many years ago, and Guido had very strong opinions about how he wanted it to work. I think that some of that was based on the way python-mode historically worked back when it was originally written, in, oh 1992 or thereabouts. If you look back in the cvs log, you'll see rev 2.32 1995/10/18 where I changed underscore to symbol class, and then 2.49 1996/07/03 where I reverted it back to word class "even though I don't agree with it". ISTR getting beat up pretty badly about it by users until it was changed back. We probably have had no complaints about the current behavior since then (until now, of course :), so I submit that python-mode users are pretty happy generally about the current behavior. IIRC there was some debate about the treatment of underscore w.r.t. user-facing commands vs. internal functions. It was brought up that internal parsing functions might want to treat underscore one way, while users might want to treat it a different way. AFAIK, there is still no 'good' way of handling this. I have a phantom memory that changing the class of underscore is going to break some parsing or font-locking. IMO, you can't change the current behavior without doing severe damage to the muscle memory of existing python-mode users. If you can provide a variable that switches underscore's class, while maintaining backward compatibility with the way it currently works /and/ make sure that nothing breaks, then I think that might be acceptable. -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/20051206/3626ac39/attachment.pgp From skip at pobox.com Tue Dec 6 18:01:35 2005 From: skip at pobox.com (skip@pobox.com) Date: Tue, 6 Dec 2005 11:01:35 -0600 Subject: [Python-mode] evil underscore as word In-Reply-To: <87psoaobic.fsf@tleepslib.sk.tsukuba.ac.jp> References: <4395400F.4040806@666.com> <87psoaobic.fsf@tleepslib.sk.tsukuba.ac.jp> Message-ID: <17301.50159.605495.909619@montanaro.dyndns.org> Ben> btw is anyone maintaining python-mode? Stephen> Yes. I am officially the maintainer, though I have dropped the ball fairly badly. I asked the other day about the magic necessary to do a new release, but haven't done that yet. Ben> (modify-syntax-entry ?\_ "w" py-mode-syntax-table) Ben> imho it is *not* acceptable to have a random deviation like Ben> this. I've never really liked it, but it happened before I got involved with python-mode maintenance, so I never changed it. Regarding Barry's comments about muscle memory, my muscles must be pretty damn stubborn. Even though I program almost exclusively in Python via XEmacs these days (not even much C or Emacs Lisp), I still find myself at the start of a compound identifier like "really_lon_ident" and think to myself, "Ah.. M-f g, that's the ticket", only to wind up at the end of "really_lon_identg". I believe it was Guido who lobbied Barry pretty hard to make it so. Since Barry probably worked for Guido at the time, I can understand his acquiescence. ;-) Skip From barry at python.org Tue Dec 6 18:36:58 2005 From: barry at python.org (Barry Warsaw) Date: Tue, 06 Dec 2005 12:36:58 -0500 Subject: [Python-mode] evil underscore as word In-Reply-To: <17301.50159.605495.909619@montanaro.dyndns.org> References: <4395400F.4040806@666.com> <87psoaobic.fsf@tleepslib.sk.tsukuba.ac.jp> <17301.50159.605495.909619@montanaro.dyndns.org> Message-ID: <1133890619.15747.46.camel@geddy.wooz.org> On Tue, 2005-12-06 at 11:01 -0600, skip at pobox.com wrote: > "Ah.. M-f g, that's the > ticket", only to wind up at the end of "really_lon_identg". From my python-mode-hook: (define-key py-mode-map [(meta f)] 'py-forward-into-nomenclature) (define-key py-mode-map [(meta b)] 'py-backward-into-nomenclature)) ;) > I believe it was Guido who lobbied Barry pretty hard to make it so. Since > Barry probably worked for Guido at the time, I can understand his > acquiescence. ;-) Plus, he's bigger than me. :) -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/20051206/10dd9222/attachment.pgp From skip at pobox.com Tue Dec 6 19:34:32 2005 From: skip at pobox.com (skip@pobox.com) Date: Tue, 6 Dec 2005 12:34:32 -0600 Subject: [Python-mode] evil underscore as word In-Reply-To: <1133890619.15747.46.camel@geddy.wooz.org> References: <4395400F.4040806@666.com> <87psoaobic.fsf@tleepslib.sk.tsukuba.ac.jp> <17301.50159.605495.909619@montanaro.dyndns.org> <1133890619.15747.46.camel@geddy.wooz.org> Message-ID: <17301.55736.799767.506500@montanaro.dyndns.org> Barry> From my python-mode-hook: Barry> (define-key py-mode-map [(meta f)] 'py-forward-into-nomenclature) Barry> (define-key py-mode-map [(meta b)] 'py-backward-into-nomenclature)) So maybe we can solve this in python-mode.el. Leave the syntax category for "_" alone and add (yet another) flag that rebinds M-f and M-b accordingly. Skip From barry at python.org Tue Dec 6 19:39:08 2005 From: barry at python.org (Barry Warsaw) Date: Tue, 06 Dec 2005 13:39:08 -0500 Subject: [Python-mode] evil underscore as word In-Reply-To: <17301.55736.799767.506500@montanaro.dyndns.org> References: <4395400F.4040806@666.com> <87psoaobic.fsf@tleepslib.sk.tsukuba.ac.jp> <17301.50159.605495.909619@montanaro.dyndns.org> <1133890619.15747.46.camel@geddy.wooz.org> <17301.55736.799767.506500@montanaro.dyndns.org> Message-ID: <1133894348.15748.52.camel@geddy.wooz.org> On Tue, 2005-12-06 at 12:34 -0600, skip at pobox.com wrote: > Barry> From my python-mode-hook: > > Barry> (define-key py-mode-map [(meta f)] 'py-forward-into-nomenclature) > Barry> (define-key py-mode-map [(meta b)] 'py-backward-into-nomenclature)) > > So maybe we can solve this in python-mode.el. Leave the syntax category for > "_" alone and add (yet another) flag that rebinds M-f and M-b accordingly. Yah, that'd be fine. -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/20051206/a6dc7959/attachment.pgp From noreply at sourceforge.net Wed Dec 7 18:39:26 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 07 Dec 2005 09:39:26 -0800 Subject: [Python-mode] [ python-mode-Bugs-1215039 ] eat 100% CPU when "Force full reparse" Message-ID: Bugs item #1215039, was opened at 2005-06-04 20:16 Message generated for change (Comment added) made by stormcoder You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=581349&aid=1215039&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: Shixin Zeng (pupilzeng) Assigned to: Skip Montanaro (montanaro) Summary: eat 100% CPU when "Force full reparse" Initial Comment: it seems to come into a infinite loop, and I can't do anything but Ctrl+C to end emacs and all my datas were lost. It ocurred every time I type M-/ for code completion. my emacs is 23.0.0.1, checkout from the branch unicode-2 on April, 2, 2005 ---------------------------------------------------------------------- Comment By: Mike (stormcoder) Date: 2005-12-07 09:39 Message: Logged In: YES user_id=446468 This occurs for me when there is a block (function, for, if, etc) that doesn't have a blank new line after it. As soon as the file is loaded, the CPU pegs and emacs freezes. ---------------------------------------------------------------------- Comment By: Todd DeLuca (todddeluca) Date: 2005-07-30 10:03 Message: Logged In: YES user_id=1321242 Ok, I've created a simple reproducible example. The following code consistently freezes if the last character in the file is '1'. If there is a newline following the '1', then everything is fine. if 1 < 2: # die here x = 1 It also freezes under the same condition if you replace the if statement with a for i in range(10): loop. The following file does NOT freeze even if the '1' is the last character in the file: x = 1 So perhaps it has something to do with the indentation. Everything seems to hinge on there being no characters following the last line of code. I tried putting spaces on the end of the 'x = 1' line and it still froze with a 'Force full reparse' message. Sometimes the 'Force full reparse' message is not displayed when it freezes, but I think that detail is insignificant. I hope these code snippets are helpful in debugging the problem. Thank y'all for producing and maintaining python-mode. Its coloring and indenting features have been very helpful to me, and I get the feeling I'm just scratching the surface. Cheers, Todd ---------------------------------------------------------------------- Comment By: Todd DeLuca (todddeluca) Date: 2005-07-30 09:29 Message: Logged In: YES user_id=1321242 I am having the same problem. It started happening around the time my box was upgraded to the new Debian stable release, Sarge. I am using version 4.75 of python-mode. The problem manifests seemingly randomly for me. It seems to happen more with short python files. I can not think of a long or old (pre-upgrade to sarge) python file where I've had this problem. I am not using M-/ (code completion). The problem may manifest when I hit return to go to a new line or when I hit backspace to unindent out of a block that I've just ended. I am using gnu emacs version 21.4.1 I am forced to kill from a different terminal to close my emacs, since I run it in the foreground of a terminal. Any suggestions for how to fix this problem would be greatly appreciated. It makes it nearly impossible to use python-mode when at any time emacs can freeze and loose all of my work (since my last save.) I'm sorry I have not been able to reproduce the problem consistently yet. If that is helpful I will attempt to do so. Best regards, Todd DeLuca P.S. some diagnostic info (a repeat of what was mentioned above): $ emacs --version GNU Emacs 21.4.1 from top command: 3440 td23 14 0 19336 18m 2900 R 99.9 0.5 16:05.32 emacs python-mode version (from C-c C-v): version $Revision: 4.75 $ ---------------------------------------------------------------------- Comment By: Shixin Zeng (pupilzeng) Date: 2005-06-09 04:39 Message: Logged In: YES user_id=1143754 M-: py-version RET "$Revision 4.63 $" I downloaded it from http://sourceforge.net/projects/python-mode, whose version was tagged as 1.0alpha Where can I get the version 4.75? I've tried write codes as you said: a.foo = 12 a. M-/ repeatly First: "py" Seconed: Force full parse and the problem occurred. ---------------------------------------------------------------------- Comment By: Skip Montanaro (montanaro) Date: 2005-06-09 04:04 Message: Logged In: YES user_id=44345 Hmmm... It's been years and years since Python-mode 1.0alpha was released, so I suspect you're looking in the wrong place for the version. We are currently at 4.75. You can get the current python-mode version by typing M-: py-version RET When I hit M-/ at the place you indicated, it completes with "c12". I have no idea why it chooses that completion, but it doesn't hang. It's not obvious to me what it should expand in this context. Did you have something in mind? If I change the code to ... a = A('abc') a.foo = 12 a. when I hit M-/ it properly expands to "a.foo" for me. Please try upgrading your python-mode. ---------------------------------------------------------------------- Comment By: Shixin Zeng (pupilzeng) Date: 2005-06-09 03:33 Message: Logged In: YES user_id=1143754 When I'm editing C source files in cc-mode, the problem doesn't occur ---------------------------------------------------------------------- Comment By: Shixin Zeng (pupilzeng) Date: 2005-06-09 02:44 Message: Logged In: YES user_id=1143754 OK, here's an example: #!/usr/bin/python class A: def __init__(self, name): self.name = name if __name__ == '__main__': a = A('abc') a.<------------- M-/ here, the bug can be reproduced the python-mode is 1.0alpha ---------------------------------------------------------------------- Comment By: Skip Montanaro (montanaro) Date: 2005-06-06 20:19 Message: Logged In: YES user_id=44345 Can you provide an example Python file where this happens? Given that M-/ runs dabbrev-expand, I'm skeptical this has anything to do with python-mode. ---------------------------------------------------------------------- Comment By: Skip Montanaro (montanaro) Date: 2005-06-05 04:10 Message: Logged In: YES user_id=44345 What version of python-mode.el are you using? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=581349&aid=1215039&group_id=86916 From ben at 666.com Thu Dec 8 07:37:14 2005 From: ben at 666.com (Ben Wing) Date: Thu, 08 Dec 2005 00:37:14 -0600 Subject: [Python-mode] evil underscore as word In-Reply-To: <1133894348.15748.52.camel@geddy.wooz.org> References: <4395400F.4040806@666.com> <87psoaobic.fsf@tleepslib.sk.tsukuba.ac.jp> <17301.50159.605495.909619@montanaro.dyndns.org> <1133890619.15747.46.camel@geddy.wooz.org> <17301.55736.799767.506500@montanaro.dyndns.org> <1133894348.15748.52.camel@geddy.wooz.org> Message-ID: <4397D49A.5070909@666.com> Barry Warsaw wrote: >On Tue, 2005-12-06 at 12:34 -0600, skip at pobox.com wrote: > > >> Barry> From my python-mode-hook: >> >> Barry> (define-key py-mode-map [(meta f)] 'py-forward-into-nomenclature) >> Barry> (define-key py-mode-map [(meta b)] 'py-backward-into-nomenclature)) >> >>So maybe we can solve this in python-mode.el. Leave the syntax category for >>"_" alone and add (yet another) flag that rebinds M-f and M-b accordingly. >> >> > >Yah, that'd be fine. >-Barry > > > this wouldn't work for me; it's M-backspace that's driving me crazy. btw i imagine it wouldn't be too hard to find the places that might depend on this syntax category; they would primarily be regexps involving \\S, \\s, \\<, \\>, or \\b, and a few others like forward/backward-word. From noreply at sourceforge.net Thu Dec 15 10:56:18 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 15 Dec 2005 01:56:18 -0800 Subject: [Python-mode] [ python-mode-Bugs-1215039 ] eat 100% CPU when "Force full reparse" Message-ID: Bugs item #1215039, was opened at 2005-06-05 05:16 Message generated for change (Comment added) made by thimo You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=581349&aid=1215039&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: Shixin Zeng (pupilzeng) Assigned to: Skip Montanaro (montanaro) Summary: eat 100% CPU when "Force full reparse" Initial Comment: it seems to come into a infinite loop, and I can't do anything but Ctrl+C to end emacs and all my datas were lost. It ocurred every time I type M-/ for code completion. my emacs is 23.0.0.1, checkout from the branch unicode-2 on April, 2, 2005 ---------------------------------------------------------------------- Comment By: Thimo Neubauer (thimo) Date: 2005-12-15 10:56 Message: Logged In: YES user_id=19572 As this bug bit me many times in the last days I've checked with a friend if he experiences the same: in his emacs (also Debian stable) there are no freezes. As he has no "semantic" installed but I do I'd guess that it is the culprit. BTW: the fixes in the patch mentioned on http://www.emacswiki.org/cgi-bin/wiki/PythonMode did not cure this bug. For reference: I'm using Emacs 21.4.1, python-mode 4.75, semantic 1.0beta3b ---------------------------------------------------------------------- Comment By: Mike (stormcoder) Date: 2005-12-07 18:39 Message: Logged In: YES user_id=446468 This occurs for me when there is a block (function, for, if, etc) that doesn't have a blank new line after it. As soon as the file is loaded, the CPU pegs and emacs freezes. ---------------------------------------------------------------------- Comment By: Todd DeLuca (todddeluca) Date: 2005-07-30 19:03 Message: Logged In: YES user_id=1321242 Ok, I've created a simple reproducible example. The following code consistently freezes if the last character in the file is '1'. If there is a newline following the '1', then everything is fine. if 1 < 2: # die here x = 1 It also freezes under the same condition if you replace the if statement with a for i in range(10): loop. The following file does NOT freeze even if the '1' is the last character in the file: x = 1 So perhaps it has something to do with the indentation. Everything seems to hinge on there being no characters following the last line of code. I tried putting spaces on the end of the 'x = 1' line and it still froze with a 'Force full reparse' message. Sometimes the 'Force full reparse' message is not displayed when it freezes, but I think that detail is insignificant. I hope these code snippets are helpful in debugging the problem. Thank y'all for producing and maintaining python-mode. Its coloring and indenting features have been very helpful to me, and I get the feeling I'm just scratching the surface. Cheers, Todd ---------------------------------------------------------------------- Comment By: Todd DeLuca (todddeluca) Date: 2005-07-30 18:29 Message: Logged In: YES user_id=1321242 I am having the same problem. It started happening around the time my box was upgraded to the new Debian stable release, Sarge. I am using version 4.75 of python-mode. The problem manifests seemingly randomly for me. It seems to happen more with short python files. I can not think of a long or old (pre-upgrade to sarge) python file where I've had this problem. I am not using M-/ (code completion). The problem may manifest when I hit return to go to a new line or when I hit backspace to unindent out of a block that I've just ended. I am using gnu emacs version 21.4.1 I am forced to kill from a different terminal to close my emacs, since I run it in the foreground of a terminal. Any suggestions for how to fix this problem would be greatly appreciated. It makes it nearly impossible to use python-mode when at any time emacs can freeze and loose all of my work (since my last save.) I'm sorry I have not been able to reproduce the problem consistently yet. If that is helpful I will attempt to do so. Best regards, Todd DeLuca P.S. some diagnostic info (a repeat of what was mentioned above): $ emacs --version GNU Emacs 21.4.1 from top command: 3440 td23 14 0 19336 18m 2900 R 99.9 0.5 16:05.32 emacs python-mode version (from C-c C-v): version $Revision: 4.75 $ ---------------------------------------------------------------------- Comment By: Shixin Zeng (pupilzeng) Date: 2005-06-09 13:39 Message: Logged In: YES user_id=1143754 M-: py-version RET "$Revision 4.63 $" I downloaded it from http://sourceforge.net/projects/python-mode, whose version was tagged as 1.0alpha Where can I get the version 4.75? I've tried write codes as you said: a.foo = 12 a. M-/ repeatly First: "py" Seconed: Force full parse and the problem occurred. ---------------------------------------------------------------------- Comment By: Skip Montanaro (montanaro) Date: 2005-06-09 13:04 Message: Logged In: YES user_id=44345 Hmmm... It's been years and years since Python-mode 1.0alpha was released, so I suspect you're looking in the wrong place for the version. We are currently at 4.75. You can get the current python-mode version by typing M-: py-version RET When I hit M-/ at the place you indicated, it completes with "c12". I have no idea why it chooses that completion, but it doesn't hang. It's not obvious to me what it should expand in this context. Did you have something in mind? If I change the code to ... a = A('abc') a.foo = 12 a. when I hit M-/ it properly expands to "a.foo" for me. Please try upgrading your python-mode. ---------------------------------------------------------------------- Comment By: Shixin Zeng (pupilzeng) Date: 2005-06-09 12:33 Message: Logged In: YES user_id=1143754 When I'm editing C source files in cc-mode, the problem doesn't occur ---------------------------------------------------------------------- Comment By: Shixin Zeng (pupilzeng) Date: 2005-06-09 11:44 Message: Logged In: YES user_id=1143754 OK, here's an example: #!/usr/bin/python class A: def __init__(self, name): self.name = name if __name__ == '__main__': a = A('abc') a.<------------- M-/ here, the bug can be reproduced the python-mode is 1.0alpha ---------------------------------------------------------------------- Comment By: Skip Montanaro (montanaro) Date: 2005-06-07 05:19 Message: Logged In: YES user_id=44345 Can you provide an example Python file where this happens? Given that M-/ runs dabbrev-expand, I'm skeptical this has anything to do with python-mode. ---------------------------------------------------------------------- Comment By: Skip Montanaro (montanaro) Date: 2005-06-05 13:10 Message: Logged In: YES user_id=44345 What version of python-mode.el are you using? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=581349&aid=1215039&group_id=86916 From christoph.conrad at gmx.de Wed Dec 14 15:24:33 2005 From: christoph.conrad at gmx.de (Christoph Conrad) Date: Wed, 14 Dec 2005 15:24:33 +0100 Subject: [Python-mode] Part 2: Problem with python-mode.el 4.75 Message-ID: Hello, the same with asynchronous execution: ;; -cco- (start-process py-which-bufname buf shell arg file) (start-process py-which-bufname buf (format "%s" shell) arg file) Best wishes, Christoph From christoph.conrad at gmx.de Wed Dec 14 14:43:51 2005 From: christoph.conrad at gmx.de (Christoph Conrad) Date: Wed, 14 Dec 2005 14:43:51 +0100 Subject: [Python-mode] Problem with python-mode.el 4.75 Message-ID: Hello, i encountered a problem with v4.75 and CVS Gnu Emacs. I had to patch the function `py-execute-region' to make it work: ;;-cco-(let ((cmd (concat py-which-shell (if (string-equal py-which-bufname (let ((cmd (concat (format "%s" shell) (if (string-equal py-which-bufname "Jython") " -" "")))) Explicitely: py-which-shell => (format "%s" shell) Best wishes, Christoph From todd.moyer at citigroup.com Thu Dec 22 21:57:31 2005 From: todd.moyer at citigroup.com (Moyer, Todd) Date: Thu, 22 Dec 2005 15:57:31 -0500 Subject: [Python-mode] trouble with python-mode on Win 2000 Message-ID: <5C0833CC6DEAA04B81A023201FE2544A01670C01@EXNJMB68.nam.nsroot.net> I'm trying to use python-mode in XEmacs version 21.4.18. However, when I try to compile it or load it I get: File error (("Searching for program" "No such file or directory" "xargs")) I'm on Windows Server 2000 (ver 5.0, SP 4). I've tried python-mode 4.52 and 4.75. Any help would be greatly appreciated. Cheers, Todd Moyer From skip at pobox.com Fri Dec 23 05:31:45 2005 From: skip at pobox.com (skip@pobox.com) Date: Thu, 22 Dec 2005 22:31:45 -0600 Subject: [Python-mode] trouble with python-mode on Win 2000 In-Reply-To: <5C0833CC6DEAA04B81A023201FE2544A01670C01@EXNJMB68.nam.nsroot.net> References: <5C0833CC6DEAA04B81A023201FE2544A01670C01@EXNJMB68.nam.nsroot.net> Message-ID: <17323.32177.517811.692263@montanaro.dyndns.org> Todd> I'm trying to use python-mode in XEmacs version 21.4.18. However, Todd> when I try to compile it or load it I get: Todd> File error (("Searching for program" "No such file or directory" Todd> "xargs")) I can believe the xargs program isn't available on Windows. "xargs" isn't mentioned anywhere in the python-mode source. I imagine some other bit of the system is to blame. Can you try setting debug-on-error to t and then send the resulting backtrace to the list? -- Skip Montanaro http://www.musi-cal.com/ skip at pobox.com From todd.moyer at citigroup.com Fri Dec 30 20:04:48 2005 From: todd.moyer at citigroup.com (Moyer, Todd [IT]) Date: Fri, 30 Dec 2005 14:04:48 -0500 Subject: [Python-mode] trouble with python-mode on Win 2000 Message-ID: <5C0833CC6DEAA04B81A023201FE2544A01670C09@EXNJMB68.nam.nsroot.net> For what it's worth: The problem I was seeing in python-mode was originating in the xemacs-base/compile.el package. Something about the mods made for compile.el version 1.36 would allow it to compile, but not load. Using version 1.35 fixed my problem. I'm using Win 2000. I also have CygWin, which could be confusing the package about "xargs". However, I don't know how XEmacs could be aware of CygWin, so I'm just throwing that out as a possibility. Cheers, Todd > -----Original Message----- > From: skip at pobox.com [mailto:skip at pobox.com] > Sent: Thursday, December 22, 2005 11:32 PM > To: Moyer, Todd > Cc: python-mode at python.org > Subject: Re: [Python-mode] trouble with python-mode on Win 2000 > Importance: High > > > > Todd> I'm trying to use python-mode in XEmacs version > 21.4.18. However, > Todd> when I try to compile it or load it I get: > > Todd> File error (("Searching for program" "No such file > or directory" > Todd> "xargs")) > > I can believe the xargs program isn't available on Windows. > "xargs" isn't > mentioned anywhere in the python-mode source. I imagine some > other bit of > the system is to blame. > > Can you try setting debug-on-error to t and then send the resulting > backtrace to the list? > > -- > Skip Montanaro > http://www.musi-cal.com/ > skip at pobox.com >