GNU bug report logs - #79632
28.2; grep library not autoloading

Previous Next

Package: emacs;

Reported by: G B Reilly <hid_pbu <at> gbrmail.com>

Date: Wed, 15 Oct 2025 15:52:03 UTC

Severity: normal

Found in version 28.2

Done: Eli Zaretskii <eliz <at> gnu.org>

To reply to this bug, email your comments to 79632 AT debbugs.gnu.org.
There is no need to reopen the bug first.

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#79632; Package emacs. (Wed, 15 Oct 2025 15:52:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to G B Reilly <hid_pbu <at> gbrmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 15 Oct 2025 15:52:03 GMT) Full text and rfc822 format available.

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

From: G B Reilly <hid_pbu <at> gbrmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.2; grep library not autoloading
Date: Wed, 15 Oct 2025 08:49:01 -0400
Using this line in the init file:
  (grep-apply-setting 'grep-command '"grep -d skip -HIn  -i ")

causes:
Debugger entered--Lisp error: (void-function grep-apply-setting)
  (grep-apply-setting 'grep-command '"grep -d skip -HIn  -i ")
  load-with-code-conversion("/home/reilly/.emacs" "/home/reilly/.emacs" t t)
  load("~/.emacs" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode 0x1f41bc44be3cf854>) #f(compiled-function () #<bytecode -0x1f3c686ddc0cdc35>) t)
  command-line()
  normal-top-level()

adding:
   (load-library "grep")

above the call to grep-apply-setting solves the problem



In GNU Emacs 28.2 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars)
 of 2025-02-26, modified by Debian built on x86-ubc-01
Windowing system distributor 'The X.Org Foundation', version 11.0.12101006
System Description: Debian GNU/Linux 12 (bookworm)

Configured using:
 'configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/libexec
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-libsystemd --with-pop=yes
 --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/28.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/28.2/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-mailutils
 --with-native-compilation --build x86_64-linux-gnu
 --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/libexec --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man
 --with-libsystemd --with-pop=yes
 --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/28.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/28.2/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-mailutils
 --with-native-compilation --with-x=yes --with-x-toolkit=lucid
 --with-toolkit-scroll-bars --without-gsettings 'CFLAGS=-g -O2
 -ffile-prefix-map=/build/reproducible-path/emacs-28.2+1=. -fstack-protector-strong
 -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro'

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

Important settings:
  value of $LC_ALL: C
  value of $LANG: en_US.UTF-8
  locale-coding-system: nil

Major mode: Lisp

Minor modes in effect:
  shell-dirtrack-mode: t
  desktop-save-mode: t
  icomplete-mode: t
  display-time-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
/usr/share/emacs/site-lisp/elpa/htmlize-1.55/htmlize hides /usr/share/emacs/site-lisp/elpa/htmlize-1.56/htmlize
/usr/share/emacs/site-lisp/elpa/htmlize-1.55/htmlize-pkg hides /usr/share/emacs/site-lisp/elpa/htmlize-1.56/htmlize-pkg
/usr/share/emacs/site-lisp/elpa/htmlize-1.55/htmlize-autoloads hides /usr/share/emacs/site-lisp/elpa/htmlize-1.56/htmlize-autoloads
/usr/share/emacs/site-lisp/elpa/git-auto-commit-mode-4.7.0/git-auto-commit-mode-autoloads hides /usr/share/emacs/site-lisp/elpa-src/git-auto-commit-mode-4.7.0/git-auto-commit-mode-autoloads
/usr/share/emacs/site-lisp/elpa/git-auto-commit-mode-4.7.0/git-auto-commit-mode hides /usr/share/emacs/site-lisp/elpa-src/git-auto-commit-mode-4.7.0/git-auto-commit-mode
/usr/share/emacs/site-lisp/elpa/git-auto-commit-mode-4.7.0/git-auto-commit-mode-pkg hides /usr/share/emacs/site-lisp/elpa-src/git-auto-commit-mode-4.7.0/git-auto-commit-mode-pkg
/usr/share/emacs/site-lisp/elpa/htmlize-1.55/htmlize hides /usr/share/emacs/site-lisp/elpa-src/htmlize-1.56/htmlize
/usr/share/emacs/site-lisp/elpa/htmlize-1.55/htmlize-pkg hides /usr/share/emacs/site-lisp/elpa-src/htmlize-1.56/htmlize-pkg
/usr/share/emacs/site-lisp/elpa/htmlize-1.55/htmlize-autoloads hides /usr/share/emacs/site-lisp/elpa-src/htmlize-1.56/htmlize-autoloads
/usr/share/emacs/site-lisp/elpa/scala-mode-0.23/scala-mode-paragraph hides /usr/share/emacs/site-lisp/elpa-src/scala-mode-0.23/scala-mode-paragraph
/usr/share/emacs/site-lisp/elpa/scala-mode-0.23/scala-mode-pkg hides /usr/share/emacs/site-lisp/elpa-src/scala-mode-0.23/scala-mode-pkg
/usr/share/emacs/site-lisp/elpa/scala-mode-0.23/scala-mode-prettify-symbols hides /usr/share/emacs/site-lisp/elpa-src/scala-mode-0.23/scala-mode-prettify-symbols
/usr/share/emacs/site-lisp/elpa/scala-mode-0.23/scala-mode-autoloads hides /usr/share/emacs/site-lisp/elpa-src/scala-mode-0.23/scala-mode-autoloads
/usr/share/emacs/site-lisp/elpa/scala-mode-0.23/scala-mode-indent hides /usr/share/emacs/site-lisp/elpa-src/scala-mode-0.23/scala-mode-indent
/usr/share/emacs/site-lisp/elpa/scala-mode-0.23/scala-mode-imenu hides /usr/share/emacs/site-lisp/elpa-src/scala-mode-0.23/scala-mode-imenu
/usr/share/emacs/site-lisp/elpa/scala-mode-0.23/scala-mode hides /usr/share/emacs/site-lisp/elpa-src/scala-mode-0.23/scala-mode
/usr/share/emacs/site-lisp/elpa/scala-mode-0.23/scala-mode-lib hides /usr/share/emacs/site-lisp/elpa-src/scala-mode-0.23/scala-mode-lib
/usr/share/emacs/site-lisp/elpa/scala-mode-0.23/scala-mode-map hides /usr/share/emacs/site-lisp/elpa-src/scala-mode-0.23/scala-mode-map
/usr/share/emacs/site-lisp/elpa/scala-mode-0.23/scala-mode-syntax hides /usr/share/emacs/site-lisp/elpa-src/scala-mode-0.23/scala-mode-syntax
/usr/share/emacs/site-lisp/elpa/scala-mode-0.23/scala-mode-fontlock hides /usr/share/emacs/site-lisp/elpa-src/scala-mode-0.23/scala-mode-fontlock
/usr/share/emacs/site-lisp/elpa/sml-mode-6.10/sml-mode-pkg hides /usr/share/emacs/site-lisp/elpa-src/sml-mode-6.10/sml-mode-pkg
/usr/share/emacs/site-lisp/elpa/sml-mode-6.10/sml-mode hides /usr/share/emacs/site-lisp/elpa-src/sml-mode-6.10/sml-mode
/usr/share/emacs/site-lisp/elpa/sml-mode-6.10/sml-mode-autoloads hides /usr/share/emacs/site-lisp/elpa-src/sml-mode-6.10/sml-mode-autoloads
/usr/share/emacs/site-lisp/elpa/xcscope-1.0/xcscope-autoloads hides /usr/share/emacs/site-lisp/elpa-src/xcscope-1.0/xcscope-autoloads
/usr/share/emacs/site-lisp/elpa/xcscope-1.0/xcscope hides /usr/share/emacs/site-lisp/elpa-src/xcscope-1.0/xcscope
/usr/share/emacs/site-lisp/elpa/xcscope-1.0/xcscope-pkg hides /usr/share/emacs/site-lisp/elpa-src/xcscope-1.0/xcscope-pkg
/usr/share/emacs/site-lisp/auctex/tex-fold hides /usr/share/auctex/tex-fold
/usr/share/emacs/site-lisp/auctex/tex-style hides /usr/share/auctex/tex-style
/usr/share/emacs/site-lisp/auctex/tex-jp hides /usr/share/auctex/tex-jp
/usr/share/emacs/site-lisp/auctex/tex hides /usr/share/auctex/tex
/usr/share/emacs/site-lisp/auctex/tex-mik hides /usr/share/auctex/tex-mik
/usr/share/emacs/site-lisp/auctex/latex hides /usr/share/auctex/latex
/usr/share/emacs/site-lisp/auctex/latex-flymake hides /usr/share/auctex/latex-flymake
/usr/share/emacs/site-lisp/auctex/tex-bar hides /usr/share/auctex/tex-bar
/usr/share/emacs/site-lisp/auctex/context-en hides /usr/share/auctex/context-en
/usr/share/emacs/site-lisp/auctex/toolbar-x hides /usr/share/auctex/toolbar-x
/usr/share/emacs/site-lisp/auctex/preview hides /usr/share/auctex/preview
/usr/share/emacs/site-lisp/auctex/plain-tex hides /usr/share/auctex/plain-tex
/usr/share/emacs/site-lisp/auctex/tex-font hides /usr/share/auctex/tex-font
/usr/share/emacs/site-lisp/auctex/tex-buf hides /usr/share/auctex/tex-buf
/usr/share/emacs/site-lisp/auctex/context hides /usr/share/auctex/context
/usr/share/emacs/site-lisp/auctex/prv-emacs hides /usr/share/auctex/prv-emacs
/usr/share/emacs/site-lisp/auctex/tex-ispell hides /usr/share/auctex/tex-ispell
/usr/share/emacs/site-lisp/auctex/font-latex hides /usr/share/auctex/font-latex
/usr/share/emacs/site-lisp/auctex/tex-info hides /usr/share/auctex/tex-info
/usr/share/emacs/site-lisp/auctex/texmathp hides /usr/share/auctex/texmathp
/usr/share/emacs/site-lisp/auctex/bib-cite hides /usr/share/auctex/bib-cite
/usr/share/emacs/site-lisp/auctex/multi-prompt hides /usr/share/auctex/multi-prompt
/usr/share/emacs/site-lisp/auctex/context-nl hides /usr/share/auctex/context-nl

Features:
(shadow sort mail-extr emacsbug comp comp-cstr rx message rmc
puny rfc822 mml mml-sec epa derived epg rfc6068 epg-config
gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader mule-util
jka-compr info misearch multi-isearch cus-edit pp cus-start
cus-load wid-edit cl-extra help-mode dired-aux dired
dired-loaddefs python tramp-sh tramp tramp-loaddefs trampver
tramp-integration files-x tramp-compat shell pcomplete
parse-time iso8601 ls-lisp format-spec vc-svn time-date vc-git
diff-mode easy-mmode vc-dispatcher whitespace hl-line hi-lock
grep desktop frameset warnings icomplete time smtpmail sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
compile text-property-search comint ansi-color ring
preview-latex auto-loads tex-site package browse-url url
url-proxy url-privacy url-expand url-methods url-history
url-cookie url-domsuf url-util mailcap 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 iso-transl
tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode 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 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 emoji-zwj 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
dbusbind inotify lcms2 dynamic-setting font-render-setting
cairo x-toolkit x multi-tty make-network-process native-compile
emacs)

Memory information:
((conses 16 201212 11666)
 (symbols 48 14402 3)
 (strings 32 48925 4054)
 (string-bytes 1 1582296)
 (vectors 16 27381)
 (vector-slots 8 551590 24351)
 (floats 8 78 43)
 (intervals 56 5112 0)
 (buffers 992 24))






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79632; Package emacs. (Wed, 15 Oct 2025 16:04:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: G B Reilly <hid_pbu <at> gbrmail.com>
Cc: 79632 <at> debbugs.gnu.org
Subject: Re: bug#79632: 28.2; grep library not autoloading
Date: Wed, 15 Oct 2025 19:03:27 +0300
> From: G B Reilly <hid_pbu <at> gbrmail.com>
> Date: Wed, 15 Oct 2025 08:49:01 -0400
> 
> 
> Using this line in the init file:
>   (grep-apply-setting 'grep-command '"grep -d skip -HIn  -i ")
> 
> causes:
> Debugger entered--Lisp error: (void-function grep-apply-setting)
>   (grep-apply-setting 'grep-command '"grep -d skip -HIn  -i ")
>   load-with-code-conversion("/home/reilly/.emacs" "/home/reilly/.emacs" t t)
>   load("~/.emacs" noerror nomessage)
>   startup--load-user-init-file(#f(compiled-function () #<bytecode 0x1f41bc44be3cf854>) #f(compiled-function () #<bytecode -0x1f3c686ddc0cdc35>) t)
>   command-line()
>   normal-top-level()
> 
> adding:
>    (load-library "grep")
> 
> above the call to grep-apply-setting solves the problem

Thanks.

But why did you expect grep-apply-setting to be autoloaded?  We don't
autoload every public function in every package, so sometimes you need
to load the package "by hand" before you can use its functions.

I don't see a bug here.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79632; Package emacs. (Wed, 15 Oct 2025 17:41:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: hid_pbu <at> gbrmail.com (Brendan Reilly)
Cc: 79632 <at> debbugs.gnu.org
Subject: Re: bug#79632: 28.2; grep library not autoloading
Date: Wed, 15 Oct 2025 20:39:50 +0300
[Please always use Reply to All to reply, to keep the bug tracker CC'ed.]

> From: hid_pbu <at> gbrmail.com (Brendan Reilly)
> Read-Receipt-To: (Brendan Reilly) hid_pbu <at> gbrmail.com
> Disposition-Notification-To: (Brendan Reilly) hid_pbu <at> gbrmail.com
> Date: Wed, 15 Oct 2025 12:17:13 -0400
> 
>     > From: G B Reilly <hid_pbu <at> gbrmail.com>
>     > Date: Wed, 15 Oct 2025 08:49:01 -0400
>     > 
>     > 
>     > Using this line in the init file:
>     >   (grep-apply-setting 'grep-command '"grep -d skip -HIn  -i ")
>     > 
>     > causes:
>     > Debugger entered--Lisp error: (void-function grep-apply-setting)
>     >   (grep-apply-setting 'grep-command '"grep -d skip -HIn  -i ")
>     >   load-with-code-conversion("/home/reilly/.emacs" "/home/reilly/.emacs" t t)
>     >   load("~/.emacs" noerror nomessage)
>     >   startup--load-user-init-file(#f(compiled-function () #<bytecode 0x1f41bc44be
>    3cf854>) #f(compiled-function () #<bytecode -0x1f3c686ddc0cdc35>) t)
>     >   command-line()
>     >   normal-top-level()
>     > 
>     > adding:
>     >    (load-library "grep")
>     > 
>     > above the call to grep-apply-setting solves the problem
>     
>     Thanks.
>     
>     But why did you expect grep-apply-setting to be autoloaded?  We don't
>     autoload every public function in every package, so sometimes you need
>     to load the package "by hand" before you can use its functions.
>     
>     I don't see a bug here.
>     
> 
> Then it is a documentation bug.  If a library needs
> to be loaded before a function can be called the
> documentation of the function should state that.

That's impractical, sorry.  It will bloat the doc strings of many
functions.  The default is that functions which are not commands are
not autoloaded, so a package should be loaded before using any of the.
You need to get used to this default.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 01 Nov 2025 09:03:03 GMT) Full text and rfc822 format available.

Notification sent to G B Reilly <hid_pbu <at> gbrmail.com>:
bug acknowledged by developer. (Sat, 01 Nov 2025 09:03:03 GMT) Full text and rfc822 format available.

Message #16 received at 79632-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: hid_pbu <at> gbrmail.com
Cc: 79632-done <at> debbugs.gnu.org
Subject: Re: bug#79632: 28.2; grep library not autoloading
Date: Sat, 01 Nov 2025 11:02:23 +0200
> Cc: 79632 <at> debbugs.gnu.org
> Date: Wed, 15 Oct 2025 20:39:50 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> [Please always use Reply to All to reply, to keep the bug tracker CC'ed.]
> 
> > From: hid_pbu <at> gbrmail.com (Brendan Reilly)
> > Read-Receipt-To: (Brendan Reilly) hid_pbu <at> gbrmail.com
> > Disposition-Notification-To: (Brendan Reilly) hid_pbu <at> gbrmail.com
> > Date: Wed, 15 Oct 2025 12:17:13 -0400
> > 
> >     > From: G B Reilly <hid_pbu <at> gbrmail.com>
> >     > Date: Wed, 15 Oct 2025 08:49:01 -0400
> >     > 
> >     > 
> >     > Using this line in the init file:
> >     >   (grep-apply-setting 'grep-command '"grep -d skip -HIn  -i ")
> >     > 
> >     > causes:
> >     > Debugger entered--Lisp error: (void-function grep-apply-setting)
> >     >   (grep-apply-setting 'grep-command '"grep -d skip -HIn  -i ")
> >     >   load-with-code-conversion("/home/reilly/.emacs" "/home/reilly/.emacs" t t)
> >     >   load("~/.emacs" noerror nomessage)
> >     >   startup--load-user-init-file(#f(compiled-function () #<bytecode 0x1f41bc44be
> >    3cf854>) #f(compiled-function () #<bytecode -0x1f3c686ddc0cdc35>) t)
> >     >   command-line()
> >     >   normal-top-level()
> >     > 
> >     > adding:
> >     >    (load-library "grep")
> >     > 
> >     > above the call to grep-apply-setting solves the problem
> >     
> >     Thanks.
> >     
> >     But why did you expect grep-apply-setting to be autoloaded?  We don't
> >     autoload every public function in every package, so sometimes you need
> >     to load the package "by hand" before you can use its functions.
> >     
> >     I don't see a bug here.
> >     
> > 
> > Then it is a documentation bug.  If a library needs
> > to be loaded before a function can be called the
> > documentation of the function should state that.
> 
> That's impractical, sorry.  It will bloat the doc strings of many
> functions.  The default is that functions which are not commands are
> not autoloaded, so a package should be loaded before using any of the.
> You need to get used to this default.

No further comments within 2 weeks, so I'm now closing this non-bug.




This bug report was last modified 5 days ago.

Previous Next


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