all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Add new word before an org-agenda entry (like "MODIFIED")
@ 2023-10-03  9:46 Cletip Cletip
  2023-10-12 11:41 ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Cletip Cletip @ 2023-10-03  9:46 UTC (permalink / raw)
  To: Org Mode List

[-- Attachment #1: Type: text/plain, Size: 1180 bytes --]

Hello, everyone! I have a question that may be complex to answer. I
apologize in advance for my limited vocabulary; I will use an example to
elucidate my question better.

Objective: I wish to track when a heading is modified using org-agenda. To
achieve this, I automatically insert an inactive timestamp in the LOGBOOK
drawer whenever a note is modified. However, how can I display the item in
org-agenda with the prefix "MODIFIED:" or another indicator before the
heading to show that I made a modification ?

Here's an example for clarification:
Consider this line in org-agenda:

14:08-14:10 Clocked: (0:02) name-of-the-heading

I want exactly the same thing, but not with the "Clocked" word !

Another example : I would like this entry/heading/item :

** An example
:PROPERTIES:
:CREATED: [2023-09-29 Fri 23:07]
:END:
:LOGBOOK:
MODIFIED: [2023-10-01 Sun 14:09]--[2023-10-01 Sun 14:35]
CLOCK: [2023-09-30 Sat 23:19]--[2023-09-30 Sat 23:25] => 0:06
MODIFIED: [2023-09-30 Sat 14:08]--[2023-09-30 Sat 14:20]
:END:

with the word "MODIFIED:" precede the entry in the org-agenda.

Is this feasible? Can you suggest alternative methods?

Thanks in advance for your futur answer :)

[-- Attachment #2: Type: text/html, Size: 1350 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Add new word before an org-agenda entry (like "MODIFIED")
  2023-10-03  9:46 Add new word before an org-agenda entry (like "MODIFIED") Cletip Cletip
@ 2023-10-12 11:41 ` Ihor Radchenko
  2023-10-14 10:12   ` Cletip Cletip
  0 siblings, 1 reply; 4+ messages in thread
From: Ihor Radchenko @ 2023-10-12 11:41 UTC (permalink / raw)
  To: Cletip Cletip; +Cc: Org Mode List

Cletip Cletip <clement020302@gmail.com> writes:

> Here's an example for clarification:
> Consider this line in org-agenda:
>
> 14:08-14:10 Clocked: (0:02) name-of-the-heading
>
> I want exactly the same thing, but not with the "Clocked" word !

This is not easy. The supported log types are hard-coded in
`org-agenda-get-progress'.

You may need to implement a custom agenda block type to achieve what you
want.

-- 
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] 4+ messages in thread

* Re: Add new word before an org-agenda entry (like "MODIFIED")
  2023-10-12 11:41 ` Ihor Radchenko
@ 2023-10-14 10:12   ` Cletip Cletip
  2023-10-14 10:24     ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Cletip Cletip @ 2023-10-14 10:12 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Org Mode List

[-- Attachment #1: Type: text/plain, Size: 879 bytes --]

I know how to create a custom agenda block, but how insert this ? Can I
just have some leads ?

Le jeu. 12 oct. 2023 à 13:39, Ihor Radchenko <yantar92@posteo.net> a écrit :

> Cletip Cletip <clement020302@gmail.com> writes:
>
> > Here's an example for clarification:
> > Consider this line in org-agenda:
> >
> > 14:08-14:10 Clocked: (0:02) name-of-the-heading
> >
> > I want exactly the same thing, but not with the "Clocked" word !
>
> This is not easy. The supported log types are hard-coded in
> `org-agenda-get-progress'.
>
> You may need to implement a custom agenda block type to achieve what you
> want.
>
> --
> 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>
>

[-- Attachment #2: Type: text/html, Size: 1545 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Add new word before an org-agenda entry (like "MODIFIED")
  2023-10-14 10:12   ` Cletip Cletip
@ 2023-10-14 10:24     ` Ihor Radchenko
  0 siblings, 0 replies; 4+ messages in thread
From: Ihor Radchenko @ 2023-10-14 10:24 UTC (permalink / raw)
  To: Cletip Cletip; +Cc: Org Mode List

Cletip Cletip <clement020302@gmail.com> writes:

> I know how to create a custom agenda block, but how insert this ? Can I
> just have some leads ?

No, I did not mean custom agenda block. I meant custom agenda block
_type_ (just like agenda, alltodo, tags, etc).

Implementing a new custom block type involves writing a lot of Elisp.
Basically, you will need to write a custom version of, for example,
`org-tags-view' function that will collect, insert, and format text into
agenda buffer. It is the most generic, lowest level customization of Org
agenda.

After you have such function, you can use it in
`org-agenda-custom-commands' as

("key" "Agenda name" my-custom-agenda-type-function "Argument passed to your function"
  ...)

-- 
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] 4+ messages in thread

end of thread, other threads:[~2023-10-14 10:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-03  9:46 Add new word before an org-agenda entry (like "MODIFIED") Cletip Cletip
2023-10-12 11:41 ` Ihor Radchenko
2023-10-14 10:12   ` Cletip Cletip
2023-10-14 10:24     ` Ihor Radchenko

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.