From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id eFk4BR7FbGKZbAEAbAwnHQ (envelope-from ) for ; Sat, 30 Apr 2022 07:11:58 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id eMS+BB7FbGJhbQAAG6o9tA (envelope-from ) for ; Sat, 30 Apr 2022 07:11:58 +0200 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 78DA322ECF for ; Sat, 30 Apr 2022 07:11:57 +0200 (CEST) Received: from localhost ([::1]:35278 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkfOd-0004YH-Rl for larch@yhetil.org; Sat, 30 Apr 2022 01:11:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkfNw-0004Y7-Mw for emacs-orgmode@gnu.org; Sat, 30 Apr 2022 01:11:13 -0400 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]:35479) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkfNv-0004Hn-8T for emacs-orgmode@gnu.org; Sat, 30 Apr 2022 01:11:12 -0400 Received: by mail-pj1-x102b.google.com with SMTP id w5-20020a17090aaf8500b001d74c754128so12199973pjq.0 for ; Fri, 29 Apr 2022 22:11:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=I/wk8LGzQ3Fcpm00hb2/37kjyzIHzz6nE5WcYtzjyDM=; b=RaBsDe4PzxixWD/GFASZLJ23TcvaAzXToW+fs0BDrbiDjZxSLONOJOHuXki7F2jA0I RGZKfZpWQay0IkrIhcX5wb98zLt/DVcMA9AMs23I+YZbcdl6Fx4IdHy1ffKgR7YOgdTT NNIWlKiUbfsnhJodUurRrL+WcwI+uQ5Sq1I+zs3+fUaW/o/IQMxY15B2UuB2H2Do5Ajb V2AGMqBWEqa+ljbiVTzwnJwoz2SrPEpYu9cRrD27Rn4GhUkqcygpveEksgaPWzZfEiPX 1oxJ2RsQTrIdoEJZ9HdOhr+8qO2d+MXxKiyh6uWgs++UVtG0mOawLpCV/ZGxJxMxEYXf bOEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=I/wk8LGzQ3Fcpm00hb2/37kjyzIHzz6nE5WcYtzjyDM=; b=gnQabG9y9LJbgiJbKxf4LRw5eRAxin1Vs7GRE2r5OIOQyDRu5Sfekkp0+90SIl8UIh eskAQckBMLdXb6qt5wC58BAjtB6qlMkmcUPcj7zpvUb8WAZqKzsOD/V0nmqxiFE2lSRp j2y2bFf5lpJmdVieNSmitJRy+vquNh5WBswTxcGI4cqC9+n+GUGSKjIJP5UjkKZtpp5Q UmctotcErom8RLE6VkX/CRBHN996kxrEU+Gq8mTe/nZ6RWJTWdZ8t1uQnnA+rq1WZd09 xtV3QJXJBDgDYj6YG1nitBdICbwEOiWL4FfZFyHSoZHT4JLj/tVPqOTUV/jn7lDLElhp KmbQ== X-Gm-Message-State: AOAM533to6FIkg5rNDBhuG3726H3p0Z+rvJCInw7ijTkPwTioQjor0Te VIAlVowYY9J3nuZ2KdjAgcg= X-Google-Smtp-Source: ABdhPJyQfvZbNBrv7GvSAh3tyaVMD/8wuMa5Ss2IGqBmrfuhAGNTudkqSb1qFJHnNwqPRKhs0e596A== X-Received: by 2002:a17:90b:33c8:b0:1d9:8cda:fd70 with SMTP id lk8-20020a17090b33c800b001d98cdafd70mr7654503pjb.161.1651295469835; Fri, 29 Apr 2022 22:11:09 -0700 (PDT) Received: from localhost ([45.83.130.130]) by smtp.gmail.com with ESMTPSA id t15-20020a170902e84f00b0015e8d4eb25asm484627plg.164.2022.04.29.22.11.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 22:11:09 -0700 (PDT) From: Ihor Radchenko To: Rodrigo Morales Subject: Re: [PATCH] Show drawers in text entries in Org Agenda In-Reply-To: <87o8bfisbp.fsf@utec.edu.pe> References: <871r8cmfdt.fsf@utec.edu.pe> <87o8bfisbp.fsf@utec.edu.pe> Date: Sat, 30 Apr 2022 13:11:58 +0800 Message-ID: <874k2bupcx.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=yantar92@gmail.com; helo=mail-pj1-x102b.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, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1651295517; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=I/wk8LGzQ3Fcpm00hb2/37kjyzIHzz6nE5WcYtzjyDM=; b=lQduwsWKwJEu0mbTBv4B7Mc642Lx/i/xtpeNTJCvxdxSyYF3CbbOSNbXQm2+v5NxZDYDy6 wOjPPA58BFrWTMR7wz4US/ImUnBuksTtiQGC66eTK3515wXO57iT8gqlMYsj+oGQUaWbG6 4xl3LlJem/8Aughz+lUu9eYN5FLT8JfYzRKini45KonjbHeUVS0RjzF1O5fGajlL/59DFC tNQ4ZzPC4JCaoC3nLCom+VGpQRRwyOG+pQmQBC7JHKJWGG7vGAVbXmkAD2gXXsFAd8JMFn O463qz5acw5a/vlELBVagO5s3s+3p+6TfJecO0BQNqcQ/8br0gKVV34q7b61zQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651295517; a=rsa-sha256; cv=none; b=Ssp/tktgc/rQP63rt2RwrJ9NNAlGtg88uBr5XKggQuRMiZi7hlJpWnrmjV8412P17WxvFe 5cakh33+Rayci09xXIElgknsjOBsLKPRUhyt2wv3eingWwgnJSlmKVR6aFSa43hsPOfdmJ a3SdWQIa/C20C9d6XYNWq3Tsw5aHNbb8EMnqa1Ct+sW0MxDh51AZbUMK6yu3MMGNnvnCLI Wf/hUgPl8064whhAiWDEySXRHhcKO1avJB/IhRdfmx0q8pdyusvcmtyb7LAxXbjxZFLpkK dUX6UWpeksu0WhgFhU1M1i1k5aicW2VC8IxX5TVyJbnU3AhHa+3jRVvBmL8xaw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=RaBsDe4P; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.49 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=RaBsDe4P; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 78DA322ECF X-Spam-Score: -3.49 X-Migadu-Scanner: scn1.migadu.com X-TUID: 1vSed7Cx4E4x Rodrigo Morales 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