From andreas.roehler at online.de Sat Oct 5 17:35:17 2013 From: andreas.roehler at online.de (=?ISO-8859-15?Q?Andreas_R=F6hler?=) Date: Sat, 05 Oct 2013 17:35:17 +0200 Subject: [Python-mode] heuristic exit Message-ID: <525031B5.6000607@online.de> Hi Barry, hi all, lp:1235375 revealed a thing, which might happen in other circumstances also. Bug occurred when which-func-mode was on and a string-delimiter missing. In this case also indexing would fail. There might be more circumstances like that, it's not just about a missing string-fence, python-mode specific movements expect correct syntax. In order to avoid movement-related routines go crazy, introduced a `py-max-specpdl-size', default is `max-specpdl-size', py-end-of-statement will error if number of `py-max-specpdl-size' loops is completed, thus avoiding a hang from a possibly eternal loop. FYI, Andreas From andreas.roehler at online.de Thu Oct 17 21:13:56 2013 From: andreas.roehler at online.de (=?ISO-8859-15?Q?Andreas_R=F6hler?=) Date: Thu, 17 Oct 2013 21:13:56 +0200 Subject: [Python-mode] different set of colors for pairs Message-ID: <526036F4.8080501@online.de> Hi Barry, hi all, the OP says: "I want a different set of colors for the following pairs: import and from def and class try and if. " http://stackoverflow.com/questions/19374294/how-to-differentiate-between-colors-for-the-keywords-import-def-and-try-in/19374605#19374605 which would should be possible to implement as an option. In case, this should be the new default --or any other comments--, please tell. Andreas From barry at python.org Thu Oct 17 21:15:01 2013 From: barry at python.org (Barry Warsaw) Date: Thu, 17 Oct 2013 15:15:01 -0400 Subject: [Python-mode] different set of colors for pairs In-Reply-To: <526036F4.8080501@online.de> References: <526036F4.8080501@online.de> Message-ID: <20131017151501.15e75d47@anarchist> On Oct 17, 2013, at 09:13 PM, Andreas R?hler wrote: >Hi Barry, hi all, > >the OP says: > >"I want a different set of colors for the following pairs: > > import and from > def and class > try and if. >" > >http://stackoverflow.com/questions/19374294/how-to-differentiate-between-colors-for-the-keywords-import-def-and-try-in/19374605#19374605 > >which would should be possible to implement as an option. > >In case, this should be the new default --or any other comments--, please >tell. Seems weird to me, but maybe I just don't like fruit salad enough. -Barry From georg at python.org Thu Oct 17 22:44:32 2013 From: georg at python.org (Georg Brandl) Date: Thu, 17 Oct 2013 22:44:32 +0200 Subject: [Python-mode] different set of colors for pairs In-Reply-To: <526036F4.8080501@online.de> References: <526036F4.8080501@online.de> Message-ID: <52604C30.30206@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 17.10.2013 21:13, schrieb Andreas R?hler: > Hi Barry, hi all, > > the OP says: > > "I want a different set of colors for the following pairs: > > import and from def and class try and if. " > > http://stackoverflow.com/questions/19374294/how-to-differentiate-between-colors-for-the-keywords-import-def-and-try-in/19374605#19374605 > > which would should be possible to implement as an option. > > In case, this should be the new default --or any other comments--, please > tell. Just one comment: Why? Not every wish on stackoverflow needs to be implemented. Python has few enough keywords; if people really want Tokyo-style highlighting they can add things to font-lock-keywords themselves. Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iEYEARECAAYFAlJgTDAACgkQN9GcIYhpnLAhOgCgjMDv96SphHJwD/h5T4OOLE7A h3sAn13hUDgtiugzWvI1KblD7LGfsFOJ =YS7a -----END PGP SIGNATURE----- From andreas.roehler at online.de Fri Oct 18 10:21:16 2013 From: andreas.roehler at online.de (=?ISO-8859-1?Q?Andreas_R=F6hler?=) Date: Fri, 18 Oct 2013 10:21:16 +0200 Subject: [Python-mode] different set of colors for pairs In-Reply-To: <52604C30.30206@python.org> References: <526036F4.8080501@online.de> <52604C30.30206@python.org> Message-ID: <5260EF7C.1030709@online.de> Hi Georg, hi Barry, Am 17.10.2013 22:44, schrieb Georg Brandl: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Am 17.10.2013 21:13, schrieb Andreas R?hler: >> Hi Barry, hi all, >> >> the OP says: >> >> "I want a different set of colors for the following pairs: >> >> import and from def and class try and if. " >> >> http://stackoverflow.com/questions/19374294/how-to-differentiate-between-colors-for-the-keywords-import-def-and-try-in/19374605#19374605 >> >> which would should be possible to implement as an option. >> >> In case, this should be the new default --or any other comments--, please >> tell. > > Just one comment: Why? > > Not every wish on stackoverflow needs to be implemented. Agreed. > > Python has few enough keywords; if people really want Tokyo-style highlighting > they can add things to font-lock-keywords themselves. > IMO python-mode may provide what experienced developers need and beginners expect likewise - given the feature wanted will not go into the way of the real thing. In this case it wouldn't, as the default would inherit the key-word face. If we want to have more users and maybe developers, we must meet the wishes of beginners too - even if experience tells these wishes are not that justified to the extend. BTW there are also experienced programmers preferring what you called Tokyo-style - while I'm with you in the precise question. Adding things to font-lock-keywords themselves, that possibility is certainly at the core of Emacs. Demonstrating the relative easiness of extending at SO should encourage further action by the OP. Okay, thanks responding, Hmm, Barry, did you veto it? If you want to veto, please signal again, otherwise just begging your pardon, Cheers, Andreas From barry at python.org Fri Oct 18 15:49:33 2013 From: barry at python.org (Barry Warsaw) Date: Fri, 18 Oct 2013 09:49:33 -0400 Subject: [Python-mode] different set of colors for pairs In-Reply-To: <5260EF7C.1030709@online.de> References: <526036F4.8080501@online.de> <52604C30.30206@python.org> <5260EF7C.1030709@online.de> Message-ID: <20131018094933.29ef3409@anarchist> On Oct 18, 2013, at 10:21 AM, Andreas R?hler wrote: >IMO python-mode may provide what experienced developers need and beginners >expect likewise - given the feature wanted will not go into the way of the >real thing. > >In this case it wouldn't, as the default would inherit the key-word face. > >If we want to have more users and maybe developers, we must meet the wishes >of beginners too - even if experience tells these wishes are not that >justified to the extend. > >BTW there are also experienced programmers preferring what you called >Tokyo-style - while I'm with you in the precise question. > >Adding things to font-lock-keywords themselves, that possibility is certainly >at the core of Emacs. Demonstrating the relative easiness of extending at SO >should encourage further action by the OP. You have to be careful though. More features means more complexity, in the code (which introduces bugs just purely through LoC increase), in the documentation, and in users' comprehension. It's not a pure win to add configurability and at some point it just gets too difficult to understand how all the different options interact with each other. It's okay to say no, and it's okay to be opinionated! This is after all, Lisp, and it's often just as easy for someone to hack their own .emacs files. I do think there's a lot of benefit in providing a lean, mean editing mode. >Okay, thanks responding, > >Hmm, Barry, did you veto it? > >If you want to veto, please signal again, I don't feel like I have the right to veto python-mode decisions any more. For a long while you've done very nearly all of the work on the mode, so IMHO, that gives you the right and responsibility to make these types of decisions. I'm just a user these days. (But certainly still opinionated. ;) However, I would vote -1 on this particular feature. Cheers, -Barry -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: not available URL: From andreas.roehler at online.de Fri Oct 18 18:38:06 2013 From: andreas.roehler at online.de (=?UTF-8?B?QW5kcmVhcyBSw7ZobGVy?=) Date: Fri, 18 Oct 2013 18:38:06 +0200 Subject: [Python-mode] different set of colors for pairs In-Reply-To: <20131018094933.29ef3409@anarchist> References: <526036F4.8080501@online.de> <52604C30.30206@python.org> <5260EF7C.1030709@online.de> <20131018094933.29ef3409@anarchist> Message-ID: <526163EE.5060506@online.de> Am 18.10.2013 15:49, schrieb Barry Warsaw: > On Oct 18, 2013, at 10:21 AM, Andreas R?hler wrote: > >> IMO python-mode may provide what experienced developers need and beginners >> expect likewise - given the feature wanted will not go into the way of the >> real thing. >> >> In this case it wouldn't, as the default would inherit the key-word face. >> >> If we want to have more users and maybe developers, we must meet the wishes >> of beginners too - even if experience tells these wishes are not that >> justified to the extend. >> >> BTW there are also experienced programmers preferring what you called >> Tokyo-style - while I'm with you in the precise question. >> >> Adding things to font-lock-keywords themselves, that possibility is certainly >> at the core of Emacs. Demonstrating the relative easiness of extending at SO >> should encourage further action by the OP. > > You have to be careful though. More features means more complexity, in the > code (which introduces bugs just purely through LoC increase), in the > documentation, and in users' comprehension. It's not a pure win to add > configurability and at some point it just gets too difficult to understand how > all the different options interact with each other. > > It's okay to say no, and it's okay to be opinionated! This is after all, > Lisp, and it's often just as easy for someone to hack their own .emacs files. > I do think there's a lot of benefit in providing a lean, mean editing mode. > Agreed. Obviously we can't have everything. This is a lot the Emacs way. Must confess had in mind to change the path towards an (rather complete) IDE. >> Okay, thanks responding, >> >> Hmm, Barry, did you veto it? >> >> If you want to veto, please signal again, > > I don't feel like I have the right to veto python-mode decisions any more. No, no :) This mode is a teamwork by a lot of people, always appreciated your guidance. > For a long while you've done very nearly all of the work on the mode, so IMHO, > that gives you the right and responsibility to make these types of decisions. > I'm just a user these days. (But certainly still opinionated. ;) > > However, I would vote -1 on this particular feature. > > Cheers, > -Barry > Okay, will keep that kind of stuff inside of components-branch, so people interested in might merge it. Cheers, Andreas From barry at python.org Fri Oct 18 18:55:34 2013 From: barry at python.org (Barry Warsaw) Date: Fri, 18 Oct 2013 12:55:34 -0400 Subject: [Python-mode] different set of colors for pairs In-Reply-To: <526163EE.5060506@online.de> References: <526036F4.8080501@online.de> <52604C30.30206@python.org> <5260EF7C.1030709@online.de> <20131018094933.29ef3409@anarchist> <526163EE.5060506@online.de> Message-ID: <20131018125534.36641d23@anarchist> On Oct 18, 2013, at 06:38 PM, Andreas R?hler wrote: >Agreed. Obviously we can't have everything. This is a lot the Emacs way. >Must confess had in mind to change the path towards an (rather complete) IDE. This kind of a path may be useful for people, and interesting to work on. One way to think about structuring that though is to keep python-mode narrowly focused on providing excellent editing of Python code, with the more sophisticated bells and whistles for optional add-ons and companion modules. Cheers, -Barry -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: not available URL: From andreas.roehler at online.de Sat Oct 19 09:20:11 2013 From: andreas.roehler at online.de (=?UTF-8?B?QW5kcmVhcyBSw7ZobGVy?=) Date: Sat, 19 Oct 2013 09:20:11 +0200 Subject: [Python-mode] different set of colors for pairs In-Reply-To: <20131018125534.36641d23@anarchist> References: <526036F4.8080501@online.de> <52604C30.30206@python.org> <5260EF7C.1030709@online.de> <20131018094933.29ef3409@anarchist> <526163EE.5060506@online.de> <20131018125534.36641d23@anarchist> Message-ID: <526232AB.6010709@online.de> Am 18.10.2013 18:55, schrieb Barry Warsaw: > On Oct 18, 2013, at 06:38 PM, Andreas R?hler wrote: > >> Agreed. Obviously we can't have everything. This is a lot the Emacs way. >> Must confess had in mind to change the path towards an (rather complete) IDE. > > This kind of a path may be useful for people, and interesting to work on. One > way to think about structuring that though is to keep python-mode narrowly > focused on providing excellent editing of Python code, with the more > sophisticated bells and whistles for optional add-ons and companion modules. > > Cheers, > -Barry > Code base might be shrink considerably if some versioned shell-commands are thrown out: for example all with python3.3 python3.4 in their name. Maybe keep python2.7? Cheers From andreas.roehler at online.de Sat Oct 19 18:11:00 2013 From: andreas.roehler at online.de (=?ISO-8859-15?Q?Andreas_R=F6hler?=) Date: Sat, 19 Oct 2013 18:11:00 +0200 Subject: [Python-mode] py-keep-window-configuration-p Message-ID: <5262AF14.8090107@online.de> Hi all, while fixing https://bugs.launchpad.net/python-mode/+bug/1239498 it turns out relying on py-split-... resp. py-switch-... vars setting isn't sufficient. Will introduce the var in subject. Remaining question: What to do if an error occurs? Display error resp. exception buffer anyway ignoring this new var? Cheers, Andreas From andreas.roehler at online.de Sat Oct 19 18:44:47 2013 From: andreas.roehler at online.de (=?ISO-8859-1?Q?Andreas_R=F6hler?=) Date: Sat, 19 Oct 2013 18:44:47 +0200 Subject: [Python-mode] py-keep-window-configuration-p In-Reply-To: <5262AF14.8090107@online.de> References: <5262AF14.8090107@online.de> Message-ID: <5262B6FF.6020500@online.de> Am 19.10.2013 18:11, schrieb Andreas R?hler: > Hi all, > > while fixing > > https://bugs.launchpad.net/python-mode/+bug/1239498 > > it turns out relying on py-split-... resp. py-switch-... vars setting isn't sufficient. > > Will introduce the var in subject. > > Remaining question: What to do if an error occurs? > Display error resp. exception buffer anyway ignoring this new var? > > Cheers, > > Andreas Solution: not a boolean, but three values: nil, t, force where force restores window-config also in error From andreas.roehler at online.de Mon Oct 28 15:36:03 2013 From: andreas.roehler at online.de (=?ISO-8859-15?Q?Andreas_R=F6hler?=) Date: Mon, 28 Oct 2013 15:36:03 +0100 Subject: [Python-mode] Simpler way to put PDB breakpoints Message-ID: <526E7653.7040502@online.de> Hi all, any suggestions how to deal with this from python-mode.el? http://stackoverflow.com/questions/6980749/simpler-way-to-put-pdb-breakpoints-in-python-code/19634104#19634104 BTW there is pydb still but not heavily in use here currently. Cheers, Andreas