GNU bug report logs - #45686
28.0.50; Could minibuf-eldef-setup-minibuffer inhibit modifications hooks, please?

Previous Next

Package: emacs;

Reported by: Omar Antolín Camarena <omar <at> matem.unam.mx>

Date: Wed, 6 Jan 2021 00:27:02 UTC

Severity: normal

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 45686 in the body.
You can then email your comments to 45686 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#45686; Package emacs. (Wed, 06 Jan 2021 00:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Omar Antolín Camarena <omar <at> matem.unam.mx>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 06 Jan 2021 00:27:02 GMT) Full text and rfc822 format available.

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

From: Omar Antolín Camarena <omar <at> matem.unam.mx>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; Could minibuf-eldef-setup-minibuffer inhibit modifications
 hooks, please?
Date: Tue, 05 Jan 2021 18:25:47 -0600
I'd like it if minibuf-eldef-setup-minibuffer was wrapped in

(let ((inhibit-modification-hooks t))
  ...)

In case that minibuffer-eldef-shorten-default is set to t,
minibuf-eldef-setup-minibuffer will modify the minibuffer contents
temporarily, but I don't think this modification should count. What do
people here think?

Now, I may be wrong about this, and also there maybe a better way to
solve my problem, so let me briefly explain it.

For every time the minibuffer is opened, I want to do something the
first time the minibuffer-contents change (basically pop up something
like a *Completions* buffer). What I'm currently doing is this:

(defun wait-for-a-change ()
  (remove-hook 'after-change-functions 'wait-for-a-change t)
  (do-the-thing-I-want))

(defun setup-to-do-the-thing-after-a-change ()
  (when minibuffer-completion-table
    (add-hook 'after-change-functions #'wait-for-a-change nil t)))

(add-hook 'minibuffer-setup-hook #'setup-to-do-the-thing-after-a-change)

This works fabulously except if I use

(setq minibuffer-eldef-shorten-default t)
(minibuffer-electric-default-mode)

Because if the minibuffer prompt does have a default, and it gets
shortened, the shortening triggers after-change-functions even though
the user hasn't typed anything at the minibuffer. So that's why I want
minibuf-eldef-setup-minibuffer to inhibit modification hooks, but if
there's a reason it shouldn't or a better way to solve my problem, I
would love to hear it.

For now, I just add this to my configuration, so my problem is actually
solved already:

(defun stealthily (fn &rest args)
  (let ((inhibit-modification-hooks t))
    (apply fn args)))
    
(advice-add 'minibuf-eldef-setup-minibuffer :around #'stealthily)

Thanks in advance!

--
Omar Antolín Camarena


In GNU Emacs 28.0.50 (build 1, x86_64-w64-mingw32)
 of 2019-12-28 built on W550S
Windowing system distributor 'Microsoft Corp.', version 10.0.19041
System Description: Microsoft Windows 10 Home (v10.0.2004.19041.685)

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Composing main Info directory...done
Making completion list... [2 times]
Quit
Configured using:
 'configure --without-compress-install --without-dbus --with-modules
 'CFLAGS=-O2 -g3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY W32NOTIFY ACL GNUTLS LIBXML2
HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS JSON PDUMPER LCMS2 GMP

Important settings:
  value of $LANG: en_US
  locale-coding-system: cp1252

Major mode: Emacs-Lisp

Minor modes in effect:
  show-paren-mode: t
  electric-pair-mode: t
  beginend-global-mode: t
  beginend-prog-mode: t
  global-dot-mode: t
  dot-mode: t
  consult-preview-mode: t
  marginalia-mode: t
  minibuffer-electric-default-mode: t
  minibuffer-depth-indicate-mode: t
  override-global-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-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:
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ox hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ox
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ox-texinfo hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ox-texinfo
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ox-publish hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ox-publish
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ox-org hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ox-org
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ox-odt hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ox-odt
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ox-md hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ox-md
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ox-man hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ox-man
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ox-latex hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ox-latex
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ox-icalendar hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ox-icalendar
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ox-html hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ox-html
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ox-beamer hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ox-beamer
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ox-ascii hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ox-ascii
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-version hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-version
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-timer hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-timer
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-tempo hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-tempo
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-table hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-table
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-src hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-src
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-protocol hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-protocol
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-plot hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-plot
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-pcomplete hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-pcomplete
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-num hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-num
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-mouse hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-mouse
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-mobile hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-mobile
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-macs hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-macs
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-macro hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-macro
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-loaddefs hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-loaddefs
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-list hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-list
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-lint hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-lint
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-keys hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-keys
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-install hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-install
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-inlinetask hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-inlinetask
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-indent hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-indent
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-id hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-id
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-habit hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-habit
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-goto hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-goto
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-footnote hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-footnote
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-feed hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-feed
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-faces hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-faces
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-entities hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-entities
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-element hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-element
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-duration hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-duration
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-datetree hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-datetree
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-ctags hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-ctags
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-crypt hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-crypt
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-compat hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-compat
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-colview hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-colview
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-clock hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-clock
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-capture hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-capture
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-attach hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-attach
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-attach-git hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-attach-git
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-archive hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-archive
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/org-agenda hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/org-agenda
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ol hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ol
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ol-w3m hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ol-w3m
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ol-rmail hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ol-rmail
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ol-mhe hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ol-mhe
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ol-irc hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ol-irc
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ol-info hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ol-info
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ol-gnus hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ol-gnus
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ol-eww hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ol-eww
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ol-eshell hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ol-eshell
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ol-docview hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ol-docview
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ol-bibtex hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ol-bibtex
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ol-bbdb hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ol-bbdb
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-vala hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-vala
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-tangle hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-tangle
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-table hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-table
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-stan hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-stan
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-sqlite hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-sqlite
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-sql hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-sql
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-shen hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-shen
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-shell hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-shell
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-sed hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-sed
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-screen hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-screen
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-scheme hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-scheme
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-sass hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-sass
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-ruby hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-ruby
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-ref hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-ref
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-R hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-R
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-python hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-python
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-processing hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-processing
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-plantuml hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-plantuml
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-picolisp hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-picolisp
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-perl hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-perl
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-org hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-org
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-octave hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-octave
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-ocaml hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-ocaml
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-mscgen hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-mscgen
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-maxima hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-maxima
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-matlab hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-matlab
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-makefile hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-makefile
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-lua hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-lua
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-lob hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-lob
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-lisp hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-lisp
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-lilypond hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-lilypond
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-ledger hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-ledger
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-latex hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-latex
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-js hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-js
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-java hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-java
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-J hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-J
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-io hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-io
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-hledger hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-hledger
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-haskell hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-haskell
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-groovy hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-groovy
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-gnuplot hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-gnuplot
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-fortran hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-fortran
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-forth hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-forth
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-exp hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-exp
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-eval hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-eval
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-eshell hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-eshell
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-emacs-lisp hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-emacs-lisp
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-ebnf hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-ebnf
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-dot hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-dot
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-ditaa hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-ditaa
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-css hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-css
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-core hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-core
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-coq hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-coq
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-comint hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-comint
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-clojure hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-clojure
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-calc hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-calc
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-C hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-C
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-awk hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-awk
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-asymptote hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-asymptote
c:/Users/Omar/.emacs.d/elpa/org-plus-contrib-20210104/ob-abc hides c:/Users/Omar/emax64/share/emacs/28.0.50/lisp/org/ob-abc

Features:
(shadow sort bbdb-message mailalias bbdb-mua bbdb-com bbdb bbdb-site
timezone mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml mml-sec epa derived epg epg-config gnus-util
rmail rmail-loaddefs time-date mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils vc-git diff-mode mule-util
misc-text email-config markdown-mode rx color pdf-loader paren elec-pair
ace-link avy beginend dot-mode consult-selectrum selectrum crm consult
recentf tree-widget wid-edit noutline outline compile comint ansi-color
ring bookmark text-property-search pp marginalia embark ffap thingatpt
icomplete orderless minibuf-eldef mb-depth block-undo imenu
modus-vivendi-theme modus-operandi-theme modus-themes edmacro kmacro
diminish cl-extra help-mode use-package use-package-ensure
use-package-delight use-package-diminish use-package-bind-key bind-key
use-package-core finder-inf tex-site easy-mmode slime-autoloads info
package easymenu browse-url url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map
url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib
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 tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu 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 loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads w32notify w32 lcms2 multi-tty make-network-process
emacs)

Memory information:
((conses 16 375705 14940)
 (symbols 48 22649 1)
 (strings 32 99561 4661)
 (string-bytes 1 2716752)
 (vectors 16 30045)
 (vector-slots 8 378738 16374)
 (floats 8 237 101)
 (intervals 56 914 216)
 (buffers 1000 15))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45686; Package emacs. (Sun, 10 Jan 2021 14:44:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Omar Antolín Camarena <omar <at> matem.unam.mx>
Cc: 45686 <at> debbugs.gnu.org
Subject: Re: bug#45686: 28.0.50; Could minibuf-eldef-setup-minibuffer
 inhibit modifications hooks, please?
Date: Sun, 10 Jan 2021 15:43:25 +0100
Omar Antolín Camarena <omar <at> matem.unam.mx> writes:

> I'd like it if minibuf-eldef-setup-minibuffer was wrapped in
>
> (let ((inhibit-modification-hooks t))
>   ...)

[...]

> This works fabulously except if I use
>
> (setq minibuffer-eldef-shorten-default t)
> (minibuffer-electric-default-mode)
>
> Because if the minibuffer prompt does have a default, and it gets
> shortened, the shortening triggers after-change-functions even though
> the user hasn't typed anything at the minibuffer. So that's why I want
> minibuf-eldef-setup-minibuffer to inhibit modification hooks, but if
> there's a reason it shouldn't or a better way to solve my problem, I
> would love to hear it.

Well, I could see others wanting to trigger something on these
modifications, too, so I'm not sure inhibiting these specific
modifications from running the hooks would be a good general solution.
And as you say:

> For now, I just add this to my configuration, so my problem is actually
> solved already:
>
> (defun stealthily (fn &rest args)
>   (let ((inhibit-modification-hooks t))
>     (apply fn args)))
>
> (advice-add 'minibuf-eldef-setup-minibuffer :around #'stealthily)

That looks like the correct solution for your use case?

Anybody else got an opinion here?

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45686; Package emacs. (Sun, 10 Jan 2021 14:58:01 GMT) Full text and rfc822 format available.

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

From: Omar Antolín Camarena <omar <at> matem.unam.mx>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 45686 <at> debbugs.gnu.org
Subject: Re: bug#45686: 28.0.50; Could minibuf-eldef-setup-minibuffer
 inhibit modifications hooks, please?
Date: Sun, 10 Jan 2021 08:57:23 -0600
> Well, I could see others wanting to trigger something on these
> modifications, too, so I'm not sure inhibiting these specific
> modifications from running the hooks would be a good general solution.

I cannot imagine anyone wanting to trigger something when eldef shortens
the prompt! But that could easily be a lack of imagination on my part. :)

I think my problem is that I'm wrong about what after-change-functions
is for. I thought it was supposed to trigger when the buffer changes due
to direct user actions, but the documentation says "after every change",
not "after user-initiated changes" or something like that. Maybe I just
need to re-adjust my expectations of when that hook runs.

> That looks like the correct solution for your use case?

Seems so.

> Anybody else got an opinion here?

I'd be interested to read other opinions, particularly if someone has a
useful example of triggering something to happen when eldef shortens the
prompt (since a single example would increase my powers of imagination!).

-- 
Omar




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45686; Package emacs. (Fri, 04 Jun 2021 10:27:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Omar Antolín Camarena <omar <at> matem.unam.mx>
Cc: 45686 <at> debbugs.gnu.org
Subject: Re: bug#45686: 28.0.50; Could minibuf-eldef-setup-minibuffer
 inhibit modifications hooks, please?
Date: Fri, 04 Jun 2021 12:26:42 +0200
Omar Antolín Camarena <omar <at> matem.unam.mx> writes:

>> That looks like the correct solution for your use case?
>
> Seems so.
>
>> Anybody else got an opinion here?
>
> I'd be interested to read other opinions, particularly if someone has a
> useful example of triggering something to happen when eldef shortens the
> prompt (since a single example would increase my powers of imagination!).

It didn't seem like anybody had any opinions here...  My feeling is that
the current system has the flexibility needed for different use cases,
and as you demonstrated in your example, you can work with the current
system to make it do what you want it to.

So I don't think we should change anything here, and I'm therefore
closing this bug report.  If others think that this is something that
should be revised, please respond to the debbugs address and we'll reopen.

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




bug closed, send any further explanations to 45686 <at> debbugs.gnu.org and Omar Antolín Camarena <omar <at> matem.unam.mx> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 04 Jun 2021 10:27: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. (Fri, 02 Jul 2021 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 270 days ago.

Previous Next


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