bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17346: 24.4.50; Why is the goal column limited to C-n and C-p ?


From: Drew Adams
Subject: bug#17346: 24.4.50; Why is the goal column limited to C-n and C-p ?
Date: Sun, 5 Jun 2022 22:56:35 +0000

> I've now made this change in Emacs 29, and I have not added a new user
> option to tweak the behaviour.  If there's a huge backlash, we can add
> one, but it seems rather unlikely to me because of the reason above.

The doc of `(next|previous)-line' specifically calls
out the behavior wrt `goal-column' (see below).

Are you doing that also for each command/key you
change now to respect `goal-column'?  You should, IMO.

Better would be to define a minor mode, which would
cause some set of commands to respect `goal-column'.
This is really a modal thing and not part of the
behavior of this or that particular command.

The set of affected commands could be defined as a
list-valued option or by putting a property on a
command's symbol.  One way or another, this should
be easily under user control.

The doc of the minor mode would document the
behavior as well as point to the set of affected
commands.

No need then to also put that info in the doc of
the individual commands.  (Users's then wouldn't
see it in `C-x k' or `C-x f', but they'd see it in
`C-h m', and of course it only takes effect after
`C-x C-n' confirmation anyway.)

`C-x C-n' could (after novice confirmation for
setting the goal column) turn on the minor mode,
which would otherwise be off by default.  Its doc
should also mention that minor mode behavior.
___

Current doc about this in `(next|previous)-line'
(it doesn't really belong there):

 The command C-x C-n can be used to create
 a semipermanent goal column for this command.
 Then instead of trying to move exactly vertically (or as close as possible),
 this command moves to the specified goal column (or as close as possible).
 The goal column is stored in the variable 'goal-column', which is nil
 when there is no goal column.  Note that setting 'goal-column'
 overrides 'line-move-visual' and causes this command to move by buffer
 lines rather than by display lines.
___

(BTW, that part of the doc isn't filled properly.)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]