GNU bug report logs - #24443
24.5; Feature: C-n and C-p to move logically while DOWN and UP move physically

Previous Next

Package: emacs;

Reported by: Ed Avis <eda <at> waniasset.com>

Date: Thu, 15 Sep 2016 12:58:02 UTC

Severity: wishlist

Found in version 24.5

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24443 in the body.
You can then email your comments to 24443 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#24443; Package emacs. (Thu, 15 Sep 2016 12:58:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ed Avis <eda <at> waniasset.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 15 Sep 2016 12:58:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ed Avis <eda <at> waniasset.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 24.5; Feature: C-n and C-p to move logically while DOWN and UP move
 physically
Date: Thu, 15 Sep 2016 13:56:39 +0100
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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24443; Package emacs. (Thu, 15 Sep 2016 14:40:01 GMT) Full text and rfc822 format available.

Message #8 received at 24443 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ed Avis <eda <at> waniasset.com>
Cc: 24443 <at> debbugs.gnu.org
Subject: Re: bug#24443: 24.5;
 Feature: C-n and C-p to move logically while DOWN and UP move
 physically
Date: Thu, 15 Sep 2016 17:39:09 +0300
> From: Ed Avis <eda <at> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24443; Package emacs. (Thu, 15 Sep 2016 14:52:02 GMT) Full text and rfc822 format available.

Message #11 received at 24443 <at> debbugs.gnu.org (full text, mbox):

From: Ed Avis <eda <at> waniasset.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: "24443 <at> debbugs.gnu.org" <24443 <at> debbugs.gnu.org>
Subject: RE: bug#24443: 24.5;	Feature: C-n and C-p to move logically while
 DOWN and UP move	physically
Date: Thu, 15 Sep 2016 14:51:11 +0000
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 <at> waniasset.com>




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24443; Package emacs. (Thu, 15 Sep 2016 15:19:02 GMT) Full text and rfc822 format available.

Message #14 received at 24443 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ed Avis <eda <at> waniasset.com>
Cc: 24443 <at> debbugs.gnu.org
Subject: Re: bug#24443: 24.5;	Feature: C-n and C-p to move logically while
 DOWN and UP move	physically
Date: Thu, 15 Sep 2016 18:18:09 +0300
> From: Ed Avis <eda <at> waniasset.com>
> CC: "24443 <at> debbugs.gnu.org" <24443 <at> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24443; Package emacs. (Thu, 15 Sep 2016 15:25:01 GMT) Full text and rfc822 format available.

Message #17 received at 24443 <at> debbugs.gnu.org (full text, mbox):

From: Ed Avis <eda <at> waniasset.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: "24443 <at> debbugs.gnu.org" <24443 <at> debbugs.gnu.org>
Subject: RE: bug#24443: 24.5;	Feature: C-n and C-p to move logically while
 DOWN and UP move	physically
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?

-- 
Ed Avis <eda <at> waniasset.com>





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24443; Package emacs. (Fri, 16 Sep 2016 09:34:02 GMT) Full text and rfc822 format available.

Message #20 received at 24443 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ed Avis <eda <at> waniasset.com>
Cc: 24443 <at> debbugs.gnu.org
Subject: Re: bug#24443: 24.5;	Feature: C-n and C-p to move logically while
 DOWN and UP move	physically
Date: Fri, 16 Sep 2016 12:33:10 +0300
> From: Ed Avis <eda <at> waniasset.com>
> CC: "24443 <at> debbugs.gnu.org" <24443 <at> 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?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24443; Package emacs. (Fri, 16 Sep 2016 09:36:01 GMT) Full text and rfc822 format available.

Message #23 received at 24443 <at> debbugs.gnu.org (full text, mbox):

From: Ed Avis <eda <at> waniasset.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: "24443 <at> debbugs.gnu.org" <24443 <at> debbugs.gnu.org>
Subject: RE: bug#24443: 24.5;	Feature: C-n and C-p to move logically while
 DOWN and UP move	physically
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.

-- 
Ed Avis <eda <at> waniasset.com>




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24443; Package emacs. (Fri, 16 Sep 2016 10:03:02 GMT) Full text and rfc822 format available.

Message #26 received at 24443 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ed Avis <eda <at> waniasset.com>
Cc: 24443 <at> debbugs.gnu.org
Subject: Re: bug#24443: 24.5;	Feature: C-n and C-p to move logically while
 DOWN and UP move	physically
Date: Fri, 16 Sep 2016 13:02:01 +0300
> From: Ed Avis <eda <at> waniasset.com>
> CC: "24443 <at> debbugs.gnu.org" <24443 <at> 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.




Reply sent to Stefan Kangas <stefan <at> marxist.se>:
You have taken responsibility. (Sun, 29 Sep 2019 04:31:03 GMT) Full text and rfc822 format available.

Notification sent to Ed Avis <eda <at> waniasset.com>:
bug acknowledged by developer. (Sun, 29 Sep 2019 04:31:03 GMT) Full text and rfc822 format available.

Message #31 received at 24443-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 24443-done <at> debbugs.gnu.org, Ed Avis <eda <at> waniasset.com>
Subject: Re: bug#24443: 24.5; Feature: C-n and C-p to move logically while
 DOWN and UP move physically
Date: Sun, 29 Sep 2019 06:30:25 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Ed Avis <eda <at> waniasset.com>
>> CC: "24443 <at> debbugs.gnu.org" <24443 <at> 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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 27 Oct 2019 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 175 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.