unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#28396: 26.0.50; display-line-numbers not saved by Save Options
@ 2017-09-09 10:04 Eli Zaretskii
  2017-11-22  0:44 ` Glenn Morris
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2017-09-09 10:04 UTC (permalink / raw)
  To: 28396

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))





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#28396: 26.0.50; display-line-numbers not saved by Save Options
  2017-09-09 10:04 bug#28396: 26.0.50; display-line-numbers not saved by Save Options Eli Zaretskii
@ 2017-11-22  0:44 ` Glenn Morris
  2017-11-22  1:18   ` Glenn Morris
  2017-11-22  3:34   ` Eli Zaretskii
  0 siblings, 2 replies; 4+ messages in thread
From: Glenn Morris @ 2017-11-22  0:44 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 28396

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.





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#28396: 26.0.50; display-line-numbers not saved by Save Options
  2017-11-22  0:44 ` Glenn Morris
@ 2017-11-22  1:18   ` Glenn Morris
  2017-11-22  3:34   ` Eli Zaretskii
  1 sibling, 0 replies; 4+ messages in thread
From: Glenn Morris @ 2017-11-22  1:18 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 28396

Glenn Morris wrote:

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

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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#28396: 26.0.50; display-line-numbers not saved by Save Options
  2017-11-22  0:44 ` Glenn Morris
  2017-11-22  1:18   ` Glenn Morris
@ 2017-11-22  3:34   ` Eli Zaretskii
  1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2017-11-22  3:34 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 28396

> From: Glenn Morris <rgm@gnu.org>
> Cc: 28396@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?





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-22  3:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-09 10:04 bug#28396: 26.0.50; display-line-numbers not saved by Save Options Eli Zaretskii
2017-11-22  0:44 ` Glenn Morris
2017-11-22  1:18   ` Glenn Morris
2017-11-22  3:34   ` Eli Zaretskii

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).