* Feature request: adjust ~org-agenda-format-item~ to let the user choose the first level included in breadcrumbs
@ 2023-07-10 11:36 M. Pger
2023-07-11 9:30 ` Ihor Radchenko
0 siblings, 1 reply; 6+ messages in thread
From: M. Pger @ 2023-07-10 11:36 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1852 bytes --]
Dear All,
Including "%b" in the org agenda prefix formats (org-agenda-prefix-format) allows to display entries' outline paths, which is super useful to get project-oriented agenda views/todo-list.
Consider a project 'Foobar Report'. In the agenda view/todo-list, it would look like the following:
```
PROJECT Foobar Report
Foobar Report->TODO Task1
Foobar Report->Task1->TODO Subtask1.1
Foobar Report->Task1->TODO Subtask1.2
Foobar Report->TODO Task2
Foobar Report->Task2-> TODO Subtask2.1
Foobar Report->Task2-> TODO Subtask2.2
```
In such a setting, having 'Foobar Report' at the beginning of each line is not really useful and can impair readability. To tell Org to only print breadcrumbs starting at e.g. level 2 (i.e. skipping the 'Foobar Report' part of the breadcrumbs), I followed the first part of https://list.orgmode.org/CAGEgU=hGnXj7TSGV6pvdSeWFWP_iVwe8WRu+uh8Hjh_7NNRKLw@mail.gmail.com/ and modified the following part of org-agenda-format-item:
```
(when org-prefix-has-breadcrumbs
(setq breadcrumbs
(org-with-point-at (org-get-at-bol 'org-marker)
(let ((s (org-format-outline-path (org-get-outline-path)
(1- (frame-width))
nil org-agenda-breadcrumbs-separator)))
(if (eq "" s) "" (concat s org-agenda-breadcrumbs-separator))))))
```
by replacing (org-get-outline-path) with
```
(nthcdr (1- org-agenda-breadcrumbs-start-level)
(org-get-outline-path))
```
while setting a custom variable org-agenda-breadcrumbs-start-level to 2. It works well.
Would the Org devs/active contributors be willing to implement such modification (maybe a cleaner version, with a better custom variable name?) in the next release of Org?
Best,
MP
PS: Note that I tried to implement the same using advice-add, but miserably failed and decided to go for a complete redefinition of org-agenda-format-item (more lines, but less pain).
[-- Attachment #2: Type: text/html, Size: 6972 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Feature request: adjust ~org-agenda-format-item~ to let the user choose the first level included in breadcrumbs
2023-07-10 11:36 Feature request: adjust ~org-agenda-format-item~ to let the user choose the first level included in breadcrumbs M. Pger
@ 2023-07-11 9:30 ` Ihor Radchenko
2023-07-11 19:42 ` M. Pger
0 siblings, 1 reply; 6+ messages in thread
From: Ihor Radchenko @ 2023-07-11 9:30 UTC (permalink / raw)
To: M. Pger; +Cc: emacs-orgmode
"M. Pger" <mpger@protonmail.com> writes:
> Feature request: adjust ~org-agenda-format-item~ to let the user choose the first level included in breadcrumbs
+1
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Feature request: adjust ~org-agenda-format-item~ to let the user choose the first level included in breadcrumbs
2023-07-11 9:30 ` Ihor Radchenko
@ 2023-07-11 19:42 ` M. Pger
2023-07-11 20:14 ` Ihor Radchenko
0 siblings, 1 reply; 6+ messages in thread
From: M. Pger @ 2023-07-11 19:42 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
Hi,
Sorry for the possibly silly question, but by '+1', can I understand that you will implement this feature because you think it is worth it?
If this is case, thank you very much; if not, thank you anyway for your work with Org-mode!
Note that I was suggesting setting an upper bound, but being able to truncate breadcrumbs from both sides would be even nicer^^
Best,
MP
------- Original Message -------
On Tuesday, July 11th, 2023 at 11:30 AM, Ihor Radchenko <yantar92@posteo.net> wrote:
> "M. Pger" mpger@protonmail.com writes:
>
> > Feature request: adjust ~org-agenda-format-item~ to let the user choose the first level included in breadcrumbs
>
>
> +1
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at https://orgmode.org/.
>
> Support Org development at https://liberapay.com/org-mode,
>
> or support my work at https://liberapay.com/yantar92
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Feature request: adjust ~org-agenda-format-item~ to let the user choose the first level included in breadcrumbs
2023-07-11 19:42 ` M. Pger
@ 2023-07-11 20:14 ` Ihor Radchenko
2023-07-11 20:21 ` M. Pger
0 siblings, 1 reply; 6+ messages in thread
From: Ihor Radchenko @ 2023-07-11 20:14 UTC (permalink / raw)
To: M. Pger; +Cc: emacs-orgmode
"M. Pger" <mpger@protonmail.com> writes:
> Sorry for the possibly silly question, but by '+1', can I understand that you will implement this feature because you think it is worth it?
No, it just means that I think that this feature makes sense to be
implemented. Basically, upvote.
Whether I am going to implement it myself depends on other users.
I usually do not put agenda features high in my todo list because
org-agenda.el is a pain to work with due to obsolete code. But, I will
re-consider if other people also say that they want this feature.
[ For context, I currently have 500 feature requests and ideas recorded in
my notes. And there are also bugs and general maintenance tasks... I have
to prioritize. ]
Or maybe someone motivated enough can try to implement it and submit a
patch (see https://orgmode.org/worg/org-contribute.html). I will then
provide assistance. (Helping new and returning contributors is certainly
high in my todo list ;])
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Feature request: adjust ~org-agenda-format-item~ to let the user choose the first level included in breadcrumbs
2023-07-11 20:14 ` Ihor Radchenko
@ 2023-07-11 20:21 ` M. Pger
2023-08-11 9:22 ` Ihor Radchenko
0 siblings, 1 reply; 6+ messages in thread
From: M. Pger @ 2023-07-11 20:21 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
Hi,
I understand better, thanks. Would be a good opportunity for me to (try to) contribute; this weekend I will check carefully the link you've sent. I'll keep you posted, your assistance would be more than welcome :)
Best,
MP
Sent with Proton Mail secure email.
------- Original Message -------
On Tuesday, July 11th, 2023 at 10:14 PM, Ihor Radchenko <yantar92@posteo.net> wrote:
> "M. Pger" mpger@protonmail.com writes:
>
> > Sorry for the possibly silly question, but by '+1', can I understand that you will implement this feature because you think it is worth it?
>
>
> No, it just means that I think that this feature makes sense to be
> implemented. Basically, upvote.
>
> Whether I am going to implement it myself depends on other users.
>
> I usually do not put agenda features high in my todo list because
> org-agenda.el is a pain to work with due to obsolete code. But, I will
> re-consider if other people also say that they want this feature.
>
> [ For context, I currently have 500 feature requests and ideas recorded in
> my notes. And there are also bugs and general maintenance tasks... I have
> to prioritize. ]
>
> Or maybe someone motivated enough can try to implement it and submit a
> patch (see https://orgmode.org/worg/org-contribute.html). I will then
> provide assistance. (Helping new and returning contributors is certainly
> high in my todo list ;])
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at https://orgmode.org/.
>
> Support Org development at https://liberapay.com/org-mode,
>
> or support my work at https://liberapay.com/yantar92
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Feature request: adjust ~org-agenda-format-item~ to let the user choose the first level included in breadcrumbs
2023-07-11 20:21 ` M. Pger
@ 2023-08-11 9:22 ` Ihor Radchenko
0 siblings, 0 replies; 6+ messages in thread
From: Ihor Radchenko @ 2023-08-11 9:22 UTC (permalink / raw)
To: M. Pger; +Cc: emacs-orgmode
"M. Pger" <mpger@protonmail.com> writes:
> I understand better, thanks. Would be a good opportunity for me to (try to) contribute; this weekend I will check carefully the link you've sent. I'll keep you posted, your assistance would be more than welcome :)
It has been a month since the last message in this thread.
If you encountered any difficulties and need help understanding the
code, please let us know.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-08-11 9:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-10 11:36 Feature request: adjust ~org-agenda-format-item~ to let the user choose the first level included in breadcrumbs M. Pger
2023-07-11 9:30 ` Ihor Radchenko
2023-07-11 19:42 ` M. Pger
2023-07-11 20:14 ` Ihor Radchenko
2023-07-11 20:21 ` M. Pger
2023-08-11 9:22 ` Ihor Radchenko
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).