Andreas Röhler | 21 Mar 18:11 2014
Picon

face of print

Function "print" currently gets font-lock-keyword-face, which doesn't seem correct.
IMO it should get py-builtins-face, right?

Just FYI,

Andreas
Andreas Röhler | 19 Mar 18:21 2014
Picon

WRT parenthese errors in Python edits

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
Andreas Röhler | 13 Mar 12:18 2014
Picon

execute dedicated - multiple buffers?

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
Andreas Röhler | 10 Mar 12:02 2014
Picon

formatting triple-quoted-strings

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
Andreas Röhler | 28 Jan 08:42 2014
Picon

python-mode.el 6.1.3 released

Hi all,

version 6.1.3 delivers some bug-fixes and should come with improvements too:

https://launchpad.net/python-mode/trunk/6.1.3/+download/python-mode.el-6.1.3.tar.gz

- PEP8 indent-alternatives when closing a list implemented

Boolean `py-close-at-start-column-p', default is nil

my_list = [
     1, 2, 3,
     4, 5, 6,
     ]
result = some_function_that_takes_arguments(
     'a', 'b', 'c',
     'd', 'e', 'f',
     )

When non-nil, it will be lined up under the first character of the line that starts the multi-line
construct, as in:

my_list = [
     1, 2, 3,
     4, 5, 6,
]

result = some_function_that_takes_arguments(
     'a', 'b', 'c',
     'd', 'e', 'f',
(Continue reading)

Andreas Röhler | 20 Nov 15:20 2013
Picon

TAB-completion, lp:1252029

Hi Barry, hi all,

some thoughts while hunting the bug:

TAB seems expected frequently as bound to completion, while it indents in python-mode.

IMO it's possible to combine both: a first TAB at most outdented position now does nothing - which would be
the occasion for complete.
Second TAB than should close the completion buffer and jump back to col 0.

Just FYI,

Andreas
Andreas Röhler | 28 Oct 15:36 2013
Picon

Simpler way to put PDB breakpoints

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
Andreas Röhler | 19 Oct 18:11 2013
Picon

py-keep-window-configuration-p

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
Andreas Röhler | 17 Oct 21:13 2013
Picon

different set of colors for pairs

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
Andreas Röhler | 5 Oct 17:35 2013
Picon

heuristic exit

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
Andreas Röhler | 23 Sep 21:57 2013
Picon

edit-style considering empty line

Hi Barry, hi all,

there was an expample at

http://stackoverflow.com/questions/18940719/python-indentation-with-emacs/18940836#18940836

if 1 < 2:
     print("this line is part of the if statement")

print("this is NOT part of the if statement")

The OP wanted the Editor intends the second "print" to column 0.
IMO it's possibly establishing an edit rule saying: if an empty line follows a block, consider this block closed.

Now seeing the example below at

http://pyvideo.org/video/1708/distributed-coordination-with-python

def find(seq, target):
     for i, value in enumerate(seq):
         if value == tgt:
             break
     else:
         return -1
     return i

If an empty line after "break" is inserted:

def find(seq, target):
     for i, value in enumerate(seq):
(Continue reading)


Gmane