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 SNXuG3s0lmHURwEAgWs5BA (envelope-from ) for ; Thu, 18 Nov 2021 12:09:47 +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 QHu0F3s0lmGbVgAAB5/wlQ (envelope-from ) for ; Thu, 18 Nov 2021 11:09:47 +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 D18BE3FF97 for ; Thu, 18 Nov 2021 12:09:42 +0100 (CET) Received: from localhost ([::1]:42976 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mnfIU-0007gI-07 for larch@yhetil.org; Thu, 18 Nov 2021 06:09:42 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44082) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mnfDz-0003D0-CN for emacs-orgmode@gnu.org; Thu, 18 Nov 2021 06:05:03 -0500 Received: from [2607:f8b0:4864:20::a2a] (port=46879 helo=mail-vk1-xa2a.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mnfDv-0001Lh-1S for emacs-orgmode@gnu.org; Thu, 18 Nov 2021 06:05:02 -0500 Received: by mail-vk1-xa2a.google.com with SMTP id t127so3499755vke.13 for ; Thu, 18 Nov 2021 03:04:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=/MEwFpfzI7G77CLSF6pwvJ+qJOv7HvzUS20cPDGn86I=; b=mHEReo+d7JYKasEhPslPMvQVkrtIfHjG90XJhqIR4GQfyzv0T8i9znsGcQpDQMqzMb oknMblQAt1TXtrCmvIW+GOxSwI0zmpkUHu7Vw9bA0+USyi0Vh5D2ANpYsfBop8ET9uz+ 5VSQqpAjdpACzkJ8C6UAbvNFtz/uLQVPg1F1YxNcVqMVK3yBbAT2jX/QoGoCIMnpn07R 6wGfGnlsrw6a8I7Nn7MiZmh45tLKP9YWQb/GxUNsd849SrORatvI+8mo5ob9N/1COPcU GzFGGsCFcA4CHnO9jcx7BQMXp2tlrP3qfSTXEH2LLxWdCAbcxobAXI7tfdI16clwC2oZ pWpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=/MEwFpfzI7G77CLSF6pwvJ+qJOv7HvzUS20cPDGn86I=; b=y3TUuSOfvGVzPjJr/mi87Cjd8G39l4Z8P7kcQsITQSmHPYcO/inup2mItueP4GdVaO chxkrJlDIaRN9MAPv6Iaw43MMk9ScLq0h9P33Bi921LDzGuU1BvsTf4zMIVi3uAgdsNn bM1Hsd5Mmo5xt/pHdXIUW/IGplWUzZJca0oQ+M8mZfiKVvvrCbUtAT9A804PsAvDoLTs 6INR0bw9kNF2rjVMrPQaEvFr+OcdcCKqklIjjx76a8uqr1kq0MVBznPgfmhIRHStcVPl 6zJQ7NrNFIsbY52U5+HsqkSSNHETNV/83+RZY0fMz+427POwiyJHjjxWfSH7WgpYibbM Sygw== X-Gm-Message-State: AOAM532dIjr8xUZYc9m7IYOjMOm5nylypJ+XzwIpmKSQCF/kS3Q2iVC9 i8DqNlFeEaIjiUVyIq5TEw90/z0V8sCajOOCqHTG1m95 X-Google-Smtp-Source: ABdhPJxCqYLUoWxDD6EwVPOS5tZM8HETfzQYJ+mgSzVuMWBGcvkf7MSBGeddQWBOQVnp2Hn4ssdrBHLf2p7Gci48c4Q= X-Received: by 2002:a05:6122:2158:: with SMTP id m24mr35557493vkd.1.1637233496642; Thu, 18 Nov 2021 03:04:56 -0800 (PST) MIME-Version: 1.0 References: <87wnl6984h.fsf@localhost> <87h7c992p4.fsf@localhost> In-Reply-To: <87h7c992p4.fsf@localhost> From: Carlos Pita Date: Thu, 18 Nov 2021 08:04:43 -0300 Message-ID: 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/)] To: Ihor Radchenko Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::a2a (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::a2a; envelope-from=carlosjosepita2@gmail.com; helo=mail-vk1-xa2a.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=1637233782; 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=/MEwFpfzI7G77CLSF6pwvJ+qJOv7HvzUS20cPDGn86I=; b=Uj8WfPAiiZ6PbmCWffxh4MpxnIv5QSEBQlz2zp4MTa7h9PZ9TOX4efIOLI0qK/ILbSwVKp NTDOs8fxrzboNU8ZvApbuusPdq5+lsuIyzO68rM/fGBeq9u1zvN2gbvE6kamXmGIA9gR9V iWGwZN0DFsmTHJTjZi+O72Bk9YWtz5mo8WDewYTNDVbpjn2FNrXaLXSOgDi1xggpXHf4SR 261g3zlbvkTLvQ9ZunlRKl1z8/TUHHmKo1MFK/yKV0oRUasBsrUbV7bcaAXz81ABtCJQI+ +T8rmlshAhh7sIOl8wQlrZv/3CZdp3I2W9xqetTgXS8IZ0+MOyFZnKBcrezl7A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637233782; a=rsa-sha256; cv=none; b=oXeFowP1bNrLS7oQCfltULdtH1jkoicEOZ57VGMEi2RoUuY1n5eOkVTIgBDlSJUBt9S0kI w0G39fnytSsQ9+GTATYPD3siUjuH3C0Mm97gItYLWDTOv5CMKNGtxFQnwUoiMm2VbH0XL8 d+h2ts9hENWc0RS3mcenWViglmXcJc0E9PbAwZukGEy3VBWMD3kpITaR7ZiLBINs48aPti FzMQIOy1K1GPITNgAIdk3A45oM2CUabTBmvLXe7yRXny9pkjVQwKrGQFMa0TbWNUOEStlG XvnUlDMEsnyY7GV5KcTY5mJa4AgK5gYh5p097FFXL16Ztg/YLfZvJ1nbBjdkmg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=mHEReo+d; 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: -4.06 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=mHEReo+d; 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: D18BE3FF97 X-Spam-Score: -4.06 X-Migadu-Scanner: scn1.migadu.com X-TUID: NBE9+RQUI8Xw Hi Ihor, On Thu, Nov 18, 2021 at 7:28 AM Ihor Radchenko wrote: > > Carlos Pita writes: > > > I see no reason why a match inside b2 will hide b1 and b3 but not a > > and c (I'm referring to the headings, not the contents). > > 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): The tree will show the lines where the regexp matches, and any other co= ntext defined in =E2=80=98org-show-context-detail=E2=80=99, which see. It might be that org-show-context-detail is used for org-reveal, but this says it's also used for org-occur, which makes sense. Besides, there is occur-tree when using the command =E2=80=98org-occur=E2=80=99 (=E2= =80=98C-c / /=E2=80=99) as a context for org-show-context-detail and it indeed makes a difference in what is shown and what is hidden. > This variable does not control how much text is hidden, but rather how > much context is revealed around a folded text. > Your misunderstanding may come from the fact that you are interested in > org-occur, which first folds everything inside lowest-level headings. 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 co= ntext 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. Moreover, even if a escape clause were found in the documentation, the examples I've presented show a behavior that is clearly different for the top-level compared to any other level and that alone calls for some kind of explanation IMO, as it is now it seems arbitrary, perhaps there is an obvious reason for this that I'm failing to grasp. > 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. The problem I have now is that hundreds of unmatching headings are still shown just because they happen to be at the top-level. I see I could demote them or just use the agenda, it's no big deal after all. But because of all the reasons above I judge that the current behavior is not right, that's the reason for my report. Nevertheless, thank you for your suggestions, as always. Best regards, Carlos