emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH] Show drawers in text entries in Org Agenda


From: Ihor Radchenko
Subject: Re: [PATCH] Show drawers in text entries in Org Agenda
Date: Sat, 30 Apr 2022 13:11:58 +0800

Rodrigo Morales <rodrigo.morales@utec.edu.pe> writes:

>> For this reason, I am wondering whether there is a way to make
>> =org-agenda-entry-text-mode= to show the drawers without much
>> tinkering.
>> 
>
> After inspecting the source code of Org Mode, I managed to do what I was
> searching by deleting the relevant part of the function
> =org-agenda-get-some-entry-text=. This function unconditionally removes
> drawers from subtrees in order for the remaining content be shown in
> text entries.
>
> I've created the following patch which adds a defcustom that would allow
> the user to decide whether drawers must be hidden or shown in text
> entries. Hope this helps.

Thanks! The patch looks useful.

> +(defcustom org-agenda-entry-text-hide-drawers t
> +  "Non-nil means hide drawers in entry text in agenda buffers."
> +  :group 'org-agenda
> +  :type 'boolean)
> +             (when org-agenda-entry-text-hide-drawers
> +               (while (re-search-forward drawer-re nil t)
> +                 (delete-region
> +                  (match-beginning 0)
> +                  (progn (re-search-forward
> +                          "^[ \t]*:END:.*\n?" nil 'move)
> +                         (point)))))
>            (unless (member 'planning keep)

I'd prefer if you reuse the KEEP argument to
org-agenda-get-some-entry-text. It is already designed for such things.

Best,
Ihor



reply via email to

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