From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id TjGnCyM+fWD1LwAAgWs5BA (envelope-from ) for ; Mon, 19 Apr 2021 10:24:03 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id bYItOyI+fWDCNgAA1q6Kng (envelope-from ) for ; Mon, 19 Apr 2021 08:24:02 +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 824D22DB7D for ; Mon, 19 Apr 2021 10:24:02 +0200 (CEST) Received: from localhost ([::1]:40946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYPCL-0000ME-BN for larch@yhetil.org; Mon, 19 Apr 2021 04:24:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34840) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYP9m-0007nx-Df for emacs-orgmode@gnu.org; Mon, 19 Apr 2021 04:21:22 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:51781) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYP9k-0005c8-M1 for emacs-orgmode@gnu.org; Mon, 19 Apr 2021 04:21:22 -0400 Received: from localhost (40-67.ipv4.commingeshautdebit.fr [185.131.40.67]) (Authenticated sender: admin@nicolasgoaziou.fr) by relay11.mail.gandi.net (Postfix) with ESMTPSA id BF105100015; Mon, 19 Apr 2021 08:21:17 +0000 (UTC) From: Nicolas Goaziou To: Cheong Yiu Fung Subject: Re: [PATCH] org.el (org-show-context-detail): add option 'ancestors-with-entry References: <878s5inyb2.fsf@yiufung.net> Mail-Followup-To: Cheong Yiu Fung , emacs-orgmode@gnu.org Date: Mon, 19 Apr 2021 10:21:16 +0200 In-Reply-To: <878s5inyb2.fsf@yiufung.net> (Cheong Yiu Fung's message of "Fri, 16 Apr 2021 21:39:29 +0800") Message-ID: <87y2ded6rn.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=217.70.178.231; envelope-from=mail@nicolasgoaziou.fr; helo=relay11.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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: , Cc: emacs-orgmode@gnu.org 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=1618820642; 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; bh=RPrS880laz6OCisfoYT75Qos6qT9jzJstE2xHAMgvVA=; b=av3I5L2LPrbHqXJSpvXJdglQ1nX9BkqqNh9fQ6LwWi0cy56tB/Pbuvv7jOwaTJmrvxYNgn TKdy60WwooMX4SOXHsyhmSTfsz+t+IdM6Td8qK+7x+v1HNs19dkgPrcsNxDRyWwpZXbMbH JvKc6HE9ZAi55nxSRD0SJ2CzRPbYixDxcseMQm+LPFoCDxn3vxSKguAJ/Itexe+YxCCuxe xnv9yg0tDf5EN0JIZhTe+kVeCvUltKTxQ9yy5LBFBoJoEgSKJxwkRVHIli4a1XpiA0MfYq tckrNcOEtgjpicqpUyUfwGGJYgcphwvP5e6gL3bcAR8hdfTDvlI09X1vG8Lh0w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618820642; a=rsa-sha256; cv=none; b=iebKlbTMxALqZ2hK4zkuFfkHR1H2VCP5CCelQXyEbfCLxWTvy0Fv/c1j58UKCHMjC+kTtk ZcYXTuPuLwyRao9UKwSQ73qUklwMS9QzQOLD4mYaia7Xf6Fry83H0AP/npRIduQDp9QxkE fDZ0uEBKfqUP/q3mqXmmIybAfxDMHsDoCRfNTrgf5M5U0qw4wksMMK4jkauu5ybuhf7R4e ntFvcB7k1/3OmzE/REsQvKkwXC3TpFpUxQfPkbSSkOlSr/5yrsm2ojYUOmaHih0vQiLNAA tQ/vlc2B4Gu5jjIP18WiKaCdsxPr4k6dHiQkIPVfiiZ8KljDM2l9p6DcFc5bxA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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-Spam-Score: -2.44 Authentication-Results: aspmx1.migadu.com; dkim=none; 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: 824D22DB7D X-Spam-Score: -2.44 X-Migadu-Scanner: scn0.migadu.com X-TUID: PgkTWFLFdo0y Hello, Cheong Yiu Fung writes: > Hi, I'm proposing a new option in `org-show-context-detail', which shows > current headline, its ancestors, *and the entry itself*. This is useful > when export matched subtrees and their contents quickly with least > manual intervention. > > Consider when working on different aspects of a project and taking notes > as we go: > > * Project > A project tree > ** Task1 > ** Task2 > *** ASK Something to align > Something for discussion > ** Task3 > ** Task4 > *** ASK Something else to align > Something else. > > At some point, we may wish to export only certain contents. For example, > to export headings with TODO keyword of "ASK", along with the task > context (ancestors TASK heading name), and their own content for > discussion with colleagues. Ideally, this can be done by > org-sparse-tree, followed by org-export with visible-only + subtree-only > option. > > Expected output: > * Project > ** Task2 > *** ASK Something to align > Something for discussion > ** Task4 > *** ASK Something else to align > Something else. > > Current options, though, either require manual expansion to show both > ancestors AND entry, which becomes tedious soon; > > * Project > ** Task2 > *** ASK Something to align > ** Task4 > *** ASK Something else to align > > or it shows extra contents (`local' will include the *next* heading, in > this example, the non-related Task3) > > * Project > *** ASK Something to align > Something for discussion > ** Task3 > *** ASK Something else to align > Something else. > > `ancestor-with-entries' is a long name that pose some difficulties to > updating documentations, so I wish to have some feedbacks before moving > on. Is there better way to achieve this effect? Am I overlooking > something? Don't you need to simply move point within the entry and use `ancestors' view? Regards, -- Nicolas Goaziou