* bug#42668: 26.1; Undefined functions when calling invoking project.el
@ 2020-08-02 9:07 Philip K.
2020-08-02 14:23 ` Eli Zaretskii
2020-08-02 22:06 ` Dmitry Gutov
0 siblings, 2 replies; 8+ messages in thread
From: Philip K. @ 2020-08-02 9:07 UTC (permalink / raw)
To: 42668
When trying to to use some project.el commands, and noticed that there
are a (at least) two undefined functions right after loading project.el
in a vanilla session:
- The first complaint is seq-every-p, used by
project--read-project-list, but this is "easily" solved by loading
seq.el.
- The more critical complaint is that assoc-delete-all, used by
project--add-to-project-list-front and
project--remove-from-project-list are not loaded or defined in Emacs
26.
My guess is that this function should be replaced by it's functionally
equivalent code, that only uses functions available in Emacs 26?
In GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.5)
of 2019-09-23, modified by Debian built on x86-grnet-01
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Debian GNU/Linux 10 (buster)
Recent messages:
Type C-x 1 to delete the help window.
custom-initialize-reset: Symbol’s function definition is void: assoc-delete-all
Saving file /home/phi/.emacs.d/elpa/project-0.5.0/project.el...
Wrote /home/phi/.emacs.d/elpa/project-0.5.0/project.el
Quit
Entering debugger...
Mark set
Back to top level
Entering debugger...
Back to top level
Configured using:
'configure --build x86_64-linux-gnu --prefix=/usr
--sharedstatedir=/var/lib --libexecdir=/usr/lib
--localstatedir=/var/lib --infodir=/usr/share/info
--mandir=/usr/share/man --enable-libsystemd --with-pop=yes
--enable-locallisppath=/etc/emacs:/usr/local/share/emacs/26.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.1/site-lisp:/usr/share/emacs/site-lisp
--with-sound=alsa --without-gconf --with-mailutils --build
x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
--libexecdir=/usr/lib --localstatedir=/var/lib
--infodir=/usr/share/info --mandir=/usr/share/man --enable-libsystemd
--with-pop=yes
--enable-locallisppath=/etc/emacs:/usr/local/share/emacs/26.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.1/site-lisp:/usr/share/emacs/site-lisp
--with-sound=alsa --without-gconf --with-mailutils --with-x=yes
--with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2
-fdebug-prefix-map=/build/emacs-StqULU/emacs-26.1+1=. -fstack-protector-strong
-Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
-D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro'
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 THREADS LIBSYSTEMD LCMS2
Important settings:
value of $LANG: en_GB.UTF-8
locale-coding-system: utf-8-unix
Major mode: Emacs-Lisp
Minor modes in effect:
shell-dirtrack-mode: t
diff-auto-refine-mode: t
paredit-mode: t
ivy-mode: t
display-time-mode: t
electric-pair-mode: t
recentf-mode: t
save-place-mode: t
savehist-mode: t
show-paren-mode: t
winner-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
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
/home/phi/.emacs.d/elpa/project-0.5.0/project hides /usr/share/emacs/26.1/lisp/progmodes/project
/home/phi/.emacs.d/elpa/flymake-1.0.9/flymake hides /usr/share/emacs/26.1/lisp/progmodes/flymake
/home/phi/.emacs.d/elpa/let-alist-1.0.6/let-alist hides /usr/share/emacs/26.1/lisp/emacs-lisp/let-alist
Features:
(shadow emacsbug eieio-opt speedbar sb-image ezimage dframe xref
find-func cl-print debug swiper bug-reference bookmark map vc-mtn vc-hg
vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs vc vc-dispatcher project
subr-x help-fns radix-tree char-fold network-stream starttls url-http
tls gnutls url-gw nsm url-cache url-auth eww mm-url url-queue url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap shr svg xml dom browse-url nnmail gnus-int
gnus-range mail-source sort ffap tramp tramp-compat tramp-loaddefs
trampver ucs-normalize shell pcomplete parse-time advice misearch
multi-isearch flyspell ispell mail-extr cl-extra help-mode vc-git
diff-mode easy-mmode time-stamp qp vc-fossil rmailmm message rmc puny
rfc822 mml mml-sec epa derived epg mm-decode mm-bodies mm-encode
mailabbrev gmm-utils mailheader mail-parse rfc2231 paredit init ivy
delsel colir color ivy-overlay edmacro kmacro rx pcase dired-x dired
dired-loaddefs holidays hol-loaddefs cal-menu calendar cal-loaddefs
erc-goodies erc thingatpt pp erc-backend erc-compat format-spec gnus
nnheader gnus-util time sendmail rmail rmail-loaddefs rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils compile hippie-exp comint
ansi-color elec-pair recentf tree-widget saveplace savehist paren winner
ring cus-edit cus-start cus-load wid-edit tex-site finder-inf
slime-autoloads info package easymenu epg-config url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache url-vars seq byte-opt gv bytecomp byte-compile cconv
cl-loaddefs cl-lib devhelp time-date mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type 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 elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame 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 minibuffer 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 dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)
Memory information:
((conses 16 465615 101116)
(symbols 48 38230 1)
(miscs 40 693 3645)
(strings 32 115237 17474)
(string-bytes 1 3036144)
(vectors 16 57732)
(vector-slots 8 1037505 74204)
(floats 8 304 1052)
(intervals 56 6627 2315)
(buffers 992 27))
--
Philip K.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#42668: 26.1; Undefined functions when calling invoking project.el
2020-08-02 9:07 bug#42668: 26.1; Undefined functions when calling invoking project.el Philip K.
@ 2020-08-02 14:23 ` Eli Zaretskii
2020-08-02 14:36 ` Philip K.
2020-08-02 22:02 ` Philip K.
2020-08-02 22:06 ` Dmitry Gutov
1 sibling, 2 replies; 8+ messages in thread
From: Eli Zaretskii @ 2020-08-02 14:23 UTC (permalink / raw)
To: Philip K.; +Cc: 42668
> From: philipk@posteo.net (Philip K.)
> Date: Sun, 02 Aug 2020 11:07:27 +0200
>
>
> When trying to to use some project.el commands, and noticed that there
> are a (at least) two undefined functions right after loading project.el
> in a vanilla session:
>
> - The first complaint is seq-every-p, used by
> project--read-project-list, but this is "easily" solved by loading
> seq.el.
> - The more critical complaint is that assoc-delete-all, used by
> project--add-to-project-list-front and
> project--remove-from-project-list are not loaded or defined in Emacs
> 26.
> My guess is that this function should be replaced by it's functionally
> equivalent code, that only uses functions available in Emacs 26?
To make sure I understand the report: you are using project.el from
GNU ELPA in conjunction with Emacs 26?
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#42668: 26.1; Undefined functions when calling invoking project.el
2020-08-02 14:23 ` Eli Zaretskii
@ 2020-08-02 14:36 ` Philip K.
2020-08-02 22:02 ` Philip K.
1 sibling, 0 replies; 8+ messages in thread
From: Philip K. @ 2020-08-02 14:36 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 42668
Eli Zaretskii <eliz@gnu.org> writes:
>> From: philipk@posteo.net (Philip K.)
>> Date: Sun, 02 Aug 2020 11:07:27 +0200
>>
>>
>> When trying to to use some project.el commands, and noticed that there
>> are a (at least) two undefined functions right after loading project.el
>> in a vanilla session:
>>
>> - The first complaint is seq-every-p, used by
>> project--read-project-list, but this is "easily" solved by loading
>> seq.el.
>> - The more critical complaint is that assoc-delete-all, used by
>> project--add-to-project-list-front and
>> project--remove-from-project-list are not loaded or defined in Emacs
>> 26.
>> My guess is that this function should be replaced by it's functionally
>> equivalent code, that only uses functions available in Emacs 26?
>
> To make sure I understand the report: you are using project.el from
> GNU ELPA in conjunction with Emacs 26?
Yes, I open Emacs 26, and load ~/.emacs.d/elpa/project-0.5.0/project.el.
--
Philip K.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#42668: 26.1; Undefined functions when calling invoking project.el
2020-08-02 14:23 ` Eli Zaretskii
2020-08-02 14:36 ` Philip K.
@ 2020-08-02 22:02 ` Philip K.
2020-08-02 22:16 ` Dmitry Gutov
1 sibling, 1 reply; 8+ messages in thread
From: Philip K. @ 2020-08-02 22:02 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 42668
[-- Attachment #1: Type: text/plain, Size: 317 bytes --]
> To make sure I understand the report: you are using project.el from
> GNU ELPA in conjunction with Emacs 26?
I see that seq has been added as a dependency in the git repository
(that appears to not have been released to ELPA yet).
The patch attached below should fix the assoc-delete-all issue.
--
Philip K.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Replace-assoc-delete-all-with-26.1-compatible-altern.patch --]
[-- Type: text/x-diff, Size: 1405 bytes --]
From 4c073d987273807ff7bfb932d72c584afdad9315 Mon Sep 17 00:00:00 2001
From: Philip K <philipk@posteo.net>
Date: Sun, 2 Aug 2020 23:59:40 +0200
Subject: [PATCH] Replace assoc-delete-all with 26.1 compatible alternatives
---
lisp/progmodes/project.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 51b9347bb9..06864ccf60 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -1166,7 +1166,9 @@ project-remember-project
(project--ensure-read-project-list)
(let ((dir (project-root pr)))
(unless (equal (caar project--list) dir)
- (setq project--list (assoc-delete-all dir project--list))
+ (dolist (elem project--list)
+ (when (equal dir (car elem))
+ (setq project--list (delq elem project--list))))
(push (list dir) project--list)
(project--write-project-list))))
@@ -1176,8 +1178,8 @@ project--remove-from-project-list
result in `project-list-file'. Announce the project's removal
from the list."
(project--ensure-read-project-list)
- (when (assoc pr-dir project--list)
- (setq project--list (assoc-delete-all pr-dir project--list))
+ (when-let ((ent (assoc pr-dir project--list)))
+ (delq ent project--list)
(message "Project `%s' not found; removed from list" pr-dir)
(project--write-project-list)))
--
2.20.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* bug#42668: 26.1; Undefined functions when calling invoking project.el
2020-08-02 9:07 bug#42668: 26.1; Undefined functions when calling invoking project.el Philip K.
2020-08-02 14:23 ` Eli Zaretskii
@ 2020-08-02 22:06 ` Dmitry Gutov
1 sibling, 0 replies; 8+ messages in thread
From: Dmitry Gutov @ 2020-08-02 22:06 UTC (permalink / raw)
To: Philip K., 42668
Hi Philip,
On 02.08.2020 12:07, Philip K. wrote:
>
> When trying to to use some project.el commands, and noticed that there
> are a (at least) two undefined functions right after loading project.el
> in a vanilla session:
Thank you for testing that.
> - The first complaint is seq-every-p, used by
> project--read-project-list, but this is "easily" solved by loading
> seq.el.
That is already fixed on master, should be in the next project.el release.
> - The more critical complaint is that assoc-delete-all, used by
> project--add-to-project-list-front and
> project--remove-from-project-list are not loaded or defined in Emacs
> 26.
> My guess is that this function should be replaced by it's functionally
> equivalent code, that only uses functions available in Emacs 26?
seq-remove, cl-delete-if (or even cl-delete with :key) seem like the
prime candidates.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#42668: 26.1; Undefined functions when calling invoking project.el
2020-08-02 22:02 ` Philip K.
@ 2020-08-02 22:16 ` Dmitry Gutov
2020-08-05 21:00 ` Philip K.
0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Gutov @ 2020-08-02 22:16 UTC (permalink / raw)
To: Philip K., Eli Zaretskii; +Cc: 42668
On 03.08.2020 01:02, Philip K. wrote:
> The patch attached below should fix the assoc-delete-all issue.
Thanks!
Could you add a commit message as well, formatted according to CONTRIBUTE?
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#42668: 26.1; Undefined functions when calling invoking project.el
2020-08-02 22:16 ` Dmitry Gutov
@ 2020-08-05 21:00 ` Philip K.
2020-08-06 14:51 ` Dmitry Gutov
0 siblings, 1 reply; 8+ messages in thread
From: Philip K. @ 2020-08-05 21:00 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: 42668
[-- Attachment #1: Type: text/plain, Size: 290 bytes --]
(sorry for the delay)
Dmitry Gutov <dgutov@yandex.ru> writes:
> On 03.08.2020 01:02, Philip K. wrote:
>> The patch attached below should fix the assoc-delete-all issue.
>
> Thanks!
>
> Could you add a commit message as well, formatted according to CONTRIBUTE?
Sure, I hope this is ok:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Remove-usages-of-assoc-delete-all-in-project.el.patch --]
[-- Type: text/x-diff, Size: 1671 bytes --]
From 47dac7a9e6da05bb6303e4b10a0b8ce98aa12eeb Mon Sep 17 00:00:00 2001
From: Philip K <philipk@posteo.net>
Date: Wed, 5 Aug 2020 22:57:01 +0200
Subject: [PATCH] ; Remove usages of assoc-delete-all in project.el
assoc-delete-all is not available for users who have installed
project.el via ELPA on older Emacs versions.
* lisp/progmodes/project.el (project-remember-project,
project--remove-from-project-list): Replace assoc-delete-all with
equivalent alternatives
---
lisp/progmodes/project.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 51b9347bb9..b6161351f0 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -1166,7 +1166,9 @@ project-remember-project
(project--ensure-read-project-list)
(let ((dir (project-root pr)))
(unless (equal (caar project--list) dir)
- (setq project--list (assoc-delete-all dir project--list))
+ (dolist (ent project--list)
+ (when (equal dir (car ent))
+ (setq project--list (delq ent project--list))))
(push (list dir) project--list)
(project--write-project-list))))
@@ -1176,8 +1178,8 @@ project--remove-from-project-list
result in `project-list-file'. Announce the project's removal
from the list."
(project--ensure-read-project-list)
- (when (assoc pr-dir project--list)
- (setq project--list (assoc-delete-all pr-dir project--list))
+ (when-let ((ent (assoc pr-dir project--list)))
+ (setq project--list (delq ent project--list))
(message "Project `%s' not found; removed from list" pr-dir)
(project--write-project-list)))
--
2.20.1
[-- Attachment #3: Type: text/plain, Size: 16 bytes --]
--
Philip K.
^ permalink raw reply related [flat|nested] 8+ messages in thread
* bug#42668: 26.1; Undefined functions when calling invoking project.el
2020-08-05 21:00 ` Philip K.
@ 2020-08-06 14:51 ` Dmitry Gutov
0 siblings, 0 replies; 8+ messages in thread
From: Dmitry Gutov @ 2020-08-06 14:51 UTC (permalink / raw)
To: Philip K.; +Cc: 42668-done
On 06.08.2020 00:00, Philip K. wrote:
> Sure, I hope this is ok:
Pushed, thank you.
(But see commit 09ba020328e9 with the further tweaks I made to the message.)
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-08-06 14:51 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-02 9:07 bug#42668: 26.1; Undefined functions when calling invoking project.el Philip K.
2020-08-02 14:23 ` Eli Zaretskii
2020-08-02 14:36 ` Philip K.
2020-08-02 22:02 ` Philip K.
2020-08-02 22:16 ` Dmitry Gutov
2020-08-05 21:00 ` Philip K.
2020-08-06 14:51 ` Dmitry Gutov
2020-08-02 22:06 ` Dmitry Gutov
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).