emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH] function and symbol for headline and olp for org-capture-tem


From: Nafiz Islam
Subject: Re: [PATCH] function and symbol for headline and olp for org-capture-templates
Date: Tue, 21 May 2024 17:00:10 -0400
User-agent: Mozilla Thunderbird

> the idea was to pass the FILE and extra OLP arguments to the custom function provided by the user

I have misunderstood what you suggested. But, I wanted to maintain consistency with how the `file+headline' handles function as a target where the lambda takes no parameter and is expected to return the appropriate type of value while already visiting the file.


> You are still calling `org-capture-expand-function-or-symbol' without passing the rest of OLP there. Or was it the intention?

It is intentional. The only other type I allow (besides a list of headings) is a single function, a single bound symbol and `nil'.


> Also, is there any point calling `find-file-noselect' when the outline
> path spec is _not_ a function?

No. I'll fix that. I ended up removing `org-capture-expand-function-or-symbol'in favour of explicitly testing for function and bound-symbol to allow more fine-grained use of `find-file-noselect'.


> Finally, you need to describe the calling convention and environment
> when the function spec for OLP is called - that it is called with no (or
> some?) arguments and that the current buffer is the FILE-visiting buffer.

Sounds good.


I've attached the updated the patch.

Attachment: 0001-function-and-symbol-for-headline-and-olp-for-org-cap.patch
Description: Text Data


reply via email to

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