[Top][All Lists]

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

[debbugs-tracker] bug#23460: closed (25.1.50; Strange behavior in local

From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#23460: closed (25.1.50; Strange behavior in local variables like start-comment)
Date: Fri, 06 May 2016 19:25:02 +0000

Your message dated Fri, 6 May 2016 19:24:14 +0000
with message-id <address@hidden>
and subject line Re: bug#23463: safe local variable properties no longer 
has caused the debbugs.gnu.org bug report #23463,
regarding 25.1.50; Strange behavior in local variables like start-comment
to be marked as done.

(If you believe you have received this mail in error, please contact

23463: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23463
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 25.1.50; Strange behavior in local variables like start-comment Date: Thu, 05 May 2016 20:35:04 +0000
--text follows this line--

It looks like after the recent commit ( http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=25f455815bfaa868dc470d445413df9a7a546c46 ), the buffer local variables like comment-start are behaving strangely. They commentarily go to a value of nil (or their default value?) and then back to the buffer local value in the current buffer.

I discovered this issue as I am using outshine package and in one of the functions in there, a check is put to ensure that comment-start is not nil: https://github.com/tj64/outshine/blob/73ae2c2ea24001338dbeff5137f09bb5f784f12c/outshine.el#L1105-L1108

Surprisingly, my *Messages* buffer started showing the "Cannot calculate outcommented outline-regexp without 'comment-start' character defined!" message. But I was working in a shell-script-mode buffer and comment-start IS defined: "# ". I even verified doing C-h v comment-start that that actually was the case. 

I then realized that I saw that message each time I reverted the buffer (or looked like each time the buffer's major mode hook was called (and that's why I suspect commit 25f4558.. to be the problem; please correct if that's wrong). I do not see this bug in emacs-25 branch build.

Here is a minimum working example to test this bug behavior in an emacs -Q session.

  (defun my/print-comment-start-value ()
    (let ((filler (if (null comment-start)
      "is undefined, it's value is:"
      (message (format "`comment-start' %s `%s'" filler comment-start))))
    (global-set-key (kbd "<f5>") (lambda () (interactive) (revert-buffer nil :noconfirm)))
    (global-set-key (kbd "<f6>") #'my/print-comment-start-value)

    (add-hook 'change-major-mode-hook #'my/print-comment-start-value))

(1) Evaluate the above in emacs -Q
(2) You would be in *scratch* buffer and that's alright
(3) Hit F5 couple of times and you should see
     ‘comment-start’ is undefined, it’s value is: ‘nil’
(4) Now hit F6 (which just prints the value of comment-start variable) and you will see
    ‘comment-start’ = ‘;’
(5) Isn't that strange?!

I have tested this only for comment-start. But I suspect this might affect buffer local vars in general?

In GNU Emacs (x86_64-unknown-linux-gnu, GTK+ Version 2.24.23)
 of 2016-05-05 built on ...
Repository revision: 67fa7f13d499eb5fc1d697da6c636b20728da22f
Windowing system distributor 'The X.Org Foundation', version 11.0.60900000
System Description: Red Hat Enterprise Linux Workstation release 6.6 (Santiago)

Configured using:
 'configure --with-modules
 'CPPFLAGS=-fgnu89-inline -I/home/kmodi/usr_local/6/include
 -I/usr/include/freetype2 -I/usr/include' 'CFLAGS=-O2 -march=native'
 'LDFLAGS=-L/home/kmodi/usr_local/6/lib -L/home/kmodi/usr_local/6/lib64'

Configured features:

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  diff-auto-refine-mode: t
  tooltip-mode: t
  global-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

Recent messages:
‘comment-start’ is undefined, it’s value is: ‘nil’
‘comment-start’ = ‘;’
‘comment-start’ is undefined, it’s value is: ‘nil’
‘comment-start’ = ‘;’
‘comment-start’ is undefined, it’s value is: ‘nil’
‘comment-start’ = ‘;’ [2 times]
‘comment-start’ is undefined, it’s value is: ‘nil’
‘comment-start’ = ‘;’ [4 times]
‘comment-start’ is undefined, it’s value is: ‘nil’
Mark set [2 times]

Load-path shadows:
None found.

(shadow sort mail-extr emacsbug message puny seq byte-opt gv bytecomp
byte-compile cl-extra cconv dired dired-loaddefs format-spec rfc822 mml
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 edmacro kmacro dabbrev thingatpt help-fns
help-mode cl-loaddefs pcase cl-lib misearch multi-isearch vc-git
diff-mode easymenu easy-mmode time-date mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow 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 charscript 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 dbusbind inotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 106397 10580)
 (symbols 48 21437 0)
 (miscs 40 69 299)
 (strings 32 20571 5469)
 (string-bytes 1 636526)
 (vectors 16 14269)
 (vector-slots 8 449017 7199)
 (floats 8 192 484)
 (intervals 56 1492 352)
 (buffers 976 14)
 (heap 1024 17132 609))


Kaushal Modi

--- End Message ---
--- Begin Message --- Subject: Re: bug#23463: safe local variable properties no longer effective Date: Fri, 6 May 2016 19:24:14 +0000 User-agent: Mutt/1.5.24 (2015-08-30)
Bug fixed in master branch.

Alan Mackenzie (Nuremberg, Germany).

--- End Message ---

reply via email to

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