emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH] Allow external libraries (org-roam) to supply org-id locatio


From: Rick Lupton
Subject: Re: [PATCH] Allow external libraries (org-roam) to supply org-id locations
Date: Sat, 16 Mar 2024 22:46:42 +0000
User-agent: Cyrus-JMAP/3.11.0-alpha0-300-gdee1775a43-fm-20240315.001-gdee1775a

On Wed, 13 Mar 2024, at 12:30 PM, Ihor Radchenko wrote:
> I think that we can do it simpler. [...]
> The idea is to use Emacs' advice machinery to allow third-party code
> alter the functions stored in link parameters.

I was avoiding this because I thought it was only recommended (in the elisp 
manual) to use advice directly by users, not in libraries (like, I assume, 
org-roam):

> If you are writing code for release, for others to use, try to avoid 
> including advice in it. If the function you want to advise has no hook to do 
> the job, please talk with the Emacs developers about adding a suitable hook. 
> Especially, Emacs’s own source files should not put advice on functions in 
> Emacs. (There are currently a few exceptions to this convention, but we aim 
> to correct them.) It is generally cleaner to create a new hook in foo, and 
> make bar use the hook, than to have bar put advice in foo.

(https://www.gnu.org/software/emacs/manual/html_node/elisp/Advising-Named-Functions.html)

But I don't mind either way.  I agree your approach is simpler if it's a 
reasonable way for a third party library like org-roam to extend the org id 
functions.

Thanks,
Rick



reply via email to

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