Re: [Python-mode] different set of colors for pairs
-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- ___ Python-mode mailing list Python-mode@python.org https://mail.python.org/mailman/listinfo/python-mode
[Python-mode] Credits
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Andreas, while you are the most active contributor of python-mode at the moment, I don't think it was a good idea to remove all of the credits/copyright history from the file header. Also (defconst py-version This is experimental `python-components-mode' not released yet, see https://code.launchpad.net/~a-roehler/python-mode/python-mode-components;) What is going on here? Georg -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAk6+JZoACgkQN9GcIYhpnLCj8QCbBFvV9pAnYIKbCCrpmkIVEh8p x5cAoKa7RDuXoP1MxunaVbwYOuUyMzWV =NxRM -END PGP SIGNATURE- ___ Python-mode mailing list Python-mode@python.org http://mail.python.org/mailman/listinfo/python-mode
Re: [Python-mode] py-execute-buffer and CWD
Am 01.11.2011 21:53, schrieb Andreas Röhler: Am 01.11.2011 12:33, schrieb Andrea Crotti: While trying to run a script and there is already another *Python* buffer open for another directory, running the script normally fails if there are some relative file paths. Apparently the CWD in the *Python* buffer remains the old one, and thus it makes sense that Python can't resolve relative paths. I tried to add this line in py-execute-buffer but without success, any help? (cd (file-name-directory (buffer-file-name py-master-file))) cd is a shell command you can't mix that into Emacs Lisp. It's also an elisp function. (I agree that it's named a bit out-of-consistency with the usual wordy elisp function names...) Georg signature.asc Description: OpenPGP digital signature ___ Python-mode mailing list Python-mode@python.org http://mail.python.org/mailman/listinfo/python-mode
Re: [Python-mode] py-execute-buffer and CWD
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 01.11.2011 22:50, schrieb Andrea Crotti: On 11/01/2011 08:53 PM, Andreas Röhler wrote: cd is a shell command you can't mix that into Emacs Lisp. BTW ipython shell would understand cd it, but that's another item. Maybe give a example, what you trying to do, so we can look how to solve that task. BTW answered here, as you are not indicating a bug as thought at first glance. My mistake... Mm I don't think so: cd is an interactive compiled Lisp function in `files.el'. And anyway, I think is quite a bug, because if I run a python script I should expect that it runs in the same current directory... I quite agree. Georg -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAk6waeUACgkQN9GcIYhpnLB+6wCfTtoS2ygA2KWbm1IhHf2B47rj rPsAoLETDsRQs6uzebCAAt3tz3kUCWs9 =N2f6 -END PGP SIGNATURE- ___ Python-mode mailing list Python-mode@python.org http://mail.python.org/mailman/listinfo/python-mode
Re: [Python-mode] py-python-command default
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 28.09.2011 18:04, schrieb Barry Warsaw: On Sep 28, 2011, at 01:15 PM, David Miller wrote: Yes, please. :) ipython is a separate program that doesn't come with stock Python. How about conditionally setting it - this is essentially what Django does with it's shell (defcustom py-python-command (if (executable-find ipython) ipython python) I'm not entirely in favor of this. While I have ipython installed, I still want to use regular 'ol python in my Emacs. Of course, should you make this change I can always customize the variable. OTOH, I don't want to stand in the way of what's really convenient for folks. So I guess I'm -0. Georg, what do you think? I agree. IPython is nice, but its bulk is not needed for many things. This is what customize is for! Georg -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAk6Dc3MACgkQN9GcIYhpnLDtCQCgjifvBQcnLoIiJmPr/nRSqRY7 FYUAn0s1DHxZZ3Xc6+7NhvPp3AOWim0J =7hIJ -END PGP SIGNATURE- ___ Python-mode mailing list Python-mode@python.org http://mail.python.org/mailman/listinfo/python-mode
[Python-mode] Now testing latest version
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I've finally updated to the latest bzr version, and so far everything seems smooth. Some of the new customizables are really useful. One question: what does py-backslashed-continuation-indent do? When is it used, and when is py-continuation-offset used? Thanks Andreas for the work! Georg -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAk5tsCcACgkQN9GcIYhpnLBt4QCeLZluOwiud6TfaRk7JLU2Ew+E NewAnig363s4nnGiGHHXUgL0eYhWQnfw =tfNX -END PGP SIGNATURE- ___ Python-mode mailing list Python-mode@python.org http://mail.python.org/mailman/listinfo/python-mode
Re: [Python-mode] one more myrkwid bug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 16.04.2011 09:42, schrieb Andreas Röhler: Am 16.04.2011 13:01, schrieb Georg Brandl: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 15.04.2011 23:41, schrieb Andreas Röhler: Am 15.04.2011 22:24, schrieb Barry Warsaw: On Apr 15, 2011, at 10:28 PM, Andreas Röhler wrote: Am 15.04.2011 22:09, schrieb Barry Warsaw: On Apr 15, 2011, at 10:01 PM, Andreas Röhler wrote: checked in the fix meanwhile. Behavior of trunk now default again. I just grabbed the update and it looks good. Thanks, I'll use this version over the weekend. As for the new variable, would prefer a pure boolean for simplicity. Maybe `py-indent-honor-listing' docstring already tells what's in question? So would t or nil give the default behavior? Nil - it's negligent now, doesn't care for listing... How about then, calling it py-indent-honor-open-paren? Also good. But let's reflect maybe a little further: point for me is not just the open paren, but the multiline-form it introduces. Open paren followed by a closing same line are not of interest here. Therefore the `listing', which doesn't express that sufficiently either. FWIW, I would have no idea at all what py-indent-honor-listing does if I just saw the name. Georg what about `py-indent-honor-multiline-listing' ? I think the listing is the strange word here. For me, a listing is a snippet of code printed in a book. Georg -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk2poQYACgkQN9GcIYhpnLDchACfQ/UvFKHyR87MVovONm3n/e3d V6AAnR+h4X8iYYp6e7ATWNt7Tmg7JoQ0 =n/q/ -END PGP SIGNATURE- ___ Python-mode mailing list Python-mode@python.org http://mail.python.org/mailman/listinfo/python-mode
Re: [Python-mode] myrkwid bug with backspace/delete
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 01.04.2011 22:49, schrieb Barry Warsaw: On Apr 01, 2011, at 10:45 PM, Andreas Röhler wrote: Am 01.04.2011 21:58, schrieb Barry Warsaw: On Apr 01, 2011, at 12:31 PM, Andreas Röhler wrote: checked in fixes. Also cured a mistake of 745208'-fix, where python- and emacs-lisp logic has been came across... Thanks Andreas! Things are looking better, but still not quite perfect. ;) -snip snip- def foo(): a = bar(one=1, two=2, three=3) -snip snip- Put point at the closing parenthesis and hit return. You get lined up under the 't' in 'three' whereas you should be lined up under the 'a'. Hi Berry, it's lined below `t' indicating the multiline character. Right. But after the closing of the bar() function call, the next line can't possibly occur under the 't' because you'll get an IndentationError: Yep. I don't think anybody would want to be under the 't' in this case. Georg -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEUEARECAAYFAk2WQkgACgkQN9GcIYhpnLAmtACYq15I6icPlqIvJfbjnVx8Yu/l nQCfefNr6CtZdCN8B6O2qlSDp04i6Ns= =iNhI -END PGP SIGNATURE- ___ Python-mode mailing list Python-mode@python.org http://mail.python.org/mailman/listinfo/python-mode
Re: [Python-mode] python.el
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 03.02.2011 22:13, schrieb s...@pobox.com: Georg - From reading emacs-devel, it seems that the python.el has made Georg changes to the mode and explicitly taken them out of the Georg copyright assignment for the FSF, so Emacs upstream can't include Georg them. Georg So now we are at three different python modes for Emacs... :| I'm not sure I understand. Someone forked python.el but won't allow the changes to go back into the GNU version? Wouldn't that violate the GPL or LGPL. Who did this? Sorry, the word author is missing in my original message. See the thread linked by Barry, in particular the message by Stefan Monnier, for more details. Georg -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk1LGwUACgkQN9GcIYhpnLBfZwCgj4NW4Z9Tw58iQkg861BoEaMX G8wAoJQS+Vm5zrphK3Bj1kw9D/9OuZ9b =WiY2 -END PGP SIGNATURE- ___ Python-mode mailing list Python-mode@python.org http://mail.python.org/mailman/listinfo/python-mode
Re: [Python-mode] python.el
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 03.02.2011 22:19, schrieb s...@pobox.com: Barry Wonderful. Barry http://thread.gmane.org/gmane.emacs.devel/135075 Wasn't a lot of our heartburn alwhile ago precipitated by Dave Love? He of the massive-patch-which-must-not-be-divided? In fact, isn't he the original author of the the python.el which *is* delivered with GNU Emacs? He must have a big bee in his bonnet. All true -- well, except for the last one, which I don't really know ;) Georg -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk1LHaAACgkQN9GcIYhpnLBH2gCeKSzCOMd08HJUBmWZVfNJVW9T uL4AniwgCOm6f6gC+fG007mayVZbWt4t =H4q0 -END PGP SIGNATURE- ___ Python-mode mailing list Python-mode@python.org http://mail.python.org/mailman/listinfo/python-mode
Re: [Python-mode] simplified procedure
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 11.01.2011 16:20, schrieb Barry Warsaw: Hi Andreas, On Jan 11, 2011, at 09:55 AM, Andreas Röhler wrote: With respect to the still considerable amount of reports and a possible speed up of it's treatment, please permit some reflexions, how ease the process: - as for pure typos, whitespace, indent-matters IMHO developers should be permitted to push into the trunk without prior notice. Sure. I think it's fine to JFDI for trivial patches. After all, we have a version control system and post-commit notifications with diffs. I don't think you even need to do a merge proposal for those. I agree -- in fact that's what I've been doing all the time except for the new font-lock faces. - if funktion is changed, newly introduced, we could agree a simplified procedure, saying a delay of three days, so people may object. A merge proposal would be nice, and waiting a few days (perhaps with a ping on email or irc). Three days is probably fine, though be a little more lenient around weekends and holidays. Other than that, if you feel pretty confident about the change and no one responds, JFDI. There will be times when you might not be able to get anyone's attention for various reasons. I'd say that in the above two cases, you should not let that block your progress. Just self-approve the mp and commit. - in cases of fundamental change I won't act without your prior consent. Yep, behavior changes should require a higher barrier. A discussion on this mailing list would always be good (before, during, or after merge proposal is submitted). Not sure if you and Andreas agree what a fundamental change or behavior change is. Georg -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk0spAQACgkQN9GcIYhpnLCeUgCbBqBC9sC2E6THsJu94miNzgxC /cEAn2B+qlEi9+ynqqpL5axqT1/KUcL5 =L/OX -END PGP SIGNATURE- ___ Python-mode mailing list Python-mode@python.org http://mail.python.org/mailman/listinfo/python-mode
Re: [Python-mode] Time for a new release?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 06.01.2011 00:19, schrieb Barry Warsaw: Hi Georg, On Jan 05, 2011, at 09:58 PM, Georg Brandl wrote: I have some more changes that I'd like to discuss before committing. (These are features in my patched version at bitbucket.org/birkenfeld/dotemacs). Basically: * a separate face for class names: font-lock-type-face is meant for types in type declarations and therefore usually not a very noticeable face. For example I like to have class names underlined, but having font-lock-type-face underlined looks very odd in c-mode. * a separate face for exception classes: somewhat redundant, but looks nice. Both for builtin exceptions and any name after a raise or except. Both of these sound good to me. I checked out and tested your branch, and reviewed it. I think there are only two minor issues that need fixing, but it otherwise looks good. Okay, I'll have a look at the customization issue. * special locking for escape sequences and %-formatting codes in strings, like the equivalent feature in elisp-mode. (The code seems to have some issues with font-locking buffers, so I'd be glad for suggestions how to fix it.) I'm not sure I understand what the issues are. I tested it with a few Mailman files and it looked okay, though the extra bolding was a little off-putting (yeah, I'll be customizing those faces as soon as your changes land :). What are the problems? Not that I'm an expert on all the insane font-lock possibilities. The problem is that after applying this patch, I see larger files mis-highlighted when I open them and jump to somewhere in the middle of the buffer (or when the point is placed there automatically on openening, because that was my last editing position). Basically, I guess some string boundary isn't recognized, and the highlighting string - code is reversed: code is highlighted as string, and vice versa. It can be fixed by moving point into a correctly highlighted region and calling `font-lock-fontify-buffer'. * no filling in code (that one is pretty simple, just remove the fill- paragraph in the last condition of py-fill-paragraph). +1! If that's the bug I think it is, it's been annoying me for about a bazillion years. E.g. I want to be able to fill comments for sure, maybe strings, but never code. Yep, that's that. BTW, while looking at this, something is still not quite right with the parsing of triple-quoted string literals... as can be witnessed when filling a TQS with embedded SQS... Can you provide an example? Try filling this string: The output conforms to the XHTML version 1.0 Transitional DTD (*almost* strict). The output contains a minimum of formatting information. The cascading style sheet html4css1.css is required for proper viewing with a modern graphical browser. It results in this: The output conforms to the XHTML version 1.0 Transitional DTD (*almost* strict). The outputcontains a minimum of formatting information. The cascading style sheet html4css1.css is required for proper viewing with a modern graphical browser. behaving as if the string stopped at the single double-quote before contains. The font-locking *seems* to be all-right, however I've still seen an instance where the text between the single quotes has code-coloring -- cannot reproduce though. If I can figure out how to do it, I'll commit these changes separately to a private branch on launchpad, so that they can be reviewed. Two additional things would be nice if anyone's so inclined. * Adding a NEWS file; I don't care how far back into history it goes. * Maybe some nice screen grabs of face examples so folks have a visual way of seeing what their font-lock options are. I'll see what I can do. cheers, Georg -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAk0ldrsACgkQN9GcIYhpnLA0RQCdHtQEmfop4YFg0zv8r6H0uA5I oYEAn21pHlLZllzlnKanPwh76DyGQea3 =HFI+ -END PGP SIGNATURE- ___ Python-mode mailing list Python-mode@python.org http://mail.python.org/mailman/listinfo/python-mode
Re: [Python-mode] form inserting print
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 12.03.2010 10:51, schrieb Andreas Roehler: Hi python-mode folks, form below should speed up writing print-statements in Python a little bit. (defun druck (optional arg) Inserts a print statement out of current `(car kill-ring)' by default, inserts ARG instead if delivered. (interactive *) (lexical-let* ((name (or arg (car kill-ring))) (form (cond ((eq major-mode 'python-mode) (concat print \ name : %s \ % name) (insert form))) Opinions? Wouldn't that be the job of one of the numerous snippet packages that are floating around? I'm using yasnippet myself, and it works very well. (I know that python.el has some definitions for skeleton mode, but python-mode.el doesn't, and I'm not sure it should.) Georg -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.14 (GNU/Linux) iEYEARECAAYFAkuaFbAACgkQN9GcIYhpnLDOGgCgsLnSpHSv000OzmCvrxwZDXzx cwQAni9nFX3hIeZ3Di3bCtVHaCAClnlm =Syty -END PGP SIGNATURE- ___ Python-mode mailing list Python-mode@python.org http://mail.python.org/mailman/listinfo/python-mode
Re: [Python-mode] Hello
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 03.03.2010 15:19, schrieb Jeff Bauer: On 03/02/2010 05:12 PM, Georg Brandl wrote: I've only just subscribed this list since I complained a bit to Barry about the general state of Python in Emacs and he managed to recruit me as a contributor :) Hi Georg! Any cool Python/Emacs tricks you'd care to share? (Or Barry?) Well, not as such, but you can look at my .emacs.d here: http://bitbucket.org/birkenfeld/dotemacs/ cheers, Georg -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.14 (GNU/Linux) iEYEARECAAYFAkuQJ6gACgkQN9GcIYhpnLCvjgCfVsON5dW0K6wUv1oYN/cIKwAJ PC0Ani1N9fH1HBPSB+D7EmdiS4Uf/Tp/ =Ew0d -END PGP SIGNATURE- ___ Python-mode mailing list Python-mode@python.org http://mail.python.org/mailman/listinfo/python-mode