[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] org-agenda.el: customise outline path in echo area
From: |
Mikhail Skorzhisnkii |
Subject: |
Re: [PATCH] org-agenda.el: customise outline path in echo area |
Date: |
Tue, 30 Aug 2022 16:59:57 +0200 |
User-agent: |
mu4e 1.8.7; emacs 29.0.50 |
I have signed the FSF papers now and we can continue the review of this work
now.
I am attaching updated and rebased patch for this and another e-mail thread,
since these two patches are depend on each other. I have additionally tested
the functionality of these changes by verifying that it works as expected on my
setup;
• Tried to use org-agenda on buffers with and without title property set
• Tried to call org-refile and see if refiling will happen
• `make test' passes
I have *not* tried to see if it will work on buffers without file
representation, but the component tests for refile should cover that.
Let me know what you think.
Thanks,
Mikhail Skorzhinskii
Ihor Radchenko <yantar92@gmail.com> writes:
> Mikhail Skorzhinskii <mskorzhinskiy@eml.cc> writes:
>
>> Thank you for your comments once again. I’ve changed string= to eq and
>> it appears to be working OK.
>>
>> I’ve also renamed “title” variable to “title-prop” for better
>> readability. The -prop suffix should show the reader that it was
>> extracted from the file, and thus cost some CPU/IO.
>>
>> I’ve attached an updated version to this email. Would love to hear what
>> you think.
>
> Thanks! And sorry for the late reply. Your patch fell through the cracks
> in my todo list.
>
>> * lisp/org-agenda.el (org-agenda-show-outline-path): add an option to
>> show document title in outline path (instead of file name)
>> * lisp/org.el (org-get-title-from-file): a function to collect the
>> document title from the org-mode file
>> * lisp/org.el (org-display-outline-path): add logic that will collect a
>> document title and put it into the outline path if
>> org-agenda-show-outline-path set to ’title
>
> It would make sense to document the new customization in ORG-NEWS.
>
>> +(defun org-get-title-from-file (file)
>> + “Collect tilte from the provided `org-mode’ FILE.”
>> + (let (title)
> ^ typo
>> + (when file
>> + (with-current-buffer
>> + (get-file-buffer file)
>> + (pcase (org-collect-keywords ’(“TITLE”))
>> + (`((“TITLE” . ,val))
>> + (setq title (car val)))))
>> + title)))
>
> Note that this function behavior is underfined when FILE buffer does not
> exist. It would be better to accept buffer as argument.
>
> Best,
> Ihor
0002-org-refile.el-show-refile-targets-with-doc.-title.patch
Description: Text Data
0001-org-agenda.el-customize-outline-path-in-echo-area.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH] org-agenda.el: customise outline path in echo area,
Mikhail Skorzhisnkii <=