unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#57321: 29.0.50; doc string and customization form for variable auto-save-file-name-transforms suboptimal
@ 2022-08-21 15:29 Gregor Zattler
  2022-08-21 23:36 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Gregor Zattler @ 2022-08-21 15:29 UTC (permalink / raw)
  To: 57321

Dear Emacs developers,

(customize-variable 'auto-save-file-name-transforms)

shows the customization form for this variable accompanied
by a doc string.

According to the doc string the argument UNIQUIFY may have
on of more than two values but the form only gives access to
a toggle switch.

Instead there should be a value menu, IMHO.


The documentation for UNIQUIFY, does not state clearly what
happens if UNIQUIFY is nil and what the perils are.

Where the doc now says "is non-nil" it probably should say
"is t" instead.




Thanks for your attention, Gregor





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#57321: 29.0.50; doc string and customization form for variable auto-save-file-name-transforms suboptimal
  2022-08-21 15:29 bug#57321: 29.0.50; doc string and customization form for variable auto-save-file-name-transforms suboptimal Gregor Zattler
@ 2022-08-21 23:36 ` Lars Ingebrigtsen
  2022-08-22  9:59   ` Gregor Zattler
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2022-08-21 23:36 UTC (permalink / raw)
  To: Gregor Zattler; +Cc: 57321

[-- Attachment #1: Type: text/plain, Size: 390 bytes --]

Gregor Zattler <grfz@gmx.de> writes:

> (customize-variable 'auto-save-file-name-transforms)
>
> shows the customization form for this variable accompanied
> by a doc string.
>
> According to the doc string the argument UNIQUIFY may have
> on of more than two values but the form only gives access to
> a toggle switch.

I'm unable to reproduce this -- with "emacs -Q" in Emacs 29, I get:


[-- Attachment #2: Type: image/png, Size: 68485 bytes --]

[-- Attachment #3: Type: text/plain, Size: 398 bytes --]


> The documentation for UNIQUIFY, does not state clearly what
> happens if UNIQUIFY is nil and what the perils are.

Well, it doesn't make the names unique, so you could overwrite
a different autosave file, but does that need to be said?

> Where the doc now says "is non-nil" it probably should say
> "is t" instead.

No, all non-nil values (except the ones in secure-hash-algorithms) work
fine.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#57321: 29.0.50; doc string and customization form for variable auto-save-file-name-transforms suboptimal
  2022-08-21 23:36 ` Lars Ingebrigtsen
@ 2022-08-22  9:59   ` Gregor Zattler
  2022-08-22 10:18     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Gregor Zattler @ 2022-08-22  9:59 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 57321

Hi Lars,
* Lars Ingebrigtsen <larsi@gnus.org> [2022-08-22; 01:36]:
> Gregor Zattler <grfz@gmx.de> writes:
>> (customize-variable 'auto-save-file-name-transforms)
>>
>> shows the customization form for this variable accompanied
>> by a doc string.
>>
>> According to the doc string the argument UNIQUIFY may have
>> on of more than two values but the form only gives access to
>> a toggle switch.
>
> I'm unable to reproduce this -- with "emacs -Q" in Emacs 29, I get:
> Hide Auto Save File Name Transforms:
> Repeat:
> [INS] [DEL] List:
>             Regexp: \`/[^/]*:\([^/]*/\)*\([^/]*\)\'
>             Replacement: /tmp/\2
>             Uniquify: [Toggle]  on (non-nil)
> [INS]

You get, what I got.

What I meant was, that one can only toggle the value of
UNIQUIFY from on to off and back, while this argument also
allows for the names of some secure hashes.  Therefore for
the sake of completeness the customization form should
feature a value menu instead of a toggle switch.

>> The documentation for UNIQUIFY, does not state clearly what
>> happens if UNIQUIFY is nil and what the perils are.
>
> Well, it doesn't make the names unique, so you could overwrite
> a different autosave file, but does that need to be said?
>
>> Where the doc now says "is non-nil" it probably should say
>> "is t" instead.
>
> No, all non-nil values (except the ones in secure-hash-algorithms) work
> fine.

The doc string is upside down.  Only after reading the
last part about the secure hashes one knows that "non-nil"
actually means "non-nil except for the names of secure
hashes".

Only when reading the part regarding UNIQUIFY being
"non-nil" one understands that the talk before about
replacing within the regex match actually is about the
directory the auto-saved-files are stored under.



That might not be important, though.  I can easily live
without the doc string being changed, now that I groked it.

Ciao,
--
Gregor





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#57321: 29.0.50; doc string and customization form for variable auto-save-file-name-transforms suboptimal
  2022-08-22  9:59   ` Gregor Zattler
@ 2022-08-22 10:18     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2022-08-22 10:18 UTC (permalink / raw)
  To: Gregor Zattler; +Cc: 57321

Gregor Zattler <grfz@gmx.de> writes:

> What I meant was, that one can only toggle the value of
> UNIQUIFY from on to off and back, while this argument also
> allows for the names of some secure hashes.  Therefore for
> the sake of completeness the customization form should
> feature a value menu instead of a toggle switch.

Ah, sorry -- I misunderstood.  I've now fixed the UNIQUIFY defcustom
type.

> The doc string is upside down.  Only after reading the
> last part about the secure hashes one knows that "non-nil"
> actually means "non-nil except for the names of secure
> hashes".

Yes, true.  I've now rephrased it in Emacs 29.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-22 10:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-21 15:29 bug#57321: 29.0.50; doc string and customization form for variable auto-save-file-name-transforms suboptimal Gregor Zattler
2022-08-21 23:36 ` Lars Ingebrigtsen
2022-08-22  9:59   ` Gregor Zattler
2022-08-22 10:18     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).