* bug#24443: 24.5; Feature: C-n and C-p to move logically while DOWN and UP move physically
@ 2016-09-15 12:56 Ed Avis
2016-09-15 14:39 ` Eli Zaretskii
2019-09-29 4:30 ` Stefan Kangas
0 siblings, 2 replies; 9+ messages in thread
From: Ed Avis @ 2016-09-15 12:56 UTC (permalink / raw)
To: 24443
The change in Emacs 23.1 to move up and down by visual lines was
certainly an improvement in usability. But for some cases such as
keyboard macros it is safer to use the old movement by logical lines.
The Emacs wiki notes that you might want to temporarily change the value
of line-move-visual before calling or recording a macro. This works,
but it is a bit awkward.
Could I suggest that it might make sense for the more 'expert'
keystrokes C-n and C-p to default to logical line movement, while DOWN
and UP continue to move visually? Most people who use C-n and C-p will
be Emacs old-timers and remember the logical movement, or at least
understand how to rebind the keys to switch them to visual movement.
This way, rather than two key bindings for the same thing, the different
kinds of line movement both have a key binding.
I think this would make recording macros and other specialized kinds of
cursor movement a lot less fiddly, while keeping the less surprising
behaviour for the ordinary arrow keys.
In GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.18.9)
of 2016-04-11 on buildvm-25.phx2.fedoraproject.org
Configured using:
`configure --build=x86_64-redhat-linux-gnu
--host=x86_64-redhat-linux-gnu --program-prefix=
--disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
--bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
--datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
--libexecdir=/usr/libexec --localstatedir=/var
--sharedstatedir=/var/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png
--with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3
--with-gpm=no build_alias=x86_64-redhat-linux-gnu
host_alias=x86_64-redhat-linux-gnu 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g
-pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector-strong --param=ssp-buffer-size=4
-grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-m64 -mtune=generic' LDFLAGS=-Wl,-z,relro'
Important settings:
value of $LC_COLLATE: C
value of $LC_CTYPE: en_GB.UTF-8
value of $LC_MESSAGES: en_GB.UTF-8
value of $LC_MONETARY: en_GB.UTF-8
value of $LC_NUMERIC: en_GB.UTF-8
value of $LC_TIME: en_GB.UTF-8
value of $LANG: en_GB.UTF-8
locale-coding-system: utf-8-unix
Major mode: nXML
Minor modes in effect:
diff-auto-refine-mode: t
show-paren-mode: t
shell-dirtrack-mode: t
tooltip-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent messages:
Invoking man forward-line in the background
Please wait: formatting the forward-line man page...
forward-line man page formatted
error in process sentinel: user-error: Can't find the forward-line manpage
error in process sentinel: Can't find the forward-line manpage
Quit [3 times]
Type "q" to delete help window.
Quit
delete-backward-char: Text is read-only
Load-path shadows:
None found.
Features:
(shadow sort emacsbug sendmail imenu man eieio-opt speedbar sb-image
ezimage dframe find-func macros mule-util etags sql view edmacro kmacro
network-stream starttls tls mail-extr log-edit message idna format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
rfc2047 rfc2045 ietf-drums mailabbrev mail-utils gmm-utils mailheader
add-log log-view pcvs-util nxml-uchnm rng-xsd xsd-regexp rng-cmpct
rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt
rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap nxml-util
nxml-glyph nxml-enc xmltok diff-mode easy-mmode vc vc-dispatcher ffap
thingatpt url-parse auth-source eieio byte-opt bytecomp byte-compile
cl-extra cconv eieio-core gnus-util mm-util help-fns mail-prsvr
password-cache url-vars dabbrev misearch multi-isearch vc-git cus-edit
wid-edit cl-loaddefs cl-lib cus-start cus-load perl-mode help-mode
easymenu pcmpl-unix xterm time-date paren server compile shell pcomplete
comint ring ansi-color tooltip electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
gfilenotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)
Memory information:
((conses 16 731008 77135)
(symbols 48 26067 1)
(miscs 40 397 2165)
(strings 32 47101 12667)
(string-bytes 1 2642383)
(vectors 16 28777)
(vector-slots 8 1466171 103778)
(floats 8 588 621)
(intervals 56 96513 374)
(buffers 960 47)
(heap 1024 50284 2177))
Please ignore autogenerated disclaimer below this point.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#24443: 24.5; Feature: C-n and C-p to move logically while DOWN and UP move physically
2016-09-15 12:56 bug#24443: 24.5; Feature: C-n and C-p to move logically while DOWN and UP move physically Ed Avis
@ 2016-09-15 14:39 ` Eli Zaretskii
2016-09-15 14:51 ` Ed Avis
2019-09-29 4:30 ` Stefan Kangas
1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2016-09-15 14:39 UTC (permalink / raw)
To: Ed Avis; +Cc: 24443
> From: Ed Avis <eda@waniasset.com>
> Date: Thu, 15 Sep 2016 13:56:39 +0100
>
> Could I suggest that it might make sense for the more 'expert'
> keystrokes C-n and C-p to default to logical line movement, while DOWN
> and UP continue to move visually? Most people who use C-n and C-p will
> be Emacs old-timers and remember the logical movement, or at least
> understand how to rebind the keys to switch them to visual movement.
> This way, rather than two key bindings for the same thing, the different
> kinds of line movement both have a key binding.
This could be a global minor mode, by default off. I don't think we
can make this the default behavior after so many years of the current
behavior.
Note that this will also contradict the tutorial, which currently says
the arrow keys move the same as C-n/C-p.
Thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#24443: 24.5; Feature: C-n and C-p to move logically while DOWN and UP move physically
2016-09-15 14:39 ` Eli Zaretskii
@ 2016-09-15 14:51 ` Ed Avis
2016-09-15 15:18 ` Eli Zaretskii
0 siblings, 1 reply; 9+ messages in thread
From: Ed Avis @ 2016-09-15 14:51 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 24443@debbugs.gnu.org
Eli Z. wrote:
>>Could I suggest that it might make sense for the more 'expert'
>>keystrokes C-n and C-p to default to logical line movement, while DOWN
>>and UP continue to move visually
>
>This could be a global minor mode, by default off. I don't think we
>can make this the default behavior after so many years of the current
>behavior.
Yeah, you'd never change something as fundamental as moving up and down a line after decades of it working one way :-p.
My view is that while the arrow keys shouldn't change, C-n and C-p are 'expert' enough that a tweak to their behaviour can be justified,
particularly as it would be restoring an old and sometimes-missed feature. But the Emacs maintainers will have the best idea of what their users expect.
The tutorial would need to change and say that while the arrow keys move point around physically on the screen,
the C-n and C-p keystrokes will always go to the next or previous line if one exists. That would be something useful
for the tutorial to teach.
But apart from the question of defaults, a start would be to add functions next-line-logical and previous-line-logical.
These could then be bound to whatever keys you want without Lisp programming.
--
Ed Avis <eda@waniasset.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#24443: 24.5; Feature: C-n and C-p to move logically while DOWN and UP move physically
2016-09-15 14:51 ` Ed Avis
@ 2016-09-15 15:18 ` Eli Zaretskii
2016-09-15 15:23 ` Ed Avis
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2016-09-15 15:18 UTC (permalink / raw)
To: Ed Avis; +Cc: 24443
> From: Ed Avis <eda@waniasset.com>
> CC: "24443@debbugs.gnu.org" <24443@debbugs.gnu.org>
> Date: Thu, 15 Sep 2016 14:51:11 +0000
>
> But apart from the question of defaults, a start would be to add functions next-line-logical and previous-line-logical.
We already have those: they are called next-logical-line and
previous-logical-line.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#24443: 24.5; Feature: C-n and C-p to move logically while DOWN and UP move physically
2016-09-15 15:18 ` Eli Zaretskii
@ 2016-09-15 15:23 ` Ed Avis
2016-09-16 9:33 ` Eli Zaretskii
0 siblings, 1 reply; 9+ messages in thread
From: Ed Avis @ 2016-09-15 15:23 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 24443@debbugs.gnu.org
>We already have those: they are called next-logical-line and
>previous-logical-line.
Ah! Could they be mentioned in the documentation for next-line and previous-line?
--
Ed Avis <eda@waniasset.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#24443: 24.5; Feature: C-n and C-p to move logically while DOWN and UP move physically
2016-09-15 15:23 ` Ed Avis
@ 2016-09-16 9:33 ` Eli Zaretskii
2016-09-16 9:34 ` Ed Avis
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2016-09-16 9:33 UTC (permalink / raw)
To: Ed Avis; +Cc: 24443
> From: Ed Avis <eda@waniasset.com>
> CC: "24443@debbugs.gnu.org" <24443@debbugs.gnu.org>
> Date: Thu, 15 Sep 2016 15:23:44 +0000
>
> >We already have those: they are called next-logical-line and
> >previous-logical-line.
>
> Ah! Could they be mentioned in the documentation for next-line and previous-line?
Done.
Can we close this bug report, or is there something else that should
be done about it?
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#24443: 24.5; Feature: C-n and C-p to move logically while DOWN and UP move physically
2016-09-16 9:33 ` Eli Zaretskii
@ 2016-09-16 9:34 ` Ed Avis
2016-09-16 10:02 ` Eli Zaretskii
0 siblings, 1 reply; 9+ messages in thread
From: Ed Avis @ 2016-09-16 9:34 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 24443@debbugs.gnu.org
>Can we close this bug report, or is there something else that should
>be done about it?
Hmm, I had expected to get second opinions about the usefulness of having C-n do something different to DOWN (but the same as what C-n always used to do). But if your view on the matter is the important one, then the bug can be closed.
--
Ed Avis <eda@waniasset.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#24443: 24.5; Feature: C-n and C-p to move logically while DOWN and UP move physically
2016-09-16 9:34 ` Ed Avis
@ 2016-09-16 10:02 ` Eli Zaretskii
0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2016-09-16 10:02 UTC (permalink / raw)
To: Ed Avis; +Cc: 24443
> From: Ed Avis <eda@waniasset.com>
> CC: "24443@debbugs.gnu.org" <24443@debbugs.gnu.org>
> Date: Fri, 16 Sep 2016 09:34:59 +0000
>
> >Can we close this bug report, or is there something else that should
> >be done about it?
>
> Hmm, I had expected to get second opinions about the usefulness of having C-n do something different to DOWN (but the same as what C-n always used to do). But if your view on the matter is the important one, then the bug can be closed.
I don't mind waiting for a while for someone else to chime in.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#24443: 24.5; Feature: C-n and C-p to move logically while DOWN and UP move physically
2016-09-15 12:56 bug#24443: 24.5; Feature: C-n and C-p to move logically while DOWN and UP move physically Ed Avis
2016-09-15 14:39 ` Eli Zaretskii
@ 2019-09-29 4:30 ` Stefan Kangas
1 sibling, 0 replies; 9+ messages in thread
From: Stefan Kangas @ 2019-09-29 4:30 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 24443-done, Ed Avis
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Ed Avis <eda@waniasset.com>
>> CC: "24443@debbugs.gnu.org" <24443@debbugs.gnu.org>
>> Date: Fri, 16 Sep 2016 09:34:59 +0000
>>
>> >Can we close this bug report, or is there something else that should
>> >be done about it?
>>
>> Hmm, I had expected to get second opinions about the usefulness of having C-n do something different to DOWN (but the same as what C-n always used to do). But if your view on the matter is the important one, then the bug can be closed.
>
> I don't mind waiting for a while for someone else to chime in.
That was three years ago, and no one has expressed any other opinions.
I think it's now safe to close it, so I'm doing that now.
Best regards,
Stefan Kangas
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-09-29 4:30 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-15 12:56 bug#24443: 24.5; Feature: C-n and C-p to move logically while DOWN and UP move physically Ed Avis
2016-09-15 14:39 ` Eli Zaretskii
2016-09-15 14:51 ` Ed Avis
2016-09-15 15:18 ` Eli Zaretskii
2016-09-15 15:23 ` Ed Avis
2016-09-16 9:33 ` Eli Zaretskii
2016-09-16 9:34 ` Ed Avis
2016-09-16 10:02 ` Eli Zaretskii
2019-09-29 4:30 ` Stefan Kangas
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).