all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Carlos Pita <carlosjosepita@gmail.com>
To: 19691@debbugs.gnu.org
Cc: galli.87@gmail.com
Subject: bug#19691: 24.4; python.el: indentation RFE
Date: Mon, 26 Jan 2015 11:25:18 -0300	[thread overview]
Message-ID: <87vbjt4o1d.fsf@gmail.com> (raw)

When you're in a blank line and press Enter, IMHO it would be better if
python.el kept the cursor column position, instead of restoring the last
non-blank line indentation level.

For example, say the cursor is X:

def f():
    pass
X

When I press Enter most often I don't want to get:

def f():
    pass

    X

Instead, I think a more sensible default behaviour would be:

def f():
    pass

X

That is, to keep the cursor vertical position. This is consistent with
the criterion of auto-indenting up to the indentation of last (both
blank or non-blank) line, except for the technicality that a blank last
line is not really indented... although you still have a point position
there to infer desired indentation for the new line.

Maybe this should be made a customizable option.

What do you think? I'll try to submit a patch later today.





             reply	other threads:[~2015-01-26 14:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-26 14:25 Carlos Pita [this message]
2015-01-30  3:52 ` bug#19691: 24.4; python.el: indentation RFE Fabián Ezequiel Gallina
     [not found] ` <handler.19691.D19691.14225899572400.notifdone@debbugs.gnu.org>
2015-01-30 10:18   ` bug#19691: closed (24.4; python.el: indentation RFE) Carlos Pita
2015-02-02 20:28 ` bug#19691: Carlos Pita
2015-02-04 22:56   ` bug#19691: Fabián Ezequiel Gallina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vbjt4o1d.fsf@gmail.com \
    --to=carlosjosepita@gmail.com \
    --cc=19691@debbugs.gnu.org \
    --cc=galli.87@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.