all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] lisp/org-persist.el (org-persist-gc): Fix pcase pattern
@ 2022-06-04  8:47 Leo Vivier
  2022-06-04 11:17 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Leo Vivier @ 2022-06-04  8:47 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 324 bytes --]

Hi there,

Quick patch to fix a typo in a pcase pattern which quotes a function.
It results in `(function numberp foo)' when expanded, which in turns
throws `(wrong-number-of-arguments function 2)' when eval’d.

Best,
-- 
Leo Vivier
Freelance Software Developer
Website: www.leovivier.com | Blog: www.zaeph.net

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-org-persist.el-org-persist-gc-Fix-pcase-pattern.patch --]
[-- Type: text/x-patch, Size: 1060 bytes --]

From 762d1774fb70313e20951343a7511051a3626cad Mon Sep 17 00:00:00 2001
From: Leo Vivier <zaeph@zaeph.net>
Date: Sat, 4 Jun 2022 10:28:07 +0200
Subject: [PATCH] lisp/org-persist.el (org-persist-gc): Fix pcase pattern

* lisp/org-persist.el (org-persist-gc): Fix pcase pattern

Otherwise, `(pred #'numberp)' expands to `(function numberp foo)'
where foo is the first arg of pcase.
---
 lisp/org-persist.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-persist.el b/lisp/org-persist.el
index ca6ee4f4d..068f58cec 100644
--- a/lisp/org-persist.el
+++ b/lisp/org-persist.el
@@ -929,7 +929,7 @@ Also, remove containers associated with non-existing files."
                           ('t t)
                           ('check-existence
                            (file-exists-p file))
-                          ((pred #'numberp)
+                          ((pred numberp)
                            (<= org-persist-remote-files remote-files-num))
                           (_ nil)))
                 (setq expired? t)))
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-04 11:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-04  8:47 [PATCH] lisp/org-persist.el (org-persist-gc): Fix pcase pattern Leo Vivier
2022-06-04 11:17 ` Ihor Radchenko

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.