emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Org Refile RFLOC and Struct Type


From: Kyle Meyer
Subject: Re: Org Refile RFLOC and Struct Type
Date: Sun, 18 Oct 2020 16:16:36 -0400

Kevin Foley writes:

> I was recently working with `org-refile` and wanted to use a custom
> target.  There is the `rfloc` argument which is documented as:
>
>> RFLOC can be a refile location obtained in a different way.
>
> There's no documentation as to how `rfloc` should be structured.  To
> figure that out one has to read through the code which is made even more
> difficult by the fact that the same argument is called `refloc` in
> `org-refile--get-location`.

True, this should be documented.

> I plan to submit a patch to address this, however I wanted feedback on
> whether using a struct type (cl-defstruct) could be an improvement
> here before trying to implement it.
>
> It seems using a defined structure would make both the documentation and
> code more clear, however I rarely (if ever) have seen structures used in
> the elisp code I'm familiar with.  Is there a downside to using struct
> types that would make it a poor choice in this case?

I imagine tastes vary on whether using cl-defstruct here is an overkill.
(To my eyes, it is.)  More importantly, though, I think changing it now
means we'd also need a compatibility layer, which doesn't seem worth the
trouble.

Thanks for noticing and for working on a patch.



reply via email to

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