emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] org-id: Fix behavior when `org-id-extra-values' is a symbol
@ 2020-07-04 19:32 Erik Hetzner
  2020-07-05  1:47 ` Erik Hetzner
  2020-07-05 21:50 ` Nicolas Goaziou
  0 siblings, 2 replies; 3+ messages in thread
From: Erik Hetzner @ 2020-07-04 19:32 UTC (permalink / raw)
  To: emacs-orgmode

* lisp/org-id.el (org-id-update-id-locations): When
`org-id-extra-values' is a symbol, it should be evaluated as a
variable.

In 37a5020bb, `org-id-update-id-locations' was rewritten, and the
functionality to allow the variable `org-id-extra-values' to be a
symbol that references another variable was removed.  This change
restores that functionality.
---
 lisp/org-id.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/org-id.el b/lisp/org-id.el
index 9456b0629..387d8268b 100644
--- a/lisp/org-id.el
+++ b/lisp/org-id.el
@@ -495,7 +495,9 @@ When FILES is given, scan also these files."
                     ;; Agenda files and all associated archives.
                     (org-agenda-files t org-id-search-archives)
                     ;; Explicit extra files.
-                    (unless (symbolp org-id-extra-files) org-id-extra-files)
+                    (if (symbolp org-id-extra-files)
+			(symbol-value org-id-extra-files)
+		      org-id-extra-files)
                     ;; All files known to have IDs.
                     org-id-files
                     ;; Additional files from function call.
-- 
2.27.0



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

* Re: [PATCH] org-id: Fix behavior when `org-id-extra-values' is a symbol
  2020-07-04 19:32 [PATCH] org-id: Fix behavior when `org-id-extra-values' is a symbol Erik Hetzner
@ 2020-07-05  1:47 ` Erik Hetzner
  2020-07-05 21:50 ` Nicolas Goaziou
  1 sibling, 0 replies; 3+ messages in thread
From: Erik Hetzner @ 2020-07-05  1:47 UTC (permalink / raw)
  To: emacs-orgmode

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

On Sat, 04 Jul 2020 12:32:11 -0700, Erik Hetzner <egh@e6h.org> wrote:
> 
> * lisp/org-id.el (org-id-update-id-locations): When
> `org-id-extra-values' is a symbol, it should be evaluated as a
> variable.
>
> […]

Sorry, got the variable name wrong in the description. That should be
`org-id-extra-files'. See attached, fixed, patch.


[-- Attachment #2: 0001-org-id-Fix-behavior-when-org-id-extra-files-is-a-sym.patch --]
[-- Type: text/plain, Size: 1409 bytes --]

filename="0001-org-id-Fix-behavior-when-org-id-extra-files-is-a-sym.patch"
Content-Transfer-Encoding: 8bit

From a87a4b567f2cc86a2eb502fd40238f463ca83daa Mon Sep 17 00:00:00 2001
From: Erik Hetzner <egh@e6h.org> Date: Sat, 4 Jul 2020 12:12:00 -0700
Subject: [PATCH] org-id: Fix behavior when `org-id-extra-files' is a
symbol

* lisp/org-id.el (org-id-update-id-locations): When
`org-id-extra-files' is a symbol, it should be evaluated as a
variable.

In 37a5020bb, `org-id-update-id-locations' was rewritten, and the
functionality to allow the variable `org-id-extra-files' to be a
symbol that references another variable was removed. This changes
restores that functionality.
---
 lisp/org-id.el | 4 +++- 1 file changed, 3 insertions(+), 1
 deletion(-)

diff --git a/lisp/org-id.el b/lisp/org-id.el index
9456b0629..387d8268b 100644 --- a/lisp/org-id.el +++ b/lisp/org-id.el
@@ -495,7 +495,9 @@ When FILES is given, scan also these files."
                     ;; Agenda files and all associated archives.
                     (org-agenda-files t org-id-search-archives)
                     ;; Explicit extra files.
- (unless (symbolp org-id-extra-files) org-id-extra-files) + (if
(symbolp org-id-extra-files) + (symbol-value org-id-extra-files) +
org-id-extra-files)
                     ;; All files known to have IDs. org-id-files
                     ;; Additional files from function call.
-- 
2.27.0


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

* Re: [PATCH] org-id: Fix behavior when `org-id-extra-values' is a symbol
  2020-07-04 19:32 [PATCH] org-id: Fix behavior when `org-id-extra-values' is a symbol Erik Hetzner
  2020-07-05  1:47 ` Erik Hetzner
@ 2020-07-05 21:50 ` Nicolas Goaziou
  1 sibling, 0 replies; 3+ messages in thread
From: Nicolas Goaziou @ 2020-07-05 21:50 UTC (permalink / raw)
  To: Erik Hetzner; +Cc: emacs-orgmode

Hello,

Erik Hetzner <egh@e6h.org> writes:

> * lisp/org-id.el (org-id-update-id-locations): When
> `org-id-extra-values' is a symbol, it should be evaluated as a
> variable.
>
> In 37a5020bb, `org-id-update-id-locations' was rewritten, and the
> functionality to allow the variable `org-id-extra-values' to be a
> symbol that references another variable was removed.  This change
> restores that functionality.

Thanks. I applied the patch. I also fixed the commit hash in the
message.

Regards,
-- 
Nicolas Goaziou


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

end of thread, other threads:[~2020-07-05 21:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-04 19:32 [PATCH] org-id: Fix behavior when `org-id-extra-values' is a symbol Erik Hetzner
2020-07-05  1:47 ` Erik Hetzner
2020-07-05 21:50 ` Nicolas Goaziou

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).