GNU bug report logs - #79873
31.0.50; list-packages doesn't work if lisp-dir is used with use-package

Previous Next

Package: emacs;

Reported by: Aritro Sen <1.sen.aritro <at> gmail.com>

Date: Fri, 21 Nov 2025 09:27:02 UTC

Severity: normal

Found in version 31.0.50

To reply to this bug, email your comments to 79873 AT debbugs.gnu.org.

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#79873; Package emacs. (Fri, 21 Nov 2025 09:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Aritro Sen <1.sen.aritro <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 21 Nov 2025 09:27:02 GMT) Full text and rfc822 format available.

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

From: Aritro Sen <1.sen.aritro <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; list-packages doesn't work if lisp-dir is used with
 use-package
Date: Fri, 21 Nov 2025 02:38:23 +0530
I am using the use-package macro to install treemacs like this:

(use-package treemacs
  :vc (treemacs :url "https://github.com/Alexander-Miller/treemacs"
        :branch "master"
        :lisp-dir "src/elisp/")
  :ensure t
  :config
  (compile-and-load-subdirs "treemacs" "src/extra"))

Anyways, it will install just fine. However, M-x list-packages will not
work anymore, showing /home/aritro/src/elisp directory not found. This
is because list-packages calls package-menu--generate, which in turn
calls package-menu--refresh, which calls
package-menu--print-info-simple, which in turn calls package-vc-commit,
wherein the problem lies. In package-vc-commit, the lisp-dir is not
expanded. Just below, package-vc--main-file does in fact correctly
expand it, so a simple patch like this seems to fix it, the solution
being directly copied from the package-vc--main-file function:

diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index 6642522d11e..68b85db4c46 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -220,8 +220,11 @@ package-vc-commit
   ;; directory (as is possible when dealing with git repositories).
   ;; This should be a fallback option.
   (cl-loop with dir = (let ((pkg-spec (package-vc--desc->spec pkg-desc)))
-                        (or (plist-get pkg-spec :lisp-dir)
-                            (package-desc-dir pkg-desc)))
+                        (expand-file-name
+                         (or (plist-get pkg-spec :lisp-dir) ".")
+                         (or (package-desc-dir pkg-desc)
+                             (expand-file-name (symbol-name 
(package-desc-name pkg-desc))
+                                               package-user-dir))))
            for file in (directory-files dir t "\\.el\\'" t)
            when (vc-working-revision file) return it
            finally return "unknown"))

In GNU Emacs 31.0.50 (build 11, x86_64-pc-linux-gnu, GTK+ Version
3.24.51, cairo version 1.18.4) of 2025-11-21 built on debian
Repository revision: 918b9f04f422efb7b614a9f71b004523a39d7674
Repository branch: master
System Description: Debian GNU/Linux forky/sid

Configured using:
'configure --enable-autodepend --enable-link-time-optimization
--with-dbus --with-file-notification=inotify --with-imagemagick
--with-native-compilation=aot --with-pdumper=yes --with-pgtk
--with-small-ja-dic --with-sound=alsa --with-tree-sitter
--with-wide-int --with-x-toolkit=no --without-compress-install
--without-gpm --without-libsmack --without-selinux --without-xaw3d
--without-xdbe --without-xft --without-xim --without-xinput2
'CFLAGS=-O2 -march=native -Wall -Wl,-z,nodlopen -Wl,-z,noexecstack
-fhardened' 'CXXFLAGS=-O2 -march=native -Wall -Wl,-z,nodlopen
-Wl,-z,noexecstack -fhardened' 'TREE_SITTER_CFLAGS=-isystem
/home/aritro/.local/share/git-builds/emacs-build/treesitter-build/include'
'TREE_SITTER_LIBS=-L/home/aritro/.local/share/git-builds/emacs-build/treesitter-build/lib 

-ltree-sitter''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ
IMAGEMAGICK JPEG LCMS2 LIBOTF 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:
mlscroll-mode: t
ultra-scroll-mode: t
pixel-scroll-precision-mode: t
minions-mode: t
gc-maybe-mode: t
server-mode: t
lin-global-mode: t
pulsar-global-mode: t
pulsar-mode: t
global-colorful-mode: t
colorful-mode: t
global-hl-todo-mode: t
hl-todo-mode: t
diff-hl-flydiff-mode: t
global-diff-hl-mode: t
editorconfig-mode: t
vertico-multiform-mode: t
vertico-mouse-mode: t
nerd-icons-completion-mode: t
marginalia-mode: t
savehist-mode: t
recentf-mode: t
lsp-treemacs-sync-mode: t
eros-mode: t
sly-symbol-completion-mode: t
apheleia-global-mode: t
apheleia-mode: t
treemacs-filewatch-mode: t
treemacs-follow-mode: t
treemacs-git-mode: t
treemacs-fringe-indicator-mode: t
flyover-mode: t
global-flycheck-mode: t
flycheck-mode: t
global-corfu-mode: t
corfu-mode: t
vertico-mode: t
display-line-numbers-mode: t
hl-line-mode: t
display-fill-column-indicator-mode: t
override-global-mode: t
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
context-menu-mode: t
global-font-lock-mode: t
font-lock-mode: t
minibuffer-nonselected-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:
/home/aritro/.local/state/emacs/elpa/clojure-mode/clojure-mode-autoloads 
hides 
/home/aritro/.local/state/emacs/elpa/clojure-mode-20250527.840/clojure-mode-autoloads
/home/aritro/.local/state/emacs/elpa/clojure-mode/clojure-mode hides 
/home/aritro/.local/state/emacs/elpa/clojure-mode-20250527.840/clojure-mode
/home/aritro/.local/state/emacs/elpa/clojure-mode/clojure-mode-pkg hides 
/home/aritro/.local/state/emacs/elpa/clojure-mode-20250527.840/clojure-mode-pkg
/home/aritro/.local/state/emacs/elpa/dired-hacks/dired-hacks-utils hides 
/home/aritro/.local/state/emacs/elpa/dired-hacks-utils-20240629.1906/dired-hacks-utils

Features:
(shadow sort mail-extr emacsbug tramp-cmds vertico-directory
vertico-repeat cursor-sensor mlscroll ultra-scroll pixel-scroll cua-base
minions gc-maybe server lin pulsar colorful-mode hl-todo diff-hl-flydiff
diff-hl log-view log-edit add-log pcvs-util vc-dir editorconfig
editorconfig-core editorconfig-core-handle editorconfig-fnmatch
vertico-multiform vertico-mouse nerd-icons-completion nerd-icons
nerd-icons-faces nerd-icons-data nerd-icons-data-mdicon
nerd-icons-data-flicon nerd-icons-data-codicon nerd-icons-data-devicon
nerd-icons-data-sucicon nerd-icons-data-wicon nerd-icons-data-faicon
nerd-icons-data-powerline nerd-icons-data-octicon
nerd-icons-data-pomicon nerd-icons-data-ipsicon marginalia savehist
recentf lsp-zig lsp-yang lsp-yaml lsp-xml lsp-wgsl lsp-volar
lsp-vimscript lsp-vhdl lsp-vetur lsp-html lsp-verilog lsp-vala lsp-v
lsp-typos lsp-typespec lsp-typeprof lsp-ttcn3 lsp-ts-query lsp-trunk
lsp-toml-tombi lsp-toml lsp-tilt lsp-tex lsp-terraform lsp-svelte
lsp-steep lsp-sqls lsp-sql lsp-sorbet lsp-solidity lsp-solargraph
lsp-semgrep lsp-ruff lsp-ruby-syntax-tree lsp-ruby-lsp lsp-rubocop
lsp-roslyn lsp-roc lsp-rf lsp-remark lsp-racket lsp-r lsp-qml
lsp-python-ty lsp-pylsp lsp-pyls lsp-pwsh lsp-purescript lsp-postgres
lsp-pls lsp-php lsp-perlnavigator lsp-perl lsp-openscad lsp-odin
lsp-ocaml lsp-nushell lsp-nix lsp-nim lsp-nginx lsp-nextflow lsp-move
lsp-mojo lsp-mint lsp-meson lsp-mdx lsp-matlab lsp-marksman lsp-markdown
lsp-magik lsp-fennel lsp-lua lsp-lisp lsp-kubernetes-helm lsp-kotlin
lsp-json lsp-jq lsp-javascript lsp-idris lsp-haxe lsp-hack lsp-groovy
lsp-graphql lsp-golangci-lint lsp-glsl lsp-gleam lsp-gdscript lsp-fsharp
lsp-futhark lsp-fortran lsp-eslint lsp-erlang lsp-emmet lsp-elm
lsp-elixir lsp-earthly lsp-dockerfile lsp-dhall lsp-d lsp-cypher
lsp-cucumber lsp-copilot lsp-css lsp-c3 lsp-csharp lsp-crystal lsp-credo
lsp-cobol lsp-cmake lsp-clojure lsp-treemacs lsp-clangd lsp-bufls lsp-go
lsp-beancount lsp-bash lsp-awk lsp-autotools lsp-astro lsp-asm
lsp-ansible lsp-angular lsp-ada lsp-actionscript climacs-languages
zig-ts-mode-autoloads zig-mode zig-mode-autoloads wat-ts-mode-autoloads
vhdl-mode hippie-exp vhdl-ts-mode-autoloads verilog-mode
verilog-ts-mode-autoloads uiua-mode uiua-ts-mode-autoloads reformatter
uiua-mode-autoloads reformatter-autoloads typst-ts-transient
typst-ts-misc-commands typst-ts-lsp typst-ts-editing
typst-ts-edit-indirect typst-ts-watch-mode typst-ts-compile
typst-ts-faces elec-pair typst-ts-symbols
typst-ts-embedding-lang-settings typst-ts-core typst-ts-variables
typst-ts-mode-autoloads swift-ts-mode-autoloads scala-ts-mode-autoloads
cperl-mode perl-ts-mode-autoloads js odin-ts-mode-autoloads
ocaml-ts-mode-autoloads nasm-mode-autoloads llvm-ts-mode-autoloads
kotlin-ts-mode kotlin-ts-mode-autoloads jq-ts-mode-autoloads
janet-ts-mode-autoloads janet-mode-autoloads haskell-ts-mode-autoloads
gleam-ts-mode-autoloads git-commit-ts-mode-autoloads
devicetree-ts-mode-autoloads c++-ts-mode c-ts-mode
cuda-ts-mode-autoloads clojure-ts-mode-autoloads clojure-mode align
clojure-mode-autoloads c-ts-common c3-ts-mode-autoloads
awk-ts-mode-autoloads treesit-fold treesit-fold-summary
treesit-fold-parsers treesit-fold-util treesit-fold-autoloads beardbolt
disass beardbolt-autoloads eros eros-autoloads sly-overlay-autoloads
sly-macrostep sly-macrostep-autoloads sly-stepper sly-stepper-autoloads
popup sly-asdf-flymake-base sly-asdf-autoloads popup-autoloads
sly-quicklisp ert-x sly-tests mule-util sly-tramp sly-indentation
sly-cl-indent sly-stickers hi-lock sly-trace-dialog sly-fontifying-fu
sly-package-fu sly-scratch sly-fancy-trace sly-fancy-inspector sly-mrepl
sly-autodoc sly-parse sly gud sly-completion sly-buttons sly-messages
sly-common apropos hyperspec sly-autoloads geiser-chez-autoloads
geiser-guile-autoloads macrostep-geiser-autoloads cmacexp cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
macrostep macrostep-autoloads climacs-navigation ibuf-macs ibuf-ext
ibuffer ibuffer-loaddefs ibuffer-vc-autoloads transient svg
ready-player-dired ready-player-autoloads delsel find-dired grep dired-x
dired-hacks-utils dired-hacks-autoloads dired-aux
dired-hacks-utils-autoloads diredfl-autoloads climacs-undo diff vundo
vundo-autoloads undo-fu-session undo-fu-session-autoloads
undo-fu-autoloads climacs-term disk-usage-autoloads eat-autoloads
tramp-cache time-stamp tramp trampver tramp-integration tramp-message
tramp-compat parse-time iso8601 tramp-loaddefs term disp-table shell
ehelp term/xterm xterm vterm-autoloads climacs-format apheleia
apheleia-rcs apheleia-formatters apheleia-dp apheleia-utils apheleia-log
apheleia-formatter-context apheleia-autoloads climacs-lsp
lsp-treemacs-generic lsp-treemacs-themes treemacs-treelib treemacs
treemacs-header-line treemacs-compatibility treemacs-mode
treemacs-bookmarks treemacs-tags treemacs-interface treemacs-persistence
treemacs-filewatch-mode treemacs-follow-mode treemacs-rendering
treemacs-annotations treemacs-async treemacs-workspaces treemacs-dom
treemacs-visuals treemacs-fringe-indicator pulse treemacs-faces
treemacs-icons treemacs-scope treemacs-themes treemacs-core-utils
pfuture treemacs-logging treemacs-customization treemacs-macros
lsp-treemacs-autoloads lsp-ui lsp-ui-flycheck lsp-rust lsp-modeline
lsp-ui-doc lsp-ui-imenu lsp-ui-peek lsp-ui-sideline goto-addr
lsp-ui-util face-remap lsp-ui-autoloads lsp-mode-clients-autoloads
use-package use-package-delight use-package-diminish find-file
lsp-completion lsp-semantic-tokens ido lsp-icons lsp-mode lsp-protocol
tree-widget spinner markdown-mode lv ht filenotify lsp-mode-autoloads
spinner-autoloads color markdown-mode-autoloads climacs-lint
flycheck-guile-autoloads geiser geiser-mode geiser-xref geiser-compile
geiser-repl geiser-capf geiser-debug geiser-image geiser-doc geiser-menu
geiser-autodoc geiser-edit etags fileloop generator geiser-completion
geiser-eval geiser-connection tq geiser-syntax scheme geiser-log
geiser-popup view geiser-impl geiser-custom geiser-base geiser-autoloads
flyover flyover-autoloads whitespace checkdoc flycheck jka-compr
let-alist flycheck-autoloads climacs-completion emoji rfc1345 quail cape
cape-autoloads corfu-extensions-autoloads corfu corfu-autoloads xref org
ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src sh-script
smie executable ob-comint org-pcomplete pcomplete org-list org-footnote
org-faces org-entities noutline outline org-version ob-emacs-lisp
ob-core ob-eval org-cycle org-table ol org-fold org-fold-core org-keys
oc org-loaddefs cal-menu calendar cal-loaddefs org-compat org-macs
format-spec flymake consult bookmark consult-autoloads
marginalia-autoloads vertico-extensions-autoloads vertico
vertico-autoloads orderless orderless-autoloads climacs-edit
multiple-cursors cl mc-separate-operations rectangular-region-mode
mc-mark-pop mc-edit-lines mc-hide-unmatched-lines-mode mc-mark-more
sgml-mode facemenu dom thingatpt mc-cycle-cursors multiple-cursors-core
comp comp-cstr rect multiple-cursors-autoloads benchmark dtrt-indent
dtrt-indent-autoloads climacs-util python project treesit helpful
cc-langs cc-vars cc-defs imenu trace cl-print edebug info-look f
help-fns elisp-refs helpful-autoloads elisp-refs-autoloads dash s
f-autoloads tar-mode arc-mode archive-mode edmacro kmacro ert ewoc debug
backtrace find-func pcre2el rxt advice re-builder pcre2el-autoloads
pcase minions-autoloads display-line-numbers hl-line
display-fill-column-indicator loaddefs-gen radix-tree vc-git diff-mode
track-changes files-x mm-archive message sendmail yank-media dired
dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config
gnus-util time-date mailabbrev gmm-utils mailheader mm-decode mm-bodies
mm-encode mail-utils gnutls network-stream url-cache url-http url-auth
mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr url-gw
nsm puny package-vc vc vc-dispatcher lisp-mnt climacs-ui dbus compile
text-property-search comint ansi-osc ansi-color ring xml
use-package-bind-key bind-key easy-mmode moody compat ef-themes
modus-themes use-package-ensure use-package-core finder-inf
colorful-mode-autoloads diff-hl-autoloads ef-themes-autoloads
gc-maybe-autoloads hl-todo-autoloads knockknock-autoloads lin-autoloads
mlscroll-autoloads modus-themes-autoloads moody-autoloads
nerd-icons-completion-autoloads nerd-icons-corfu-autoloads
nerd-icons-dired-autoloads nerd-icons-ibuffer-autoloads
nerd-icons-autoloads pulsar-autoloads treemacs-autoloads cfrs-autoloads
posframe-autoloads ht-autoloads hydra-autoloads lv-autoloads
pfuture-autoloads ace-window-autoloads avy-autoloads s-autoloads info
dash-autoloads ultra-scroll-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 cl-seq eieio eieio-core cl-macs password-cache json subr-x
map byte-opt gv url-vars comp-run bytecomp byte-compile comp-common rx
xdg-no-littering inline xdg cus-edit pp cus-start cus-load wid-edit
cl-extra help-mode warnings 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
touch-screen 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 lcms2 multi-tty move-toolbar
make-network-process tty-child-frames native-compile emacs)

Memory information:
((conses 16 3247480 7711564) (symbols 48 86328 26821)
(strings 32 584805 380287) (string-bytes 1 17186199)
(vectors 16 166639) (vector-slots 8 2149701 1841631)
(floats 8 967 15559) (intervals 56 231913 57901) (buffers 1064 19))





This bug report was last modified 4 days ago.

Previous Next


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