emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Leo Vivier <zaeph@zaeph.net>
To: emacs-orgmode@gnu.org
Subject: [PATCH] lisp/org-persist.el (org-persist-gc): Fix pcase pattern
Date: Sat, 04 Jun 2022 10:47:57 +0200	[thread overview]
Message-ID: <87o7z83jcy.fsf@hidden> (raw)

[-- 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.

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)
                            (file-exists-p file))
-                          ((pred #'numberp)
+                          ((pred numberp)
                            (<= org-persist-remote-files remote-files-num))
                           (_ nil)))
                 (setq expired? t)))

             reply	other threads:[~2022-06-04  8:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-04  8:47 Leo Vivier [this message]
2022-06-04 11:17 ` [PATCH] lisp/org-persist.el (org-persist-gc): Fix pcase pattern Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o7z83jcy.fsf@hidden \
    --to=zaeph@zaeph.net \
    --cc=emacs-orgmode@gnu.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


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).