From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.devel Subject: Re: A question about overlays and performance. Date: Wed, 29 Jul 2020 09:36:06 +0800 Message-ID: <87sgdb3xx5.fsf@localhost> References: <835zabcz8d.fsf@gnu.org> <87365foyam.fsf@localhost> <87tuxttda9.fsf@localhost> <87wo2ncg7j.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6640"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Jeff Norden , Stefan Monnier , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jul 29 03:37:25 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k0b24-0001dQ-PF for ged-emacs-devel@m.gmane-mx.org; Wed, 29 Jul 2020 03:37:24 +0200 Original-Received: from localhost ([::1]:56642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k0b23-0005pb-Qo for ged-emacs-devel@m.gmane-mx.org; Tue, 28 Jul 2020 21:37:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52166) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k0b1Y-0005Ot-HK for emacs-devel@gnu.org; Tue, 28 Jul 2020 21:36:52 -0400 Original-Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]:39211) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k0b1W-0007Ym-Si; Tue, 28 Jul 2020 21:36:52 -0400 Original-Received: by mail-pf1-x42d.google.com with SMTP id z188so4232961pfc.6; Tue, 28 Jul 2020 18:36:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=C828cfvkrH+ZvAN2RAa2ZkRY/qQyEAPoxiA3JqGyMog=; b=ugsAq7EzAd69J806pplkMJO2TQ9TlK446ygiNhs/3Zzz2SGc0F6zhfZ9f5zFj0M5TV P43GcZsU3QWGYA1p53f2beRBpCd2xhzi088ltFet5/m0KoMp7rfwcxuXgVL9g7639A40 W41pAC79o+ionsRNWEwSf6oYvXFrh5/N9PK8V2rwmhO4y9tjzprgUB4ohdhdLEY1RSX9 TDNysEaSk0YY2UKvMC5oKB2mNhXkCyHa7c4cPE+mvrSDDinIfFWP5mXbFJbO6H1heAXO oKMziyT2tOhz5LyIHHmgtZg6tCE7+05eNcNF/gJwjtSBtNVyc6zdH/rgTVLBHBK5NAE/ V9QQ== 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:in-reply-to:references:date :message-id:mime-version; bh=C828cfvkrH+ZvAN2RAa2ZkRY/qQyEAPoxiA3JqGyMog=; b=aEe9LNvkDz7tC1nQRCkzpAfG1XSBBDXj6Emj0CCXexdtk0pLdZDe9sEYFD8kChT4NX booVEtB0gnMsehx3xlheSBOoLYPEUAGets9YxXr54mfziF77tuMTsbnTVfZc/XiPJXYh 6ylNb0ZRM1IxS4XdbfZHGn/WY95geq/4Lq91cIilCo9m5gRDU0t5s3fjtYvXQWB2z10c Fo+pNn0vy0DKRnxUV03whW37YNdBUl/xsp3GaxUHiHK4b675P/LNde4w6sgYiChtUWdK TbM2jpytaNEoss+69xnTGD5mpHAdx7UdNSfwAP5eBhiDKBq046VKqdA3oezS3PFRfT+K Oydg== X-Gm-Message-State: AOAM533DQLF6KnH/POWX9oCUvwtLfFYXK/wclOSh7BXWINESghm/tsSV SFQ6NuORTWY8FfTeLFHyEI8eKxNEz5cTfQ== X-Google-Smtp-Source: ABdhPJzgF663ZhgSadET0tNnY0y6M0Ko917mn4Cn4KkwepV9SP+PTw8svCBkdaTXYTsVppufsNFaYw== X-Received: by 2002:a63:f04d:: with SMTP id s13mr21079887pgj.100.1595986608531; Tue, 28 Jul 2020 18:36:48 -0700 (PDT) Original-Received: from localhost ([101.99.64.65]) by smtp.gmail.com with ESMTPSA id c2sm280304pgb.52.2020.07.28.18.36.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2020 18:36:47 -0700 (PDT) In-Reply-To: <87wo2ncg7j.fsf@mail.linkov.net> Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=yantar92@gmail.com; helo=mail-pf1-x42d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:253321 Archived-At: > Any chance to fix also bug#40808? It's still open because there is > no solution for isearching invisible text in org-mode. Thanks for pointing out this bug. Searching actually works fine on my feature branch + patched isearch (though it is actually an unintended side-effect). However, (setq isearch-lazy-count t) leaves the last headline open. I will need to investigate this. > The problem is that org-mode puts the text property 'invisible' > only when the link is scrolled into view, I guess it puts the property > using font-lock. > > So it seems org-mode needs to use font-lock-ensure on the line > with the next search hit before calling isearch-filter-predicate > on the found occurence. I am currently undecided about searchability of hidden text in links. Do I understand correctly that you prefer the hidden parts of links to be searchable? Either way is possible. If hidden parts are searchable, it will be even possible to show them temporarily. Best, Ihor Juri Linkov writes: >> I am currently working on re-implementing org-mode folding from using >> overlays to text-properties. > > Any chance to fix also bug#40808? It's still open because there is > no solution for isearching invisible text in org-mode. > > Here's a short test case that demonstrates the problem in org-mode: > > 0. emacs -Q > 1. visit emacs/etc/ORG-NEWS > 2. isearch for "http": C-s http C-s C-s C-s ... > > it eventually stops at org links where "http" is invisible, such as > > [[https://orgmode.org/worg/library-of-babel.html][here]] > > The problem is that org-mode puts the text property 'invisible' > only when the link is scrolled into view, I guess it puts the property > using font-lock. > > So it seems org-mode needs to use font-lock-ensure on the line > with the next search hit before calling isearch-filter-predicate > on the found occurence. -- Ihor Radchenko, PhD, Center for Advancing Materials Performance from the Nanoscale (CAMP-nano) State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong University, Xi'an, China Email: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg