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

2024-06-18 Thread Nafiz Islam
b06c Mon Sep 17 00:00:00 2001 From: Nafiz Islam Date: Tue, 21 May 2024 16:24:26 -0400 Subject: [PATCH] org-capture-templates: Allow headline/olp target to be function or symbol * doc/org-manual.org: Add target spec format for function and symbol for headline and olp. * etc/ORG-NEWS: Announce t

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

2024-06-15 Thread Nafiz Islam
I've updated my tests with `org-test-at-time' and updated the commit message to fit within default column of 70. From 25c0252c8532e498e3fce103dd44a81441d8a51a Mon Sep 17 00:00:00 2001 From: Nafiz Islam Date: Tue, 21 May 2024 16:24:26 -0400 Subject: [PATCH] function and symbol for he

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

2024-06-09 Thread Nafiz Islam
I tried to run make test with your patch, and it is failing: On my side it passes on main branch at commit 6c862699a6db3f6b76391c05380d92d9f1b3838f with patch. passed 444/1207 test-org-capture/entry (0.099791 sec) ... passed 447/1207 test-org-capture/org-capture-expand-olp (0.001

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

2024-06-01 Thread Nafiz Islam
hat would mean 3 more tests: `headline', `olp' and `olp+datetree'. Curious to know if you believe that is worthwhile or not. From bc1de480d7002a7fb02509901e2bc10f01b25060 Mon Sep 17 00:00:00 2001 From: Nafiz Islam Date: Tue, 21 May 2024 16:24:26 -0400 Subject: [PATCH] function a

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

2024-05-22 Thread Nafiz Islam
Would it be of org-mode's interest if I update `org-test-with-temp-text-in-file' to include a parameter which is a list of symbols to unbound after the test body is executed? Or maybe another macro called `org-test-with-temp-text-in-file-and-symbols'? It's mainly because the tests I have writt

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

2024-05-21 Thread Nafiz Islam
the FILE-visiting buffer. Sounds good. I've attached the updated the patch. From b26bbcb1049e0ab07923308f583228028c100f15 Mon Sep 17 00:00:00 2001 From: Nafiz Islam Date: Tue, 21 May 2024 16:24:26 -0400 Subject: [PATCH] function and symbol for headline and olp for org-capture-templates *

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

2024-05-20 Thread Nafiz Islam
Sorry. I forgot to actually attach the patch. On Sun, May 19, 2024 at 7:34 PM Nafiz Islam wrote: > > would you consider doing the paperwork? > > Yes. I sent an email to ass...@gnu.org with the form. > > I've also updated the docstring for `org-capture-templates', fil

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

2024-05-20 Thread Nafiz Islam
> would you consider doing the paperwork? Yes. I sent an email to ass...@gnu.org with the form. I've also updated the docstring for `org-capture-templates', filtered out incorrect target, and updated `org-capture-expand-olp' to take file argument. Additionally, I added a few test cases to ensure

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

2024-05-13 Thread Nafiz Islam
Oh dear, I shouldn't have used `atomic-chrome' to format the message in Gmail. So here's a revised version. Dear All, This patch adds the option to provide function and symbol for headline and olp for org-capture-templates. By that, I mean you can set the org-capture-templates in the following m

[PATCH] function and symbol for headline and olp for org-capture-templates

2024-05-13 Thread Nafiz Islam
27; is a variable/symbol. I also added a few more unit tests for the targets `file+olp' and `file+olp+datetree' to verify my new features and existing features. From 4757bd5531663e9c85bd54e8644c4bad40709383 Mon Sep 17 00:00:00 2001 From: Nafiz Islam Date: Mon, 13 May 2024 17:53:02 -0400 Subject: [PATCH] function and sy

Re: [FR] Support headline as a function for file+headline target for org-capture-templates

2024-05-11 Thread Nafiz Islam
I see there are a lot of test cases for org-find-olp (which is the function I believe processes the outline path argument). testing/lisp/test-org.el 2861:(ert-deftest test-org/org-find-olp () 2862: "Test `org-find-olp' specifications." 2875:(should (org-find-olp '("Headline") t)) 2876:(sh

Re: [FR] Support headline as a function for file+headline target for org-capture-templates

2024-05-03 Thread Nafiz Islam
So far I have written this code... (defun org-capture-expand-headline (headline) "Expand functions, symbols and strings for HEADLINE. When HEADLINE is a function, call it. When it is a form, evaluate it. When it is a variable, return its value. When it is a string, treat it as a headlin

Re: [FR] Support headline as a function for file+headline target for org-capture-templates

2024-05-02 Thread Nafiz Islam
> > Would you be interested to submit a patch? > If I finish writing a patch for it. Sure. I again forgot to CC emacs-orgmode@gnu.org

Re: [FR] Support headline as a function for file+headline target for org-capture-templates

2024-05-01 Thread Nafiz Islam
> May you please describe what kind of feature you want to introduce and > explain why it is useful for other Org mode users? The feature I want to introduce is to allow the headline parameter to be a function for the `file+headline' target for the `org-capture-templates'. The function would take

Re: [FR] Support headline as a function for file+headline target for org-capture-templates

2024-05-01 Thread Nafiz Islam
> Aside from those workarounds, would that be a feature worth implementing? I'd imagine it could borrow some logic from `org-capture-expand-file' for the headline argument, and the function (for the headline) would take headlines as a parameter and return a string. Oops I forgot to CC the mailing

Re: [FR] Support headline as a function for file+headline target for org-capture-templates

2024-04-30 Thread Nafiz Islam
-stamp-format t t) (current-time))) "- %?" :empty-lines 0 (call-interactively oldfun))) (advice-add #'org-capture :around #'my/diary-capture-advice) On Tue, Apr 30, 2024 at 8:31 AM Ihor Radchenko wrote: > Nafiz Islam writes: > > >> Upon clos

Re: [FR] Support headline as a function for file+headline target for org-capture-templates

2024-04-28 Thread Nafiz Islam
> Upon closer look at the `org-capture`, `org-capture-set-target-location` and `org-capture-place-entry`, I'm starting to realize that "file+function" can be used for what I'm looking for. I was just worried about the use of `(org-capture-put :exact-position (point))` My disappointing attempt at u

Re: [FR] Support headline as a function for file+headline target for org-capture-templates

2024-04-28 Thread Nafiz Islam
, Apr 28, 2024 at 10:58 AM Nafiz Islam wrote: > Right now, only the file name supports being either a string, symbol or > function, etc. Nonetheless, it would be nice if headline could be a > function that takes in as parameter a list of all headlines present in the > file so that we can d

[FR] Support headline as a function for file+headline target for org-capture-templates

2024-04-28 Thread Nafiz Islam
Right now, only the file name supports being either a string, symbol or function, etc. Nonetheless, it would be nice if headline could be a function that takes in as parameter a list of all headlines present in the file so that we can dynamically pick a headline under which we want to add an entry.

[PATCH] lisp/org/org-agenda.el (org-todo-list): rename variables and format

2024-01-04 Thread Nafiz Islam
From dfd86feb0baa7075b58507e3b8bf3b3a958b0f79 Mon Sep 17 00:00:00 2001 From: Nafiz Islam Date: Tue, 26 Dec 2023 12:34:20 -0500 Subject: [PATCH] lisp/org/org-agenda.el (org-todo-list): rename variables and format * lisp/org/org-agenda.el (org-todo-list): Use `org-today' directly for `cal