From andreas.roehler at online.de Mon Mar 10 12:02:27 2014 From: andreas.roehler at online.de (=?ISO-8859-15?Q?Andreas_R=F6hler?=) Date: Mon, 10 Mar 2014 12:02:27 +0100 Subject: [Python-mode] formatting triple-quoted-strings Message-ID: <531D9BC3.1060201@online.de> Hi Barry, hi all, currently formatting tqs with py-docstring-style is called, if tqs is below a class or def. OTOH tqs are also used at beginning of file or other place in sense of a info/docstring. What about to apply docstring-styles every times a tqs is formatted? Cheers, Andreas From barry at python.org Mon Mar 10 22:22:07 2014 From: barry at python.org (Barry Warsaw) Date: Mon, 10 Mar 2014 17:22:07 -0400 Subject: [Python-mode] formatting triple-quoted-strings In-Reply-To: <531D9BC3.1060201@online.de> References: <531D9BC3.1060201@online.de> Message-ID: <20140310172207.744ccf70@anarchist.wooz.org> On Mar 10, 2014, at 12:02 PM, Andreas R?hler wrote: >currently formatting tqs with py-docstring-style is called, if tqs is below a >class or def. > >OTOH tqs are also used at beginning of file or other place in sense of a >info/docstring. > >What about to apply docstring-styles every times a tqs is formatted? Yes, I think so, but only if the tqs is in an actual docstring location. E.g. the following is not a docstring: def foo(): x = """ This is not a docstring. """ Note also that both PEP 257 and PEP 8 have been modified to make it clear that PEP-257-NN is the recommended style. I'm not sure if it's the python-mode default, but it probably should be. Cheers, -Barry -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From andreas.roehler at online.de Tue Mar 11 07:21:00 2014 From: andreas.roehler at online.de (=?UTF-8?B?QW5kcmVhcyBSw7ZobGVy?=) Date: Tue, 11 Mar 2014 07:21:00 +0100 Subject: [Python-mode] formatting triple-quoted-strings In-Reply-To: <20140310172207.744ccf70@anarchist.wooz.org> References: <531D9BC3.1060201@online.de> <20140310172207.744ccf70@anarchist.wooz.org> Message-ID: <531EAB4C.9060607@online.de> Am 10.03.2014 22:22, schrieb Barry Warsaw: > On Mar 10, 2014, at 12:02 PM, Andreas R?hler wrote: > >> currently formatting tqs with py-docstring-style is called, if tqs is below a >> class or def. >> >> OTOH tqs are also used at beginning of file or other place in sense of a >> info/docstring. >> >> What about to apply docstring-styles every times a tqs is formatted? > > Yes, I think so, but only if the tqs is in an actual docstring location. > E.g. the following is not a docstring: > > def foo(): > x = """ > This is > not a > docstring. > """ > > Note also that both PEP 257 and PEP 8 have been modified to make it clear that > PEP-257-NN is the recommended style. I'm not sure if it's the python-mode > default, but it probably should be. It is. > > Cheers, > -Barry > Okay, thanks. So I'll implement it that way: treat as docstring, if beginning-of-string equals py-beginning-of-statement (?) From andreas.roehler at online.de Thu Mar 13 12:18:01 2014 From: andreas.roehler at online.de (=?ISO-8859-15?Q?Andreas_R=F6hler?=) Date: Thu, 13 Mar 2014 12:18:01 +0100 Subject: [Python-mode] execute dedicated - multiple buffers? Message-ID: <532193E9.4070500@online.de> Hi Barry, hi all, currently, when dedicated is on, a new buffer is created with some autogenerated name. Repeated dedicated calls will leave a row of badly readable buffer-names. An alternative would be to kill the default shell before and run just a new shell. No idea WRT to pros and cons. Also introducing a new switch here would be possible. Any importance at all? Any suggestions? Cheers, Andreas From andreas.roehler at online.de Thu Mar 13 13:14:27 2014 From: andreas.roehler at online.de (=?ISO-8859-1?Q?Andreas_R=F6hler?=) Date: Thu, 13 Mar 2014 13:14:27 +0100 Subject: [Python-mode] execute dedicated - multiple buffers? In-Reply-To: <532193E9.4070500@online.de> References: <532193E9.4070500@online.de> Message-ID: <5321A123.7030901@online.de> Am 13.03.2014 12:18, schrieb Andreas R?hler: > Hi Barry, hi all, > > currently, when dedicated is on, a new buffer is created with some autogenerated name. > > Repeated dedicated calls will leave a row of badly readable buffer-names. > > An alternative would be to kill the default shell before and run just a new shell. > > No idea WRT to pros and cons. > > Also introducing a new switch here would be possible. > > Any importance at all? Any suggestions? > > Cheers, > > Andreas Quickly answering myself: session mode - where state and output-buffer are kept/continued dedicated - address/create an output buffer different from default in combination: not session, not dedicated - uses old/default cleaned-up output-buffer with new process session, not dedicated - re-uses old buffer, reads state (DEFAULT) session, dedicated - continue last dedicated buffer not session, dedicated - new process in new auto-generated output-buffer From barry at python.org Thu Mar 13 14:57:29 2014 From: barry at python.org (Barry Warsaw) Date: Thu, 13 Mar 2014 09:57:29 -0400 Subject: [Python-mode] execute dedicated - multiple buffers? In-Reply-To: <532193E9.4070500@online.de> References: <532193E9.4070500@online.de> Message-ID: <20140313095729.04eff5e9@anarchist.wooz.org> On Mar 13, 2014, at 12:18 PM, Andreas R?hler wrote: >currently, when dedicated is on, a new buffer is created with some >autogenerated name. I don't really use this feature, so I don't have an opinion. Cheers, -Barry -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From andreas.roehler at online.de Thu Mar 13 16:57:51 2014 From: andreas.roehler at online.de (=?UTF-8?B?QW5kcmVhcyBSw7ZobGVy?=) Date: Thu, 13 Mar 2014 16:57:51 +0100 Subject: [Python-mode] execute dedicated - multiple buffers? In-Reply-To: <20140313095729.04eff5e9@anarchist.wooz.org> References: <532193E9.4070500@online.de> <20140313095729.04eff5e9@anarchist.wooz.org> Message-ID: <5321D57F.7060501@online.de> Am 13.03.2014 14:57, schrieb Barry Warsaw: > On Mar 13, 2014, at 12:18 PM, Andreas R?hler wrote: > >> currently, when dedicated is on, a new buffer is created with some >> autogenerated name. > > I don't really use this feature, so I don't have an opinion. > > Cheers, > -Barry > Being after lp:1253907, Slow with large output It requires a different way of processing, thus coming upon that part. Think got it here, Andreas From andreas.roehler at online.de Wed Mar 19 18:21:29 2014 From: andreas.roehler at online.de (=?ISO-8859-15?Q?Andreas_R=F6hler?=) Date: Wed, 19 Mar 2014 18:21:29 +0100 Subject: [Python-mode] WRT parenthese errors in Python edits Message-ID: <5329D219.6050308@online.de> Hi Barry, hi list, r1449, while fixing lp:1294478, introduced a new behavior WRT to missing parenthesis. `py-end-of-statement' will stop at the end of line with related open paren. When `py-verbose-p' is `t', an error-message tells the reason. All other commands dealing with whole blocks will perform normally, but also issue an error-message, if `py-verbose-p' is on. Comments welcome. Maybe py-verbose-p isn't right here, need a `py-error-p'? Cheers, Andreas From andreas.roehler at online.de Fri Mar 21 18:11:13 2014 From: andreas.roehler at online.de (=?ISO-8859-15?Q?Andreas_R=F6hler?=) Date: Fri, 21 Mar 2014 18:11:13 +0100 Subject: [Python-mode] face of print Message-ID: <532C72B1.5070402@online.de> Function "print" currently gets font-lock-keyword-face, which doesn't seem correct. IMO it should get py-builtins-face, right? Just FYI, Andreas From barry at python.org Mon Mar 24 16:11:06 2014 From: barry at python.org (Barry Warsaw) Date: Mon, 24 Mar 2014 11:11:06 -0400 Subject: [Python-mode] face of print In-Reply-To: <532C72B1.5070402@online.de> References: <532C72B1.5070402@online.de> Message-ID: <20140324111106.501436d9@anarchist.wooz.org> On Mar 21, 2014, at 06:11 PM, Andreas R?hler wrote: >Function "print" currently gets font-lock-keyword-face, which doesn't seem >correct. IMO it should get py-builtins-face, right? I guess this is dependent on whether you're editing Python 2 or Python 3 code. I always bring up python-mode in Python 3 by default (most visibly by defaulting pyflakes to Python 3) so I do see some discrepancies when editing Python 2 code. Not sure how to handle this. I'd prefer "Python 3 mode" to be the default, and thus it probably makes more sense for print to be py-builtins-face. OTOH, it's a little jarring to me to see print in that face, but I guess no more jarring than training myself to wrap its arguments in parens. I really hate to add another config variable for this. Maybe print should be in its own face, defaulting to whatever makes sense for the Python 2 or 3 version being edited? -Barry -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From andreas.roehler at online.de Thu Mar 27 12:54:04 2014 From: andreas.roehler at online.de (=?UTF-8?B?QW5kcmVhcyBSw7ZobGVy?=) Date: Thu, 27 Mar 2014 12:54:04 +0100 Subject: [Python-mode] face of print In-Reply-To: <20140324111106.501436d9@anarchist.wooz.org> References: <532C72B1.5070402@online.de> <20140324111106.501436d9@anarchist.wooz.org> Message-ID: <5334115C.8080008@online.de> Am 24.03.2014 16:11, schrieb Barry Warsaw: > On Mar 21, 2014, at 06:11 PM, Andreas R?hler wrote: > >> Function "print" currently gets font-lock-keyword-face, which doesn't seem >> correct. IMO it should get py-builtins-face, right? > > I guess this is dependent on whether you're editing Python 2 or Python 3 > code. I always bring up python-mode in Python 3 by default (most visibly by > defaulting pyflakes to Python 3) so I do see some discrepancies when editing > Python 2 code. > > Not sure how to handle this. I'd prefer "Python 3 mode" to be the default, > and thus it probably makes more sense for print to be py-builtins-face. OTOH, > it's a little jarring to me to see print in that face, but I guess no more > jarring than training myself to wrap its arguments in parens. > > I really hate to add another config variable for this. Maybe print should be > in its own face, defaulting to whatever makes sense for the Python 2 or 3 > version being edited? > > -Barry > Seems worth a ticket: https://bugs.launchpad.net/python-mode/+bug/1298328 Cheers, Andreas From andreas.roehler at online.de Fri Mar 28 09:25:23 2014 From: andreas.roehler at online.de (=?UTF-8?B?QW5kcmVhcyBSw7ZobGVy?=) Date: Fri, 28 Mar 2014 09:25:23 +0100 Subject: [Python-mode] face of print In-Reply-To: <20140324111106.501436d9@anarchist.wooz.org> References: <532C72B1.5070402@online.de> <20140324111106.501436d9@anarchist.wooz.org> Message-ID: <533531F3.8070501@online.de> Am 24.03.2014 16:11, schrieb Barry Warsaw: . Maybe print should be > in its own face, defaulting to whatever makes sense for the Python 2 or 3 > version being edited? > > -Barry > Done