unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#73872: 30.0.91; emacs-lisp-mode-syntax-table active when calling `describe-variable' on variable with textually large value.
@ 2024-10-18 22:14 Sigurd Dam Sonniks
  2024-11-02 11:55 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Sigurd Dam Sonniks @ 2024-10-18 22:14 UTC (permalink / raw)
  To: 73872

[-- Attachment #1: Type: text/plain, Size: 7869 bytes --]

Hello Emacs folks!

When you call `describle-variable' on a variable with a value that's
large enough that it's moved to the end of the help buffer, the syntax
table is changed to `emacs-lisp-mode-syntax-table' but never changed
back. There is a very easy fix where you just set it back to
`help-mode-syntax-table' at the end of the enclosing
`with-current-buffer', but I guess you could also switch to a
temporary buffer instead. Below is the relevant code snippet with the
first suggested fix applied.

;; If the value is large, move it to the end.
(with-current-buffer standard-output
      (when (> (count-lines (point-min) (point-max)) 10)
            ;; Note that setting the syntax table like below
            ;; makes forward-sexp move over a `'s' at the end
            ;; of a symbol.
            (set-syntax-table emacs-lisp-mode-syntax-table)
            (goto-char val-start-pos)
            (when (looking-at "value is") (replace-match ""))
            (save-excursion
              (insert "\n\nValue:")
      (setq-local help-button-cache (point-marker)))
            (insert "value is shown ")
            (insert-button "below"
                               'action help-button-cache
                               'follow-link t
                               'help-echo "mouse-2, RET: show value")
            (insert ".\n")
    (set-syntax-table help-mode-syntax-table)))


Thank you very much for all your work. I absolutely adore Emacs.

Kind regards,
Sigurd Dam Sonniks

In GNU Emacs 30.0.91 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
version 1.18.2, Xaw3d scroll bars)
Windowing system distributor 'The X.Org Foundation', version 11.0.12101013
System Description: NixOS 24.11 (Vicuna)

Configured using:
 'configure
 --prefix=/nix/store/6qc388fy8gl95smi8q0az92d558nkp4k-emacs-30.0.91
 --disable-build-details --with-modules --with-x-toolkit=lucid
 --with-cairo --with-xft --with-compress-install
 --with-toolkit-scroll-bars --with-native-compilation
 --without-imagemagick --with-mailutils --without-small-ja-dic
 --with-tree-sitter --with-xinput2 --without-xwidgets --with-dbus
 --with-selinux'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XAW3D XDBE XIM XINPUT2 XPM
LUCID ZLIB

Important settings:
  value of $EMACSLOADPATH: /nix/store/ml4x8pxvz40klw1yabgbjrrpjxlgbbb0-emacs-packages-deps/share/emacs/site-lisp:
  value of $EMACSNATIVELOADPATH: /nix/store/ml4x8pxvz40klw1yabgbjrrpjxlgbbb0-emacs-packages-deps/share/emacs/native-lisp:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-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
  minibuffer-regexp-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/nix/store/ml4x8pxvz40klw1yabgbjrrpjxlgbbb0-emacs-packages-deps/share/emacs/site-lisp/elpa/external-completion-0.1/external-completion hides /nix/store/6qc388fy8gl95smi8q0az92d558nkp4k-emacs-30.0.91/share/emacs/30.0.91/lisp/external-completion
/nix/store/ml4x8pxvz40klw1yabgbjrrpjxlgbbb0-emacs-packages-deps/share/emacs/site-lisp/elpa/jsonrpc-1.0.25/jsonrpc hides /nix/store/6qc388fy8gl95smi8q0az92d558nkp4k-emacs-30.0.91/share/emacs/30.0.91/lisp/jsonrpc
/nix/store/ml4x8pxvz40klw1yabgbjrrpjxlgbbb0-emacs-packages-deps/share/emacs/site-lisp/elpa/transient-20240819.1250/transient hides /nix/store/6qc388fy8gl95smi8q0az92d558nkp4k-emacs-30.0.91/share/emacs/30.0.91/lisp/transient
/nix/store/ml4x8pxvz40klw1yabgbjrrpjxlgbbb0-emacs-packages-deps/share/emacs/site-lisp/elpa/eglot-1.17/eglot hides /nix/store/6qc388fy8gl95smi8q0az92d558nkp4k-emacs-30.0.91/share/emacs/30.0.91/lisp/progmodes/eglot
/nix/store/ml4x8pxvz40klw1yabgbjrrpjxlgbbb0-emacs-packages-deps/share/emacs/site-lisp/elpa/project-0.11.1/project hides /nix/store/6qc388fy8gl95smi8q0az92d558nkp4k-emacs-30.0.91/share/emacs/30.0.91/lisp/progmodes/project
/nix/store/ml4x8pxvz40klw1yabgbjrrpjxlgbbb0-emacs-packages-deps/share/emacs/site-lisp/elpa/xref-1.7.0/xref hides /nix/store/6qc388fy8gl95smi8q0az92d558nkp4k-emacs-30.0.91/share/emacs/30.0.91/lisp/progmodes/xref
/nix/store/ml4x8pxvz40klw1yabgbjrrpjxlgbbb0-emacs-packages-deps/share/emacs/site-lisp/elpa/flymake-1.3.7/flymake hides /nix/store/6qc388fy8gl95smi8q0az92d558nkp4k-emacs-30.0.91/share/emacs/30.0.91/lisp/progmodes/flymake
/nix/store/ml4x8pxvz40klw1yabgbjrrpjxlgbbb0-emacs-packages-deps/share/emacs/site-lisp/elpa/compat-30.0.0.0/compat hides /nix/store/6qc388fy8gl95smi8q0az92d558nkp4k-emacs-30.0.91/share/emacs/30.0.91/lisp/emacs-lisp/compat
/nix/store/ml4x8pxvz40klw1yabgbjrrpjxlgbbb0-emacs-packages-deps/share/emacs/site-lisp/elpa/seq-2.24/seq hides /nix/store/6qc388fy8gl95smi8q0az92d558nkp4k-emacs-30.0.91/share/emacs/30.0.91/lisp/emacs-lisp/seq
/nix/store/ml4x8pxvz40klw1yabgbjrrpjxlgbbb0-emacs-packages-deps/share/emacs/site-lisp/elpa/eldoc-1.15.0/eldoc hides /nix/store/6qc388fy8gl95smi8q0az92d558nkp4k-emacs-30.0.91/share/emacs/30.0.91/lisp/emacs-lisp/eldoc

Features:
(mailalias rmail auth-source cl-seq eieio eieio-core cl-macs icons json
map byte-opt gv bytecomp byte-compile thingatpt help-fns radix-tree
help-mode pp shadow sort mail-extr emacsbug message mailcap yank-media
puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived
epg rfc6068 epg-config gnus-util text-property-search time-date subr-x
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils rmc iso-transl tooltip cconv eldoc paren
electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset
image regexp-opt fringe tabulated-list replace newcomment text-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 nadvice seq simple cl-generic
indonesian philippine 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 emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify
dynamic-setting system-font-setting font-render-setting cairo x-toolkit
xinput2 x multi-tty move-toolbar make-network-process native-compile
emacs)

Memory information:
((conses 16 83734 22304) (symbols 48 7341 9) (strings 32 24215 2414)
 (string-bytes 1 761000) (vectors 16 14459)
 (vector-slots 8 178912 15298) (floats 8 32 11) (intervals 56 330 0)
 (buffers 992 12))

[-- Attachment #2: Type: text/html, Size: 22333 bytes --]

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

end of thread, other threads:[~2024-12-21 15:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-18 22:14 bug#73872: 30.0.91; emacs-lisp-mode-syntax-table active when calling `describe-variable' on variable with textually large value Sigurd Dam Sonniks
2024-11-02 11:55 ` Eli Zaretskii
     [not found]   ` <jwvsertuche.fsf-monnier+emacs@gnu.org>
2024-11-30  9:49     ` Eli Zaretskii
     [not found]       ` <DBAP195MB104976F58C31051E74A4F05CB92B2@DBAP195MB1049.EURP195.PROD.OUTLOOK.COM>
     [not found]         ` <jwvh67nvuta.fsf-monnier+emacs@gnu.org>
2024-12-07 13:10           ` Eli Zaretskii
2024-12-21  9:12             ` Eli Zaretskii
2024-12-21 15:10             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

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