emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] org-attach.el: ID to path functions may return nil


From: Max Nikulin
Subject: [PATCH] org-attach.el: ID to path functions may return nil
Date: Tue, 8 Nov 2022 00:05:51 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2

Ihor, I played with my patch for some time and the only issue I have noticed is missed backslashes in a docstring.

On 05/10/2022 12:44, Ihor Radchenko wrote:

AFAIU, your version of `org-attach-dir-from-id' may sometimes return
nil, which is neither documented

"otherwise independently of TRY-ALL
value return the first non nil value."

indirectly assumes nil. It may be made more prominent.

nor expected by the callers.

I see 2 direct callers and I am not aware of any problem with them.

In particular, `org-attach-dir-get-create' will throw unhelpful "No
attachment directory is associated with the current node" error.

* H short
:PROPERTIES:
:ID:       ec
:END:

if: No attachment directory is associated with the current node, adjust ‘org-attach-id-to-path-function-list’

I do not think this message is unhelpful.

`org-attach-dir' appears to handle nil return value fine.

Attachment: 0001-org-attach.el-ID-to-path-functions-may-return-nil.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]