GNU bug report logs - #28396
26.0.50; display-line-numbers not saved by Save Options

Previous Next

Package: emacs;

Reported by: Eli Zaretskii <eliz <at> gnu.org>

Date: Sat, 9 Sep 2017 10:05:02 UTC

Severity: minor

Found in version 26.0.50

Fixed in version 26.0.91

Done: Glenn Morris <rgm <at> gnu.org>

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 28396 in the body.
You can then email your comments to 28396 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#28396; Package emacs. (Sat, 09 Sep 2017 10:05:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eli Zaretskii <eliz <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 09 Sep 2017 10:05:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.50; display-line-numbers not saved by Save Options
Date: Sat, 09 Sep 2017 13:04:29 +0300
To reproduce:

  emacs -Q
  Click Options in the menu bar
  Select Show/Hide->Line Numbers For All Lines->Global Line Numbers Mode
  Click Options->Save Options

The result is that the setting of global-display-line-numbers-mode is
not saved on the init file.  Note that the solution should also save
the sub-mode, when the user selects, say, Relative Line Numbers.


In GNU Emacs 26.0.50 (build 1026, i686-pc-mingw32)
 of 2017-09-09 built on HOME-C4E4A596F7
Repository revision: be9bc8e67d6caf6d61fe4f46ac5b640ada16ba95
Windowing system distributor 'Microsoft Corp.', version 5.1.2600
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
 'configure --prefix=/d/usr --enable-checking=yes,glyphs --with-wide-int
 --with-modules --enable-check-lisp-object-type 'CFLAGS=-O0 -gdwarf-4
 -g3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS MODULES

Important settings:
  value of $LANG: ENU
  locale-coding-system: cp1255

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message subr-x puny seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils elec-pair time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win
w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded 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 w32notify w32 multi-tty make-network-process emacs)

Memory information:
((conses 16 101529 10307)
 (symbols 56 21245 1)
 (miscs 48 42 87)
 (strings 16 31920 2037)
 (string-bytes 1 790049)
 (vectors 16 14144)
 (vector-slots 8 488319 13042)
 (floats 8 54 62)
 (intervals 40 275 104)
 (buffers 880 11))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28396; Package emacs. (Wed, 22 Nov 2017 00:45:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 28396 <at> debbugs.gnu.org
Subject: Re: bug#28396: 26.0.50; display-line-numbers not saved by Save Options
Date: Tue, 21 Nov 2017 19:44:05 -0500
Eli Zaretskii wrote:

>   emacs -Q
>   Click Options in the menu bar
>   Select Show/Hide->Line Numbers For All Lines->Global Line Numbers Mode
>   Click Options->Save Options
>
> The result is that the setting of global-display-line-numbers-mode is
> not saved on the init file.

commit daa959e (HEAD, origin/emacs-26, emacs-26)
Date:   Tue Nov 21 19:42:32 2017 -0500

    * lisp/menu-bar.el (menu-bar-options-save):
    Add global-display-line-numbers-mode.  (Bug#28396)

diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 972f84e..9ff3de1 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -669,7 +669,8 @@ menu-bar-options-save
   (let ((need-save nil))
     ;; These are set with menu-bar-make-mm-toggle, which does not
     ;; put on a customized-value property.
-    (dolist (elt '(line-number-mode column-number-mode size-indication-mode
+    (dolist (elt '(global-display-line-numbers-mode
+		   line-number-mode column-number-mode size-indication-mode
 		   cua-mode show-paren-mode transient-mark-mode
 		   blink-cursor-mode display-time-mode display-battery-mode
 		   ;; These are set by other functions that don't set


> Note that the solution should also save the sub-mode, when the user
> selects, say, Relative Line Numbers.

Buffer-local variables like display-line-numbers don't play well with
Customize.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28396; Package emacs. (Wed, 22 Nov 2017 01:19:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 28396 <at> debbugs.gnu.org
Subject: Re: bug#28396: 26.0.50; display-line-numbers not saved by Save Options
Date: Tue, 21 Nov 2017 20:18:40 -0500
Glenn Morris wrote:

> Buffer-local variables like display-line-numbers don't play well with
> Customize.

Oh, it's display-line-numbers-type.




bug marked as fixed in version 26.0.91, send any further explanations to 28396 <at> debbugs.gnu.org and Eli Zaretskii <eliz <at> gnu.org> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 22 Nov 2017 01:20:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28396; Package emacs. (Wed, 22 Nov 2017 03:35:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 28396 <at> debbugs.gnu.org
Subject: Re: bug#28396: 26.0.50; display-line-numbers not saved by Save Options
Date: Wed, 22 Nov 2017 05:34:33 +0200
> From: Glenn Morris <rgm <at> gnu.org>
> Cc: 28396 <at> debbugs.gnu.org
> Date: Tue, 21 Nov 2017 19:44:05 -0500
> 
> Eli Zaretskii wrote:
> 
> >   emacs -Q
> >   Click Options in the menu bar
> >   Select Show/Hide->Line Numbers For All Lines->Global Line Numbers Mode
> >   Click Options->Save Options
> >
> > The result is that the setting of global-display-line-numbers-mode is
> > not saved on the init file.
> 
> commit daa959e (HEAD, origin/emacs-26, emacs-26)
> Date:   Tue Nov 21 19:42:32 2017 -0500
> 
>     * lisp/menu-bar.el (menu-bar-options-save):
>     Add global-display-line-numbers-mode.  (Bug#28396)

Thanks.

> > Note that the solution should also save the sub-mode, when the user
> > selects, say, Relative Line Numbers.
> 
> Buffer-local variables like display-line-numbers don't play well with
> Customize.

That's too bad, I hoped some solution would be possible.  Is it
acceptable to save the mode, but not its sub-mode?  I have no opinion,
as I don't use this mode.  Should we perhaps at least document this
subtle issue somewhere?




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 20 Dec 2017 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 119 days ago.

Previous Next


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