emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scratch/tzz/auth-source-reveal-mode 4a7c98d 3/3: Create and document


From: Ted Zlatanov
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]