Subject: bug#70010: 30.0.50; completion-preview-mode behaves mode-local, but is global

From: Philip Kaludercic <[email-masked]>
Date: Tue, 26 Mar 2024 11:10:02 +0000

I tried to enable `completion-preview-mode' by adding

  (setopt completion-preview-mode t)

in my init, but it had not effect.  When I check the implementation, I
noticed that it modifies `post-command-hook' locally.  I think it would
make sense to rename the current `completion-preview-mode' to
`completion-preview-local-mode', and then use
`define-globalized-minor-mode' to define `completion-preview-mode'.

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.41, cairo version 1.18.0) of 2024-03-14 built on peregrine
Repository revision: f68765a2ca12362f9e3971c4c743fb3dc9c3ea13
Repository branch: master
System Description: Fedora Linux 39 (Workstation Edition)

Configured using:
 'configure --with-pgtk --with-native-compilation=aot
 --with-imagemagick'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ
IMAGEMAGICK JPEG JSON LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3
THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM GTK3 ZLIB

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

Major mode: Lisp Interaction

Minor modes in effect:
  completion-preview-mode: t
  rcirc-track-minor-mode: t
  flyspell-mode: t
  flymake-mode: t
  outline-minor-mode: t
  yas-minor-mode: t
  repeat-mode: t
  display-battery-mode: t
  rcirc-sqlite-log-mode: t
  display-time-mode: t
  diff-hl-flydiff-mode: t
  diff-hl-mode: t
  winner-mode: t
  windmove-mode: t
  electric-pair-mode: t
  recentf-mode: t
  save-place-mode: t
  savehist-mode: t
  pixel-scroll-precision-mode: t
  pixel-scroll-mode: t
  xterm-mouse-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tab-bar-mode: t
  file-name-shadow-mode: t
  context-menu-mode: t
  global-font-lock-mode: t
  font-lock-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:
~/.config/emacs/site-lisp/.auto-site hides /home/phi/.config/emacs/site-lisp/dot-mode/.auto-site
~/.config/emacs/site-lisp/.auto-site hides /home/phi/.config/emacs/site-lisp/company-coq/.auto-site
~/.config/emacs/site-lisp/.auto-site hides /home/phi/.config/emacs/site-lisp/clang-capf/.auto-site
~/.config/emacs/site-lisp/.auto-site hides /home/phi/.config/emacs/site-lisp/0x0/.auto-site
/home/phi/.config/emacs/site-lisp/package-lint/package-lint hides /home/phi/.config/emacs/elpa/package-lint-0.21/package-lint
/home/phi/.config/emacs/site-lisp/package-lint/package-lint-flymake hides /home/phi/.config/emacs/elpa/package-lint-0.21/package-lint-flymake
/home/phi/.config/emacs/site-lisp/shell-command+/shell-command+ hides /home/phi/.config/emacs/elpa/shell-command+/shell-command+
/home/phi/.config/emacs/site-lisp/shell-command+/shell-command+-tests hides /home/phi/.config/emacs/elpa/shell-command+/shell-command+-tests
~/.config/emacs/site-lisp/.auto-site hides /home/phi/.config/emacs/elpa/site-lisp/.auto-site
/home/phi/.config/emacs/elpa/ef-themes-1.6.0/theme-loaddefs hides /home/phi/.config/emacs/elpa/standard-themes-2.0.1/theme-loaddefs
/home/phi/.config/emacs/elpa/ef-themes-1.6.0/theme-loaddefs hides /home/phi/.config/emacs/elpa/sweeprolog-0.27.4/theme-loaddefs
/home/phi/.config/emacs/site-lisp/vc-backup/vc-backup hides /home/phi/.config/emacs/elpa/vc-backup-1.1.0/vc-backup
/home/phi/.config/emacs/elpa/transient-0.5.3/transient hides /home/phi/Source/emacs/lisp/transient
/home/phi/.config/emacs/elpa/ef-themes-1.6.0/theme-loaddefs hides /home/phi/Source/emacs/lisp/theme-loaddefs

Features:
(shadow emacsbug whitespace smerge-mode avy dictionary
dictionary-connection url-http url-gw url-cache url-auth eww url-queue
mm-url magit-utils crm dash nnselect gnus-search eieio-opt speedbar
ezimage dframe eglot external-completion jsonrpc compat ert imenu
sml-mode smie thai-util thai-word mule-util cl-print debug backtrace
pulse color help-fns bug-reference vc-git find-func typo mailalias
smtpmail quail writegood-mode ecomplete flow-fill slime apropos etags
fileloop generator xref arc-mode archive-mode hyperspec flymake-cc
macrostep-c cmacexp macrostep cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs dired-aux autorevert
filenotify gnus-dired mm-archive sort smiley gnus-cite mail-extr textsec
uni-scripts idna-mapping ucs-normalize uni-confusable textsec-check
gnus-async gnus-bcklg qp gnus-ml char-fold misearch multi-isearch
do-at-point hi-lock face-remap disp-table rcirc vc-backup copyright
nndraft nnmh utf-7 nnfolder epa-file network-stream nsm gnus-agent
gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu
mml2015 mm-view mml-smime smime gnutls dig nntp gnus-cache gnus-sum shr
pixel-fill kinsoku url-file svg dom gnus-group gnus-undo gnus-start
gnus-dbus gnus-cloud nnimap nnmail mail-source utf7 nnoo gnus-spec
gnus-int gnus-range message yank-media puny dired-x dired dired-loaddefs
rfc822 mml mml-sec epa epg rfc6068 epg-config mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win
flyspell ispell checkdoc flymake yasnippet-snippets yasnippet noutline
outline init repeat battery dbus xml shell-command+ thingatpt
rcirc-sqlite derived time sendmail rfc2047 rfc2045 ietf-drums gnus
nnheader gnus-util mail-utils range mm-util mail-prsvr diff-hl-flydiff
diff diff-hl log-view pcvs-util vc-dir ewoc vc vc-dispatcher diff-mode
hippie-exp winner windmove project finder-inf elec-pair tramp-cache
time-stamp recentf tree-widget saveplace tramp-sh tramp trampver
tramp-integration files-x tramp-message tramp-compat xdg shell pcomplete
parse-time iso8601 time-date format-spec tramp-loaddefs savehist
pixel-scroll cua-base xt-mouse cus-edit pp cus-load wid-edit .auto-site
compile text-property-search comint ansi-osc ansi-color ring easy-mmode
loaddefs-gen lisp-mnt radix-tree site-lisp setup ada-mode-autoloads
agda2-mode-autoloads auctex-autoloads tex-site autocrypt-autoloads
avy-autoloads bash-completion-autoloads buffer-env-autoloads
debbugs-autoloads diff-hl-autoloads do-at-point-autoloads
ef-themes-autoloads ellama-autoloads erlang-autoloads
flymake-proselint-autoloads focus-autoloads forth-mode-autoloads
geiser-gauche-autoloads geiser-autoloads gnat-compiler-autoloads
gnu-apl-mode-autoloads go-mode-autoloads haskell-mode-autoloads
htmlize-autoloads llm-autoloads lua-mode-autoloads magit-autoloads
git-commit-autoloads magit-section-autoloads dash-autoloads
markdown-mode-autoloads package-lint-autoloads proof-general-autoloads
proof-site proof-autoloads rcirc-sqlite-autoloads rust-mode-autoloads
setup-autoloads shell-command+-autoloads site-lisp-autoloads
slime-autoloads macrostep-autoloads sml-mode-autoloads spinner-autoloads
standard-themes-autoloads sweeprolog-autoloads transient-autoloads
tuareg-autoloads caml-autoloads typo-autoloads uniquify-files-autoloads
vc-backup-autoloads vc-fossil-autoloads wisi-autoloads info
with-editor-autoloads writegood-mode-autoloads
yasnippet-snippets-autoloads yasnippet-autoloads package browse-url url
url-proxy url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
auth-source eieio eieio-core password-cache json map byte-opt comp
cl-seq comp-cstr warnings comp-run comp-common rx cl-macs pcase subr-x
gv bytecomp byte-compile url-vars cl-extra help-mode icons cl-loaddefs
cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify
ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/pgtk-win
pgtk-win term/common-win pgtk-dnd 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 gtk pgtk multi-tty move-toolbar
make-network-process native-compile emacs)

Memory information:
((conses 16 1037371 161354) (symbols 48 35127 55)
 (strings 32 193482 17814) (string-bytes 1 5647670) (vectors 16 97175)
 (vector-slots 8 2053839 201081) (floats 8 802 7911)
 (intervals 56 37770 4439) (buffers 984 63))

-- 
	Philip Kaludercic on peregrine