From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Keeping column when up/down
Date: Sun, 11 Dec 2016 22:24:03 +0100 [thread overview]
Message-ID: <75fcf316-d7df-fbb6-187d-989602408039@easy-emacs.de> (raw)
In-Reply-To: <83wpf6ciol.fsf@gnu.org>
On 11.12.2016 21:30, Eli Zaretskii wrote:
>> Cc: Eli Zaretskii <eliz@gnu.org>
>> From: Andreas Röhler <andreas.roehler@easy-emacs.de>
>> Date: Sun, 11 Dec 2016 20:46:36 +0100
>>
>> Keeps column when goal-column is nil.
>>
>> Looks like a bug.
> No, it's a feature (assuming I understood what you are complaining
> about; sorry if I didn't).
>
Thought at something like that:
(defun ar-previous-line (arg)
"Moving ARG upwards.
Keep the column if possible. "
(interactive "^p")
(unless (bobp)
(let ((col
(if
(eq last-command 'ar-previous-line)
ar-vertical-move-start-column
(setq ar-vertical-move-start-column (current-column)))))
(previous-line arg arg)
(when (< col (save-excursion (end-of-line) (current-column)))
(move-to-column col)))))
next prev parent reply other threads:[~2016-12-11 21:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-11 17:34 Keeping column when up/down Andreas Röhler
2016-12-11 17:33 ` tomas
2016-12-11 18:45 ` Andreas Röhler
2016-12-11 18:46 ` Eli Zaretskii
2016-12-11 19:46 ` Andreas Röhler
2016-12-11 20:30 ` Eli Zaretskii
2016-12-11 21:24 ` Andreas Röhler [this message]
2016-12-11 17:36 ` Eli Zaretskii
2016-12-11 18:43 ` Andreas Röhler
2016-12-11 18:44 ` Eli Zaretskii
2016-12-11 19:58 ` Andreas Röhler
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=75fcf316-d7df-fbb6-187d-989602408039@easy-emacs.de \
--to=andreas.roehler@easy-emacs.de \
--cc=help-gnu-emacs@gnu.org \
/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.