From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: search-invisible and friends Date: Fri, 11 Sep 2020 12:35:53 +0700 Message-ID: References: <87zh5z9l9y.fsf@gnus.org> <838sdjko39.fsf@gnu.org> <871rj9957z.fsf@gnus.org> <83a6xxk8nj.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30666"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Lars Ingebrigtsen , Emacs developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 11 07:36:41 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 1kGbjl-0007t4-N0 for ged-emacs-devel@m.gmane-mx.org; Fri, 11 Sep 2020 07:36:41 +0200 Original-Received: from localhost ([::1]:37806 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGbjk-0007dk-Cq for ged-emacs-devel@m.gmane-mx.org; Fri, 11 Sep 2020 01:36:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54436) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGbjG-0007D4-6t for emacs-devel@gnu.org; Fri, 11 Sep 2020 01:36:10 -0400 Original-Received: from mail-ua1-x92d.google.com ([2607:f8b0:4864:20::92d]:33234) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGbjC-0004RG-SY; Fri, 11 Sep 2020 01:36:09 -0400 Original-Received: by mail-ua1-x92d.google.com with SMTP id u48so2749338uau.0; Thu, 10 Sep 2020 22:36:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=a8MkzYupF8bRFWfKhHyeDLHOAzbQPABSOhHTc6W9EIs=; b=KXR/ep0H3aopDJDdtm7c8YS0uPzD2gw4WOuWSo7S1YzjTjIWHu6m+qKgO/rwitGvTo 9reXoCbl3/NlqOik0JtXMtfuYqrzMV0ZEps53aS3NQpxwud7oS4RkoSJ5LDsJ+EljXbz /qM6mCuOmnXzMYM0hd8ZfgD8c2QepPaIbn3Mk6pRNkT1Sn0Z8joAWBXeSjQs26A5jpzH lr1Xgu8wNwIMK3ffjngVt5omweGppsgz5UWjBm8YW1F5zFrAsVh64DCYESz9xdX3qpCk PnjYD19l9AzecvpmGW0SZ7l9lvXpQzEXHOuzr9T4eXtqTtLyUBgvq6Dse43G5HPc/Rq6 o8qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=a8MkzYupF8bRFWfKhHyeDLHOAzbQPABSOhHTc6W9EIs=; b=by1hnZsSesUqxaHzzPnj+PVGZUhZct9ToE5ytbfxFeal1LeU4GOy+J+np3JZncKv51 f50cQSoqScaYl+2bYtJ4zzkIJmJ8/7T2R/TSr395689fj8uC0HnwnsVHrAGm4y6xzAty M9u9piixl6nZB1RPUONC3Lr3uEqW9QcJyJQ0vOSZHVICbm16TAjqGUBvzcfba4T7THCn 9YonMfvszQPpJILuJ8UrK3JAbVvhvG7hpHwbSLN94xiL1hmhlXYf3mTTOe92sP1m7Pop WcHw49DZfsuhNoQvewYLd9uG3ah6AQGxeP7Te/ET9zkuZu26+H0v/DFZDdoaBqhCXB/f FQGg== X-Gm-Message-State: AOAM532usoxTgJoazPjfCaLpWCc9ygSRRQWQrVOoegFLWyw3U/ZkgLdB 8y9S5YQg2ud6nDTyegYXvxNfuh/7J3xjwnT8rlaRGi0NBvWUTg== X-Google-Smtp-Source: ABdhPJw+SOIE4PDIScOTNm+m12wv+Iz7/tEJvuJnaTmIm9Tq8/uH7aDNx2WRU8xn4OGGJ+buuY21LIXgb/N016uUplo= X-Received: by 2002:ab0:20a:: with SMTP id 10mr134674uas.86.1599802565143; Thu, 10 Sep 2020 22:36:05 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::92d; envelope-from=yurivkhan@gmail.com; helo=mail-ua1-x92d.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: -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-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:255093 Archived-At: On Thu, 10 Sep 2020 at 22:04, Stefan Monnier wro= te: > OTOH, maybe there could be unusual circumstances where it would make > sense to consider hidden text as "visible" (e.g. if the `display` > property replaces the text with something that looks very much like the > same text, tho maybe rendered a bit differently). So, maybe there > should be a value of `no-search` (or some other property) which says > "please do consider this text as visible even tho it's technically > hidden". In this thread, I see attempts to implement an ad-hoc rule for ignoring or not ignoring parts of buffer text when searching. I wonder what happens if we attack the issue from a different angle. The =E2=80=98display=E2=80=99 property can replace buffer text with a diffe= rent string or an image for purposes of display. Maybe it makes sense to have a property that can similarly specify a different string for purposes of search? A property that can replace buffer text with a different string or a waveform for purposes of text-to-speech? A base64-encoded image would specify =E2=80=98display=E2=80=99 to display a= n image, =E2=80=98search=E2=80=99 to an empty string, and =E2=80=98speak=E2=80=99 to= "image" or something descriptive (cf. HTML ). A mode could propertize the string =E2=80=98LaTeX=E2=80=99 with =E2=80=98di= splay=E2=80=99 =3D nice image of the LaTeX logo but no =E2=80=98search=E2=80=99 or =E2=80=98speak=E2=80= =99 properties (so search and text-to-speech work on the original representation). A mode that replaces one word with another could decide which aspects (display, search and/or text-to-speech) it wants to affect and how.