jed-users mailing list

[2007 Date Index] [2007 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: little anoying "feature" in pymode from jed modes


On 12.11.07, Joachim Schmitz wrote:

> I am using the pymode.sl from the jedmodes cvs-repository.

> If I select a region to shift or comment, I leave the cursor at the 
> beginning of the first line after the region, so that all lines, which I 
> want to indent or comment are highligted. The annoying feature is:
> the line, where the courser is at the beginning, is also shifted or 
> commented.

While it may be annoying, it is really a Jed feature.

Both, python->py_shift_region_*() and comment_region() from  comments.sl
(now included with Jed) narrow the buffer to the region before acting.
If you mark a region and try 
  M-x narrow, 
you will realise that the last line is still visible, even if the point
is at bol.

I understand that this is non-intuitive, as there is no visible highlight
in the last line. However, I would like to keep it as-is to maintain the
consistency with general Jed behaviour.

So my current advise is to "think in lines", with line-wise operations
like commenting, indenting or executing on a region, remembering that
Jed extends a region for such operations to contain whole lines in a way
that the "line-region" spans all lines that contain either highlight or
the point.

Practically this means either mark one line less or go_left_1 before
applying the function.

Of course you can also try to convince John to change the behaviour to

  Not include a line, if there is no *visible* marking in it, i.e. 
  
     if it is the last line and the point (or mark) is at bol
   or
     if it is the first line and the point (or mark) is at eol.  


Günter



--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2007 date index] [2007 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]