From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id +ABmBZdB5GC1PQEAgWs5BA (envelope-from ) for ; Tue, 06 Jul 2021 13:42:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id wEMhAZdB5GCbGwAA1q6Kng (envelope-from ) for ; Tue, 06 Jul 2021 11:42:15 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2D6E61F2BC for ; Tue, 6 Jul 2021 13:42:13 +0200 (CEST) Received: from localhost ([::1]:56272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0jSt-00061N-Kg for larch@yhetil.org; Tue, 06 Jul 2021 07:42:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0jRF-00060J-UU for emacs-orgmode@gnu.org; Tue, 06 Jul 2021 07:40:29 -0400 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]:45593) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0jRC-0002Ad-VO for emacs-orgmode@gnu.org; Tue, 06 Jul 2021 07:40:29 -0400 Received: by mail-pg1-x534.google.com with SMTP id y17so21085728pgf.12 for ; Tue, 06 Jul 2021 04:40:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=utec-edu-pe.20150623.gappssmtp.com; s=20150623; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=u49zJVfUoVruVWAbZgtN2kekMGrQmuS1qXBPoTcRxAs=; b=zG4wIgIKQKa12d1K70HZ1BBMUpMWkF/AjPXe/u9bu3OCffipmxSuwoRfiygktnDnjC ORGtrh5gcU1DN8Wzu8RAW9Wr63p21rC/qXZhFI3QAHxBf7E2X5Nz6sm39bAl7WsYUYZJ Vy6lOmrqa8osqME37+A/j6ZAJxI/ICjJb/UvbBUUArNqo5WaQRc2b5pxBVH71MBDFodx hjW7Bcuo7nxWbd64MzSXM2+h2oQYYOoAo/Z/ZCblftgoHCly/GNebJaSOirONOm2vmNY cXt5QW1Jz3iJDO65vl5lVN02JIfBKwFYU+K6WT1go2m/4gfcr6Codqdt7Sgnw6fm+imf 8A+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=u49zJVfUoVruVWAbZgtN2kekMGrQmuS1qXBPoTcRxAs=; b=T7vvIT90EGeQXNxZYtIc5Aoqqd52TtcbeyjN4MCv957sECHAyFU7/0ePqkM6iYccUk TjncwBP0Lg+9cn8oYtxaQipWGSJGvEf16YoBVZAPtSn10iYy0FzrB7+cF1sh/9ND+exi Zvb4v/IyNK/UVkBwNomdS3NkMfXmKk7VBK9U6SfprYTzrF0uZ514p6w0E8U9vhX6DfpZ 0jLLrJ6iN9IkWdcA3SbCDbFIh51zBTN0KAjYJBo06lzY0DZWfeABfNgU8en4NBIMEDWx 872lDl5e3TauK+kXf16rR9ijnxUx7qj3SVChOBk/NXqRNudTxfStlSLaVLOBz9gLgDtE TZzw== X-Gm-Message-State: AOAM533XwjxysbAKQ4Z4QrerSfDyux0f+UMBb/8mbXnxDth5THigWkYR jOFAkp/gobIo25eOLBu+jjSTxVkbpSt8jAv5wqZz2yud9feQ9nMXe0RU1bQxEmyegv29eF8ZwF+ EuyU6QnwmUvf2386J4Jo= X-Google-Smtp-Source: ABdhPJz6BZyPK79wWYjwJc24f8w4VYyKNGscYZir1tIDcH49oTD+3C+6dDVakv5nX6nQ0hvLFBQgnw== X-Received: by 2002:a65:454b:: with SMTP id x11mr20699277pgr.48.1625571624165; Tue, 06 Jul 2021 04:40:24 -0700 (PDT) Received: from r1 ([190.239.232.58]) by smtp.gmail.com with ESMTPSA id y1sm15962857pfe.72.2021.07.06.04.40.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jul 2021 04:40:23 -0700 (PDT) From: Rodrigo Morales To: emacs-orgmode@gnu.org Subject: [PATCH] Show drawers in text entries in Org Agenda References: <871r8cmfdt.fsf@utec.edu.pe> Date: Tue, 06 Jul 2021 06:40:10 -0500 In-Reply-To: <871r8cmfdt.fsf@utec.edu.pe> (Rodrigo Morales's message of "Mon, 05 Jul 2021 19:53:50 -0500") Message-ID: <87o8bfisbp.fsf@utec.edu.pe> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::534; envelope-from=rodrigo.morales@utec.edu.pe; helo=mail-pg1-x534.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625571733; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=u49zJVfUoVruVWAbZgtN2kekMGrQmuS1qXBPoTcRxAs=; b=daXZBG/lPFrPgIS418L9KQWI8VPFA6UVAM2I3pjamM0o/Yyl7YE/COtrzjfuwCxlFUvh7l XyBrQbfTcYbVa+kY6tQl6IAC/Fm4+J87yY9ySC21l91mYIxwV43I7oLZQd1IiXWclKffdf JgXQF/hoD3xWN5Bqh/1SUhOGjCNJxziiWJCRzey/ZSHYrg6lILesV2seVjR+6TBchvqeQp KMQwnJIfFyUe43RKw4GdPam1UM1jMOHl3qKjCGa4wi1yD8DC9YK8cxcHiHItfuRH2WUjA+ D+u6CLGF8TJ7HYp7WzOJkt/N1VklpSkJ2ALVrNDcdIO/5D6Uq0zPjVJGd8pV1Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625571733; a=rsa-sha256; cv=none; b=R6XRxgGxp5HgI/Qr3ZGIrnfGF4l5zsL7hV7MlTHKNttD2qzHnjkQkizDexHX72T0hZWw2W 04qnSgq6vQ6hlgz3w3QwoclcbN0+ZbYuImtYV+/o/a46hc+335AmGUFuoqR0G1ooA+EDQc ZgGv7gB0heRz+jzeTPiRpMRte4Q3rVLAno5NyIBp9w0OJTWXWXcBeoaqDwoc1EL1bCZTB7 XqzlxSNj+l8TeaJVv/uwJndmc2Ms7t6CE+X/hwl7FSPz7FXP75duD1ZuYSl3qecgZZPCBT QpPYKMpqJXPTYVhKRd4ohxTtg7wbb3qoXcK2zd3yTiH8GMBAgbkuGhmeQQ/CHw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=utec-edu-pe.20150623.gappssmtp.com header.s=20150623 header.b=zG4wIgIK; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -2.61 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=utec-edu-pe.20150623.gappssmtp.com header.s=20150623 header.b=zG4wIgIK; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 2D6E61F2BC X-Spam-Score: -2.61 X-Migadu-Scanner: scn0.migadu.com X-TUID: 2n0IaDz5F8Jp --=-=-= Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Rodrigo Morales writes: > > For this reason, I am wondering whether there is a way to make > =3Dorg-agenda-entry-text-mode=3D to show the drawers without much > tinkering. >=20 After inspecting the source code of Org Mode, I managed to do what I was searching by deleting the relevant part of the function =3Dorg-agenda-get-some-entry-text=3D. 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. --=20 La informaci=F3n contenida en este e-mail y sus anexos es confidencial,=20 privilegiada y est=E1 dirigida exclusivamente a su destinatario, en=20 consecuencia, solo puede ser utilizada por aquel. Si usted no es el=20 destinatario original, no deber=E1 examinar, usar, copiar o distribuir este= =20 mensaje o la informaci=F3n que contiene. Si lo recibe por error, por favor= =20 reenv=EDelo a la persona que se lo envi=F3 y elim=EDnelo. Cualquier retenci= =F3n o=20 uso total o parcial no autorizada de este mensaje est=E1 estrictamente=20 prohibida y sancionada por ley. --=-=-= Content-Type: text/plain -- [[[ If you see a signature in spanish below this message, please omit it, it has to do with the internal privacy policies of the organization that owns the domain of my email address. ]]] --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-org-agenda.el-Added-defcustom-for-visiblity-of-drawe.patch >From 389ac7b8029d9ed4d0b862481465e3edfa8515de Mon Sep 17 00:00:00 2001 From: Rodrigo Morales Date: Tue, 6 Jul 2021 06:26:11 -0500 Subject: [PATCH] org-agenda.el: Added defcustom for visiblity of drawers in text entries * lisp/org-agenda.el: Added boolean defcustom for visibility of drawers in text entries in Org Agenda buffers. --- lisp/org-agenda.el | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 44acd035a..c558e7fcd 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -1074,6 +1074,11 @@ removed from entry text before it is shown in the agenda." :group 'org-agenda :type 'string) +(defcustom org-agenda-entry-text-hide-drawers t + "Non-nil means hide drawers in entry text in agenda buffers." + :group 'org-agenda + :type 'boolean) + (defvar org-agenda-entry-text-cleanup-hook nil "Hook that is run after basic cleanup of entry text to be shown in agenda. This cleanup is done in a temporary buffer, so the function may inspect and @@ -3676,12 +3681,13 @@ removed from the entry content. Currently only `planning' is allowed here." (set-text-properties (match-beginning 0) (match-end 0) nil)) (goto-char (point-min)) - (while (re-search-forward drawer-re nil t) - (delete-region - (match-beginning 0) - (progn (re-search-forward - "^[ \t]*:END:.*\n?" nil 'move) - (point)))) + (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) (goto-char (point-min)) (while (re-search-forward kwd-time-re nil t) -- 2.32.0 --=-=-=--