From: Ihor Radchenko <firstname.lastname@example.org>
To: Rodrigo Morales <email@example.com>
Subject: Re: [PATCH] Show drawers in text entries in Org Agenda
Date: Sat, 30 Apr 2022 13:11:58 +0800 [thread overview]
Message-ID: <874k2bupcx.fsf@localhost> (raw)
Rodrigo Morales <firstname.lastname@example.org> 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
> 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.
prev parent reply other threads:[~2022-04-30 5:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-06 0:53 [Q] Show drawers in Org Agenda search buffer with org-agenda-entry-text-mode Rodrigo Morales
2021-07-06 11:40 ` [PATCH] Show drawers in text entries in Org Agenda Rodrigo Morales
2021-07-14 8:58 ` Rodrigo Morales
2022-04-30 5:11 ` Ihor Radchenko [this message]
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
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).