From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id OJNCLk5b5l8/MQAA0tVLHw (envelope-from ) for ; Fri, 25 Dec 2020 21:36:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id gDs9Kk5b5l8dWAAA1q6Kng (envelope-from ) for ; Fri, 25 Dec 2020 21:36:14 +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 3233E9403A7 for ; Fri, 25 Dec 2020 21:36:14 +0000 (UTC) Received: from localhost ([::1]:56836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ksuku-0006HM-KI for larch@yhetil.org; Fri, 25 Dec 2020 16:36:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49950) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksuk9-0006HF-Hk for emacs-orgmode@gnu.org; Fri, 25 Dec 2020 16:35:25 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:53321) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ksuk6-0005gi-Hh for emacs-orgmode@gnu.org; Fri, 25 Dec 2020 16:35:25 -0500 Received: by mail-wm1-x32f.google.com with SMTP id k10so4175395wmi.3 for ; Fri, 25 Dec 2020 13:35:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=8SpDhLNnTznZQJ1dRRv0fq2H5lWxyXaz2hR4B6DlChM=; b=rhdfYVOlAr+vPOsXXgDRv2EfBB0SMwMKZSB7tCSQVqRlTsywgzl5qc4wbcBNGW9uGm M+4yTbtNymKUSxZ5HrV0ddqfjIaMIp+iNxrPRdXFykM0ByEsfzof6fWrClsJF2rZ//A5 uG7ndNPsypTFgz4NbVC0+vEgnF1PeP90Y/vTiJfyEVHel2a7RE8N+9oRx20b5A6D0Tcl 7gemmCm070Cw8FhPyjhJutbnqyw+fDS/z19TqQJVOUfoEHPVSFle/QMIbjhrbJPABKyk AiLjWQ59n/bfaa+jXnTkJ6ubhnKX79DplLbdmTsDzPj1E/5kTVxJYijIrUZVDptp/03Y te3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=8SpDhLNnTznZQJ1dRRv0fq2H5lWxyXaz2hR4B6DlChM=; b=p1j7lfvTBlD2rvp0Hm1HXhnfEldYxbuI4RxWAZsl/LzSv9Ij+wyb9vZh0meRs3fFAz PWEGw6OTRcRHLGBZBnOQsmnv6pW4Jdbxj00WMvd9pMjwGPTtA6As+9T6euDV6cTzDecz fNzLomkPMu/imxCIe1iK84LrbipY+aPoSui5QULIFj6jy/UM0Ro4xDZkIYV6H4qbc22b oPqnb5H/Oik1WU6VS6kUx9xILetIhQ2ibdRGTglfDc4/FJ0YKv/bPpmSANIzMSzK12+c LXL9VcWB/a1RBFiGqpzwZ8VEiw8uZNrdYuMYCAnv7JMZJ/lDLEJvQNYyMkBoxcgZTyfs VfEg== X-Gm-Message-State: AOAM531zdt315DwXHZoSoAC1y8tph9s01Y4cHZZhptwr8PZP9yWWKrPW MutkqvIiz9MvKyQYMdGeqSQMTTu2mfI= X-Google-Smtp-Source: ABdhPJwMnOZGqRUyYs7ebVRLMfDfwg8ceWUODJoeekAi2uEembJNYZiXxGtNqvPqSOxFPPKKHOBlgA== X-Received: by 2002:a1c:1fc4:: with SMTP id f187mr9877429wmf.107.1608932120632; Fri, 25 Dec 2020 13:35:20 -0800 (PST) Received: from hirondell (alyon-654-1-449-182.w109-213.abo.wanadoo.fr. [109.213.105.182]) by smtp.gmail.com with ESMTPSA id s3sm8658609wmc.44.2020.12.25.13.35.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Dec 2020 13:35:19 -0800 (PST) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Ihor Radchenko Subject: Re: [9.4] Fixing logbook visibility during isearch References: <87h7x9e5jo.fsf@localhost> <87wo4en8qk.fsf@nicolasgoaziou.fr> <87mu31adeu.fsf@localhost> <871rkcbx40.fsf@kyleam.com> <87mu301in8.fsf@localhost> <87lfh5vvrp.fsf@localhost> <87sgbc4qpl.fsf@gmail.com> <87sgbaw58y.fsf@localhost> <87pn6ew2pv.fsf@localhost> <8736393tlw.fsf@gmail.com> <87eemtm1ic.fsf@localhost> <875z83hwuc.fsf@gmail.com> <874knm61p3.fsf@localhost> <87r1nrdl5o.fsf_-_@gmail.com> <87r1nqjv9w.fsf@localhost> <87czz91v9h.fsf@gmail.com> <87v9d15dd5.fsf@localhost> <87blesa3mg.fsf@gmail.com> <875z4zam2s.fsf@localhost> <8735zu7p2u.fsf@gmail.com> <87bleizjh6.fsf@localhost> Date: Fri, 25 Dec 2020 22:35:18 +0100 In-Reply-To: <87bleizjh6.fsf@localhost> (Ihor Radchenko's message of "Fri, 25 Dec 2020 10:51:17 +0800") Message-ID: <87sg7th8mh.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=kevin.legouguec@gmail.com; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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_FROM=0.001, 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: , 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-Spam-Score: -1.52 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=rhdfYVOl; 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: 3233E9403A7 X-Spam-Score: -1.52 X-Migadu-Scanner: scn0.migadu.com X-TUID: 0WJg9uhqD1rF Ihor Radchenko writes: > However, org-cycle-hide-drawers might be called in > isearch-open-invisible-temporary. This callback receives two arguments: - the overlay which contains a match, - whether we are un-hiding the overlay's span or hiding it back. To get the same behaviour as Org=E2=89=A49.3, IIUC we want to do the follow= ing: 1. When isearch asks us to un-hide, 1. go over all drawers within the overlay, 2. hide those that do not contain a match, by adding an invisible overlay. 2. When isearch asks us to hide back, 1. remove the invisible overlays we have put on these drawers. 1.1. is straightforward: overlay-start and overlay-end tell us where to look for drawers. 1.2. stumps me: is there an isearch API I can use while in the callback to know where the matches are located? For 2.1, I guess we will need to cache the temporary invisible overlays we add during step 1. in a global list; that way when it's time to destroy them, we can simply iterate on the list? (Sorry for being so slow =F0=9F=98=95 I never seem to be able to spend more= than 10 minutes on this issue before having to switch to something else=E2=80=A6)