all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: scratch/tzz/auth-source-reveal-mode 4a7c98d 3/3: Create and document auth-source-reveal-mode
Date: Wed, 24 Jun 2020 19:04:10 +0000	[thread overview]
Message-ID: <zh8sjnf9.fsf@lifelogs.com> (raw)
In-Reply-To: <83v9jgs43x.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 24 Jun 2020 21:36:34 +0300")

On Wed, 24 Jun 2020 21:36:34 +0300 Eli Zaretskii <eliz@gnu.org> wrote: 

>> From: Ted Zlatanov <tzz@lifelogs.com>
>> Cc: monnier@iro.umontreal.ca,  emacs-devel@gnu.org
>> Date: Wed, 24 Jun 2020 18:15:05 +0000
>> 
EZ> Alternatively, if the purpose is to display some text as something
EZ> else, we already have display properties and overlays that can be (and
EZ> are) used for implementing such features; why not use them instead?
>> 
>> I would welcome help in implementing the prettify-text-* internals
>> better (supporting bidirectional script and anything else you would
>> consider required) and asked for help with it earlier. I'll need a hand
>> from someone knowledgeable, or at least a pointer to code that provides
>> the same functionality as `prettify-symbols-mode' in a way that's
>> acceptable. I listed the functionality in (1) above.

EZ> I would like first to understand why you thought about using the
EZ> prettify-symbols-mode technique for this.

Well, it did exactly what I needed and worked well in my testing.

See thread "Re: questions about correct reveal-mode usage to hide
passwords":

On Thu, 11 Jun 2020 15:51:27 -0400 Stefan Monnier <monnier@iro.umontreal.ca> wrote: 
> Ted wrote: 
>> Is there an example using jit-lock that behaves like
>> prettify-symbols-mode in the following cases?
>> 
>> * transforms the text when outside it
>> * temporarily shows the original text when inside it or on its right edge
>> * updates when the user makes changes

SM> Maybe if you look at the `csv-align-mode` in GNU ELPA's `csv-mode.el`
SM> (tho it mixes the job of aligning columns and of truncating/hiding the
SM> text of columns that are too wide).

EZ> The natural features to use
EZ> for displaying some text instead of what's in the buffer are 'display'
EZ> text properties and overlay strings, and the natural feature for
EZ> hiding some text is the 'invisible' text property.  So why didn't you
EZ> use these features to begin with?  What am I missing?

I spent several fruitless hours in that direction. Since I didn't have
more hours to spend, I went with the working solution I could
understand. This didn't happen in a vacuum, I posted my questions to
emacs-devel in the thread above.

Ted



  reply	other threads:[~2020-06-24 19:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200622191653.26453.39420@vcs0.savannah.gnu.org>
     [not found] ` <20200622191655.E1C4E20A26@vcs0.savannah.gnu.org>
2020-06-22 20:00   ` scratch/tzz/auth-source-reveal-mode f16a4c8 2/3: Support regular expressions and API for prettify-symbols-mode Stefan Monnier
2020-06-22 20:32     ` Ted Zlatanov
     [not found] ` <20200622191656.2D20920A26@vcs0.savannah.gnu.org>
2020-06-22 20:03   ` scratch/tzz/auth-source-reveal-mode 4a7c98d 3/3: Create and document auth-source-reveal-mode Stefan Monnier
2020-06-22 20:39     ` Ted Zlatanov
2020-06-22 21:09       ` Stefan Monnier
2020-06-23 22:29         ` Ted Zlatanov
2020-06-24 15:13           ` Eli Zaretskii
2020-06-24 18:15             ` Ted Zlatanov
2020-06-24 18:36               ` Eli Zaretskii
2020-06-24 19:04                 ` Ted Zlatanov [this message]
2020-06-25 13:31                   ` Eli Zaretskii
2020-06-26 13:52                     ` Ted Zlatanov
2020-06-26 14:24                       ` Eli Zaretskii
2020-06-26 14:39                         ` Ted Zlatanov
2020-07-12 20:49                           ` Ted Zlatanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=zh8sjnf9.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.