From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sf/3MqM9lmHTHwAAgWs5BA (envelope-from ) for ; Thu, 18 Nov 2021 12:48:51 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id wEg0LKM9lmHKbQAAB5/wlQ (envelope-from ) for ; Thu, 18 Nov 2021 11:48:51 +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 67F538BFB for ; Thu, 18 Nov 2021 12:48:51 +0100 (CET) Received: from localhost ([::1]:44014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mnfuM-0004bb-1D for larch@yhetil.org; Thu, 18 Nov 2021 06:48:50 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mnftq-0004bC-Pu for emacs-orgmode@gnu.org; Thu, 18 Nov 2021 06:48:18 -0500 Received: from [2a00:1450:4864:20::336] (port=45007 helo=mail-wm1-x336.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mnftp-0000Ia-8o for emacs-orgmode@gnu.org; Thu, 18 Nov 2021 06:48:18 -0500 Received: by mail-wm1-x336.google.com with SMTP id c71-20020a1c9a4a000000b0032cdcc8cbafso4567316wme.3 for ; Thu, 18 Nov 2021 03:48:16 -0800 (PST) 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:content-transfer-encoding; bh=YMNB8gJTwpggZ18rx6uWwIR/x6pXaSnkf5rmRum7xOQ=; b=Rl4hiexh4Q2Qk22S/dEKnW+p5AMwu44SJ3CpHFbfA6MNl5ZQLQ7t5W7Rfl1gR+9uc3 xGrp503HG4u5tFYCd1OLU8e0MVZPpWrvfeOsXA9qkj9Yr+Wwc37e9dOaevzF7e1a8Kf9 L42kMeGbaZ49BZ3nGW7B/vvk0CjqVTb8K+43suoY02gWSj8Crn++Kgf00LlHqocaewo6 6gSyv7O3leBfGP6PNXnnqOZgiVnWRUN6g8hjttiILAiLAOtGZ1yYAQXU+3m2Q42GB6do A/UMrzcZiylFNOqSHDmvMLOccD8sVt7QkVI0dLeC9/gmmJupyENXUkm0UxZRLitHBfcT wMew== 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:content-transfer-encoding; bh=YMNB8gJTwpggZ18rx6uWwIR/x6pXaSnkf5rmRum7xOQ=; b=HhO+tS5njz8jiL40PrwE7rBZFY4yqYbDb0tW04hX7Xhpwea9jc9Ue1GoliSUOQNX3m ID4mufjmf35Y/dZW6Ts6Ta9uKZUXtD1YjlqtRdiBJD7W/icuAHhecBho1toOygvzUXLz txGcJeuk5yjuiYG+LmXfbq9M5/vWpBANU37y30y5T4E3HjM5kkbUG48QEIvSHYb4mxk5 Kw1h/BcVqUTuIBNvu0QiLRgzBmWCeoH58F/6k14jN6QbYDvxuNUQaYSWQrJ5UIRxjJTf EDrbIaUItZzGaKR4bAUe2GnseOORzTbk5TFI1eDw1hxAx8LVbuYYFwq+vF4E8LzgN+o0 ND/w== X-Gm-Message-State: AOAM533gOoQUeSiMV6NkgikF2K0T5QCM+1+QaxjnI+pKvsRoQlOPpOeB YzVOG8acTNSwAP6PW+BeRVM= X-Google-Smtp-Source: ABdhPJxlkg3nFbV7LBcv41ImYqL4sw00QD/s39iIa8Rc3PmpQ9WiZEfmh1zpbG27DU5I/+11H947yQ== X-Received: by 2002:a7b:c24a:: with SMTP id b10mr9369729wmj.166.1637236095800; Thu, 18 Nov 2021 03:48:15 -0800 (PST) Received: from localhost ([91.210.107.150]) by smtp.gmail.com with ESMTPSA id j11sm2930429wrt.3.2021.11.18.03.48.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Nov 2021 03:48:15 -0800 (PST) From: Ihor Radchenko To: Carlos Pita Subject: Re: [BUG] org-occur doesn't hide unmatching top-levels [9.5 (release_9.5-225-g494c20.dirty @ /Users/carlos/Install/Source/org-mode/lisp/)] In-Reply-To: References: <87wnl6984h.fsf@localhost> <87h7c992p4.fsf@localhost> Date: Thu, 18 Nov 2021 19:49:39 +0800 Message-ID: <87wnl53cq4.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::336 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=yantar92@gmail.com; helo=mail-wm1-x336.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 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, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1637236131; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=YMNB8gJTwpggZ18rx6uWwIR/x6pXaSnkf5rmRum7xOQ=; b=rwzHKndWk6529IMAA8JYTIx/5aShOOWy7NC3ul9/XFjcknutbuaTOZ376XLZ0VC/x283JZ RnMVPcepiLsOoUF8vcJ0gIWcIvhEcFzdL4u5NRiaegxv8zjx64QsvnjYwhVM7bskrFfhRi 2lDlz9Lc7RtAiQb6uuvvZmhmTRnBlFdyXPmVMsUdLjYKWm8yNCvDtMy049Zbmzhwb8X3QG PcHXvtdq4CHp/3It0jonnvBri1pzJg+jqRyI2kUSi3+OW0MBxPrgxvZ/efVm43V9A0Cchl K3YaDTxfnHwObRd5w8fIQhxCb8LbIKb/DI5Oyoi1yenQsf3eVGtEQ5J8W0LyeA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637236131; a=rsa-sha256; cv=none; b=WwIU2p0f9gBhoLCfuk6O01ZsTYxSJzjp3LzJQAoZ76fm8MYx+hWJWgH1IlaF8yOvYxYoo1 fnIIdpArG2WwRdPUlbTVZGsDhY2I9kYORaXC4jpedZTpTvmR1Cvt/qwEIrXyWLqqObxEF6 eh9lL1MGmw6gPiNDl5l+JcD+vF5Mfgc9nxc8R7ELUG6Ij6D+V1XsVtVmzihPp5s/r4VO7L SU/JI2ZbxIJaLChWJFP6E+Q4vhsjmyGKSYDlV8NZN9RL7D2W/GSKrlJgeTX6w2cC1cBK5J wdvdoRMns4KK/EqHnDIJktzGBNrNRb0aMPq7YLJ9ajpvrZTwS8CIR2pJTBcK3w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Rl4hiexh; dmarc=pass (policy=none) header.from=gmail.com; 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: -3.56 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Rl4hiexh; dmarc=pass (policy=none) header.from=gmail.com; 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: 67F538BFB X-Spam-Score: -3.56 X-Migadu-Scanner: scn1.migadu.com X-TUID: inAPeIjJe3S3 Carlos Pita writes: >> I think you misread the docstring for org-show-context-detail: > > Sorry, I don't concur here. > > This is in the docstring I'm interested in (org-occur): I agree that org-occur could have a better docstring. > It's not very relevant to my concern if things are first hidden and > then revealed, because that will just change my question to why > top-levels are not hidden to begin with. Again: > > The tree will show the lines where the regexp matches, and any other = context > defined in =E2=80=98org-show-context-detail=E2=80=99, which see. > > The top-level headings in my example don't match the regexp and are > not part of the context that org-show-context-detail should reveal > with my current configuration. I cannot help concluding that this fact > contradicts the documentation. Currently, Org never ever hides headlines without parent and the top section of the Org buffers. Note that org-occur's docstring never explicitly states that all non-matching lines will be hidden, just that matching lines will be revealed and that the tree will be "compact". Though I understand your confusion and I do agree that we should either clarify the docstring or change org-occur to hide non-matching subtrees. Changing org-occur is actually trivial (just one LOC), but this would be a major change and can catch old Org users by surprise. I would prefer to hear other's opinions before pushing such patch upsteam. >> Consider agenda views. The relevant default value in > > I indeed considered the agenda, but I prefer using a sparse tree. I > have a file with a large number of brief notes in top level headings > and it's useful to see the expanded matching notes, the behaviour of > org-occur is ideal in this regard, instead the agenda only shows the > headings and even in follow mode it's more cumbersome than merely > pressing M-g n/p directly in the target buffer. FYI, there is org-agenda-entry-text-mode ("E" in agenda buffers). Best, Ihor