GNU bug report logs - #48030
28.0.50; syntax evaluation in strings

Previous Next

Package: emacs;

Reported by: markusffm <at> fn.de

Date: Mon, 26 Apr 2021 08:57:02 UTC

Severity: normal

Tags: notabug

Found in version 28.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.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 48030 in the body.
You can then email your comments to 48030 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#48030; Package emacs. (Mon, 26 Apr 2021 08:57:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to markusffm <at> fn.de:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 26 Apr 2021 08:57:02 GMT) Full text and rfc822 format available.

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

From: markusffm <at> fn.de
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; syntax evaluation in strings
Date: Mon, 26 Apr 2021 08:56:04 GMT
[Message part 1 (text/plain, inline)]
                      defining a function:
(defun xxx-insert()
"anything" 
(interactive)
(insert "# Local Variables:\n")
(insert "# mode: org\n")
(insert "# End:\n")
)
will cause Emacs to disregard the Emacs-lisp-mode after re-opening the file, hence no syntax
evaluation anymore
Changing (insert "# Local Variables:\n") to (insert "# Local Bariables:\n") will 'solve' the problem.
Note: exactly the same behaviour invoking emacs with -Q

In GNU Emacs 28.0.50 (build 58, x86_64-pc-linux-gnu, GTK+ Version 3.24.28, cairo version 1.16.0)
of 2021-04-26 built on XYZ
Repository revision: 50f29f6a282b7426377be5fb54322fc5b5a487fc
Repository branch: master
Windowing system distributor 'Fedora Project', version 11.0.12011000
System Description: Fedora 33 (Thirty Three)
Configured using:
'configure --prefix=/opt/emacs --sysconfdir=/etc
--enable-locallisppath=/usr/local/share/emacs/site-lisp
--libexecdir=/opt/emacs/lib/ --localstatedir=/usr/local/var
--enable-largefile --with-x-toolkit=gtk3 --with-modules --with-xwidgets
--without-pop --without-selinux --without-gnutls
--with-file-notification=yes --with-json --with-cairo
'CFLAGS=-march=native -Os''
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GPM GSETTINGS HARFBUZZ JPEG JSON
LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG
RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM
XWIDGETS GTK3 ZLIB
Important settings:
value of $LANG: en_US.utf8
value of $XMODIFIERS: @im=none
locale-coding-system: utf-8-unix
Major mode: ELisp/d
Minor modes in effect:
show-paren-mode: t
recentf-mode: t
desktop-save-mode: 1
global-hl-line-mode: t
hl-line-mode: t
delete-selection-mode: t
cua-mode: t
flymake-mode: t
savehist-mode: t
global-auto-revert-mode: t
auto-insert-mode: t
tabbar-mwheel-mode: t
tabbar-mode: t
smooth-scroll-mode: t
auto-complete-mode: t
global-undo-tree-mode: t
undo-tree-mode: t
save-place-mode: t
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
electric-quote-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
global-prettify-symbols-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
size-indication-mode: t
column-number-mode: t
line-number-mode: t
global-visual-line-mode: t
visual-line-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug sendmail ol-eww eww xdg url-queue mm-url
ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search eieio-opt
speedbar ezimage dframe gnus-art mm-uu mml2015 mm-view mml-smime smime
dig gnus-sum shr kinsoku svg dom browse-url gnus-group gnus-undo
gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7
netrc nnoo parse-time gnus-spec gnus-int gnus-range message rmc puny
rfc822 mml mml-sec epa epg epg-config mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win gnus
nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums
mail-utils mm-util mail-prsvr ol-docview doc-view jka-compr image-mode
exif dired-sort-menu dired dired-loaddefs ol-bibtex bibtex iso8601
ol-bbdb ol-w3m pp default-daemon server executable cl-extra misearch
multi-isearch cursor-sensor ffap checkdoc lisp-mnt help-mode
user-profile default-gnus contrib/chartables powerline
powerline-separators powerline-themes default-profile default-ui paren
man recentf vc-dispatcher vc-svn desktop frameset avoid hl-line
default-faces default-keymap delsel cua-base facemenu default-run
default-restart default-modes default-platform default-unix
default-flymake default-flymake-go default-flymake-csharp
default-flymake-ruby default-flymake-js default-flymake-py
default-flymake-java default-flymake-shell flymake-proc flymake compile
text-property-search warnings default-run-assoc run-assoc default-tempo
default-tempo-rexx default-tempo-sh default-tempo-pas default-tempo-js
default-tempo-java default-tempo-perl default-tempo-elisp
default-tempo-c-cpp default-menu default-help default-options
default-tools default-search default-format default-view
aquamacs-cmm-menu default-edit default-file default-generic savehist
autorevert filenotify autoinsert default-functions default-autoload
nf-procmail-mode ox-man ox-odt rng-loc rng-uri rng-parse rng-match
rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util
ox-latex ox-icalendar ox-html table ox-ascii ox-publish ox org-element
org ob ob-tangle ob-ref ob-lob ob-table org-macro org-footnote org-src
ob-comint org-pcomplete pcomplete comint ansi-color ring org-list
org-faces org-entities time-date org-version ob-emacs-lisp org-table
org-keys org-loaddefs find-func cal-menu calendar cal-loaddefs avl-tree
generator ol ob-exp ob-core org-compat ob-eval org-macs format-spec
markdown-mode rx thingatpt noutline outline easy-mmode jison-mode
bison-mode cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align
cc-engine cc-vars cc-defs flex-mode derived aquamacs-tabbar cus-load
aquamacs-tools tabbar restore-last-frame-size org-bullets syslog-mode
hide-lines web-mode disp-table vimrc-mode go-autocomplete
go-mode-autoloads neotree advice smooth-scroll aok fill-column-indicator
tempbuf auto-complete-config auto-complete edmacro kmacro undo-tree diff
multi-shell windata tree-mode tree-widget wid-edit imenu imenu-tree
tempo saveplace google-translate google-translate-default-ui
google-translate-core-ui color popup ido google-translate-core
google-translate-tk google-translate-backend url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache url-vars mailcap cl-loaddefs cl-lib json subr-x map seq
byte-opt gv bytecomp byte-compile cconv eol-conversion default-path
iso-transl 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 replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer 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
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads
xwidget-internal dbusbind inotify dynamic-setting system-font-setting
font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)
Memory information:
((conses 16 327973 299086)
(symbols 48 32950 2)
(strings 32 117560 25908)
(string-bytes 1 4009819)
(vectors 16 61069)
(vector-slots 8 1342703 309626)
(floats 8 464 2216)
(intervals 56 813 716)
(buffers 992 16))    


[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48030; Package emacs. (Mon, 26 Apr 2021 09:21:02 GMT) Full text and rfc822 format available.

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

From: Gregory Heytings <gregory <at> heytings.org>
To: markusffm <at> fn.de
Cc: 48030 <at> debbugs.gnu.org
Subject: Re: bug#48030: 28.0.50; syntax evaluation in strings
Date: Mon, 26 Apr 2021 09:20:09 +0000
> 
> defining a function:
> (defun xxx-insert()
> "anything"
> (interactive)
> (insert "# Local Variables:\n")
> (insert "# mode: org\n")
> (insert "# End:\n")
> )

> will cause Emacs to disregard the Emacs-lisp-mode after re-opening the 
> file, hence no syntax evaluation anymore Changing (insert "# Local 
> Variables:\n") to (insert "# Local Bariables:\n") will 'solve' the 
> problem.
>

Thanks for your bug report.  As far as I can see, this is not a bug, when 
enable-local-variables is t (the default), Emacs searches for the the 
string "Local Variables" string near the end of the buffer, and interprets 
what follows as file-local variable settings.

This is not what you want if "Local Variables" is inside a literal string, 
but detecting that specific case would be cumbersome I think.  I would 
suggest that you replace (insert "# Local Variables:\n") by (insert "# 
Local " "Variables:\n"), with two additional quotation marks between Local 
and Variables.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48030; Package emacs. (Tue, 27 Apr 2021 04:11:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Gregory Heytings <gregory <at> heytings.org>
Cc: 48030 <at> debbugs.gnu.org, markusffm <at> fn.de
Subject: Re: bug#48030: 28.0.50; syntax evaluation in strings
Date: Tue, 27 Apr 2021 06:10:32 +0200
Gregory Heytings <gregory <at> heytings.org> writes:

> This is not what you want if "Local Variables" is inside a literal
> string, but detecting that specific case would be cumbersome I think.
> I would suggest that you replace (insert "# Local Variables:\n") by
> (insert "# Local " "Variables:\n"), with two additional quotation
> marks between Local and Variables.

Yup.  So I agree that this isn't a bug, and I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) notabug. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 27 Apr 2021 04:11:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 48030 <at> debbugs.gnu.org and markusffm <at> fn.de Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 27 Apr 2021 04:11:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 25 May 2021 11:24:05 GMT) Full text and rfc822 format available.

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

Previous Next


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