GNU bug report logs - #47119
28.0.50; [patch][Dired] new user option for compressing dir suffix

Previous Next

Package: emacs;

Reported by: Lin Sun <lin.sun <at> zoom.us>

Date: Sat, 13 Mar 2021 03:57:02 UTC

Severity: wishlist

Tags: fixed, patch

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 47119 in the body.
You can then email your comments to 47119 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#47119; Package emacs. (Sat, 13 Mar 2021 03:57:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lin Sun <lin.sun <at> zoom.us>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 13 Mar 2021 03:57:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Lin Sun <lin.sun <at> zoom.us>
To: "via Bug reports for GNU Emacs,
 the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
Subject: 28.0.50; [patch][Dired] new user option for compressing dir suffix
Date: Sat, 13 Mar 2021 11:55:48 +0800
[Message part 1 (text/plain, inline)]
Hi,

A new user option `dired-compress-files-default-suffix' for
controlling the default format for compressing directory.
[0001-dired-new-user-option-dired-compress-files-default-suffix.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47119; Package emacs. (Sat, 13 Mar 2021 07:38:02 GMT) Full text and rfc822 format available.

Message #8 received at 47119 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lin Sun <lin.sun <at> zoom.us>
Cc: 47119 <at> debbugs.gnu.org
Subject: Re: bug#47119: 28.0.50;
 [patch][Dired] new user option for compressing dir suffix
Date: Sat, 13 Mar 2021 09:37:05 +0200
> Date: Sat, 13 Mar 2021 11:55:48 +0800
> From:  Lin Sun via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> A new user option `dired-compress-files-default-suffix' for
> controlling the default format for compressing directory.

Thanks, but wouldn't it be better to use symbols instead of strings?
That way, we could prevent typos easier, and also offer completion for
setting the option interactively.

Also, doesn't the user manual need to be changed as well?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47119; Package emacs. (Sat, 13 Mar 2021 07:51:02 GMT) Full text and rfc822 format available.

Message #11 received at 47119 <at> debbugs.gnu.org (full text, mbox):

From: Lin Sun <lin.sun <at> zoom.us>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: sunlin <sunlin7 <at> yahoo.com>, 47119 <at> debbugs.gnu.org
Subject: Re: bug#47119: 28.0.50; [patch][Dired] new user option for
 compressing dir suffix
Date: Sat, 13 Mar 2021 15:50:17 +0800
[Message part 1 (text/plain, inline)]
Hi Eli,

Thanks for your comments, I add the ":type 'string" for this new
option, and the manual change is reverted now. New patch is attached.

On Sat, Mar 13, 2021 at 3:37 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > Date: Sat, 13 Mar 2021 11:55:48 +0800
> > From:  Lin Sun via "Bug reports for GNU Emacs,
> >  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> >
> > A new user option `dired-compress-files-default-suffix' for
> > controlling the default format for compressing directory.
>
> Thanks, but wouldn't it be better to use symbols instead of strings?
> That way, we could prevent typos easier, and also offer completion for
> setting the option interactively.
>
> Also, doesn't the user manual need to be changed as well?
[0001-dired-new-user-option-dired-compress-files-default-suffix.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47119; Package emacs. (Thu, 18 Mar 2021 15:43:01 GMT) Full text and rfc822 format available.

Message #14 received at 47119 <at> debbugs.gnu.org (full text, mbox):

From: Lin Sun <lin.sun <at> zoom.us>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: sunlin <sunlin7 <at> yahoo.com>, "47119 <at> debbugs.gnu.org" <47119 <at> debbugs.gnu.org>
Subject: RE: Re: bug#47119: 28.0.50; [patch][Dired] new user option for
 compressing dir suffix
Date: Thu, 18 Mar 2021 23:41:53 +0800
[Message part 1 (text/html, inline)]
[0001-dired-new-user-option-dired-compress-files-default-s.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47119; Package emacs. (Sat, 20 Mar 2021 10:38:02 GMT) Full text and rfc822 format available.

Message #17 received at 47119 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lin Sun <lin.sun <at> zoom.us>
Cc: sunlin7 <at> yahoo.com, 47119 <at> debbugs.gnu.org
Subject: Re: bug#47119: 28.0.50; [patch][Dired] new user option for
 compressing dir suffix
Date: Sat, 20 Mar 2021 12:37:13 +0200
> Date: Thu, 18 Mar 2021 23:41:53 +0800
> From: Lin Sun <lin.sun <at> zoom.us>
> Cc: "47119 <at> debbugs.gnu.org" <47119 <at> debbugs.gnu.org>, 
> 	sunlin <sunlin7 <at> yahoo.com>
> 
> > but wouldn't it be better to use symbols instead of strings?
> 
> The new option `dired-compress-files-default-suffix` can be “.tar.gz” or “.tar.xz”… and it should work with
> variable ` dired-compress-file-suffixes` while this variable maybe extended by user. So the type:string is
> simple for implementation.

Getting a string (the name of a symbol) from a symbol is very easy, so
I'm not sure I understand the reasoning.  But I won't insist.

> ++++
> +*** New user option 'dired-compress-files-default-suffix'.
> +This user option controls default suffix for compressing directory.  If it's
> +nil, the ".tar.gz" will be used. Refer the 'dired-compress-files-alist' for
> +supported suffix list.           ^^^^^^^^^

"Refer to the ..."

> -    ;; This item controls the compression of directories.  Its REGEXP
> -    ;; element should never match any valid file name.
> -    ("\000" ".tar.gz" "tar -cf - %i | gzip -c9 > %o"))
> +    ("\\.tar\\'" ".tgz" nil))

Why did you remove the "\000" entry?  As the comment explains, it is
there to allow compressing a directory.  To compress a directory, you
need to run 'tar' on it first, and the .tar.gz/.tar.xz entries run
'tar' on the _result_ of gzip/xz instead.  So how will compression of
directories work after your changes?  I feel that I'm missing
something here, but what?

> +(defcustom dired-compress-files-default-suffix nil
> +  "Default suffix for compressing directory.
                                     ^^^^^^^^^
"directories", in plural.

> +If nil, the \".tar.gz\" will be used.  See `dired-compress-files-alist' for \
> +the supported suffixes list."                                           ^^^^
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
"for the list of supported suffixes"

> +                          (rule (cl-find-if
> +                                 (lambda (x) (string-match-p (car x) suffix))
> +                                 dired-compress-files-alist)))

Do we really need cl-find-if here? what's wrong with assoc?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47119; Package emacs. (Mon, 22 Mar 2021 12:30:01 GMT) Full text and rfc822 format available.

Message #20 received at 47119 <at> debbugs.gnu.org (full text, mbox):

From: LinSun <lin.sun <at> zoom.us>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: "sunlin7 <at> yahoo.com" <sunlin7 <at> yahoo.com>,
 "47119 <at> debbugs.gnu.org" <47119 <at> debbugs.gnu.org>
Subject: RE: bug#47119: 28.0.50; [patch][Dired] new user option for
 compressing dir suffix
Date: Mon, 22 Mar 2021 20:28:48 +0800
[Message part 1 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47119; Package emacs. (Mon, 22 Mar 2021 12:32:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47119; Package emacs. (Mon, 22 Mar 2021 17:44:02 GMT) Full text and rfc822 format available.

Message #26 received at 47119 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: LinSun <lin.sun <at> zoom.us>
Cc: sunlin7 <at> yahoo.com, 47119 <at> debbugs.gnu.org
Subject: Re: bug#47119: 28.0.50; [patch][Dired] new user option for
 compressing dir suffix
Date: Mon, 22 Mar 2021 19:43:41 +0200
> Date: Mon, 22 Mar 2021 20:28:48 +0800
> From: LinSun <lin.sun <at> zoom.us>
> Cc: "47119 <at> debbugs.gnu.org" <47119 <at> debbugs.gnu.org>, 
> 	"sunlin7 <at> yahoo.com" <sunlin7 <at> yahoo.com>
> 
> >> -    ("\000" ".tar.gz" "tar -cf - %i | gzip -c9 > %o"))
> 
> >Why did you remove the "\000" entry?  As the comment explains, it is
> 
> >there to allow compressing a directory.  To compress a directory, you
> 
> >need to run 'tar' on it first, and the .tar.gz/.tar.xz entries run
> 
> >'tar' on the _result_ of gzip/xz instead.  So how will compression of
> 
> >directories work after your changes?  I feel that I'm missing
> 
> >something here, but what?
> 
> The “\000” entry is special for compress directory, if you go through back, other entries in the
> `dired-compress-file-suffixes` is decompress commands. After apply this patch, the “\000” entry is useless.

I'm still missing something, I think.  Please describe step by step
how compressing a directory will work after your changes, and in
particular what shell command(s) will Dired run in that case.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47119; Package emacs. (Tue, 23 Mar 2021 03:02:02 GMT) Full text and rfc822 format available.

Message #29 received at 47119 <at> debbugs.gnu.org (full text, mbox):

From: LinSun <lin.sun <at> zoom.us>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: "sunlin7 <at> yahoo.com" <sunlin7 <at> yahoo.com>,
 "47119 <at> debbugs.gnu.org" <47119 <at> debbugs.gnu.org>
Subject: RE: bug#47119: 28.0.50; [patch][Dired] new user option for
 compressing dir suffix
Date: Tue, 23 Mar 2021 11:00:46 +0800
[Message part 1 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47119; Package emacs. (Tue, 23 Mar 2021 15:17:02 GMT) Full text and rfc822 format available.

Message #32 received at 47119 <at> debbugs.gnu.org (full text, mbox):

From: Lin Sun <lin.sun <at> zoom.us>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: sunlin <sunlin7 <at> yahoo.com>, "47119 <at> debbugs.gnu.org" <47119 <at> debbugs.gnu.org>
Subject: RE: Re: bug#47119: 28.0.50; [patch][Dired] new user option for
 compressing dir suffix
Date: Thu, 18 Mar 2021 23:41:53 +0800
[Message part 1 (text/html, inline)]
[0001-dired-new-user-option-dired-compress-files-default-s.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47119; Package emacs. (Fri, 02 Apr 2021 00:58:01 GMT) Full text and rfc822 format available.

Message #35 received at 47119 <at> debbugs.gnu.org (full text, mbox):

From: Sun Lin <sunlin7 <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Lin Sun <lin.sun <at> zoom.us>
Cc: 47119 <at> debbugs.gnu.org
Subject: Re: bug#47119: 28.0.50; [patch][Dired] new user option for
 compressing dir suffix
Date: Fri, 2 Apr 2021 00:57:20 +0000 (UTC)
[Message part 1 (text/plain, inline)]
 There is another user option `compress-file-default-suffix` that allow user custom default suffix for compressing file in dired-mode.

These two patch allow user custom suffix for compressing folder and file in dired-mode by pressing "Z".

Both two patches are attached.     On Tuesday, March 23, 2021, 11:16:13 PM GMT+8, Lin Sun <lin.sun <at> zoom.us> wrote:  
 
 #yiv1694401698 #yiv1694401698 -- filtered {}#yiv1694401698 filtered {}#yiv1694401698 filtered {}#yiv1694401698 filtered {}#yiv1694401698 p.yiv1694401698MsoNormal, #yiv1694401698 li.yiv1694401698MsoNormal, #yiv1694401698 div.yiv1694401698MsoNormal {margin:0in;margin-bottom:.0001pt;font-size:11.0pt;font-family:sans-serif;}#yiv1694401698 .yiv1694401698MsoChpDefault {}#yiv1694401698 filtered {}#yiv1694401698 div.yiv1694401698WordSection1 {}#yiv1694401698 
Hi Eli,

  

Sorry for my misunderstanding for your preview comments.

  

> but wouldn't it be better to use symbols instead of strings?

The new option `dired-compress-files-default-suffix` can be “.tar.gz” or “.tar.xz”… and it should work with variable ` dired-compress-file-suffixes` while this variable maybe extended by user. So the type:string is simple for implementation.

  

And yes, the document need update, changes are available in the attachment.

  

Please help to review the new patch. Thanks.
  
[Message part 2 (text/html, inline)]
[0001-dired-new-user-option-dired-compress-files-default-s.patch (text/x-patch, attachment)]
[0002-dired-new-user-option-dired-compress-file-default-su.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47119; Package emacs. (Mon, 17 May 2021 16:06:02 GMT) Full text and rfc822 format available.

Message #38 received at 47119 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Sun Lin <sunlin7 <at> yahoo.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 47119 <at> debbugs.gnu.org,
 Lin Sun <lin.sun <at> zoom.us>
Subject: Re: bug#47119: 28.0.50; [patch][Dired] new user option for
 compressing dir suffix
Date: Mon, 17 May 2021 18:04:54 +0200
Sun Lin <sunlin7 <at> yahoo.com> writes:

> There is another user option `compress-file-default-suffix` that allow user custom
> default suffix for compressing file in dired-mode.
>
> These two patch allow user custom suffix for compressing folder and file in
> dired-mode by pressing "Z".
>
> Both two patches are attached. 

Thanks; applied to Emacs 28 with some small changes.

I'm not quite sure I understood the \000 change, but in testing, things
seem to work fine for me.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 17 May 2021 16:06:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 47119 <at> debbugs.gnu.org and Lin Sun <lin.sun <at> zoom.us> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 17 May 2021 16:06:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47119; Package emacs. (Tue, 18 May 2021 01:24:02 GMT) Full text and rfc822 format available.

Message #45 received at 47119 <at> debbugs.gnu.org (full text, mbox):

From: Sun Lin <sunlin7 <at> yahoo.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>,
 "47119 <at> debbugs.gnu.org" <47119 <at> debbugs.gnu.org>, Lin Sun <lin.sun <at> zoom.us>
Subject: RE: bug#47119: 28.0.50; [patch][Dired] new user option for
 compressing dir suffix
Date: Tue, 18 May 2021 09:21:43 +0800
[Message part 1 (text/plain, inline)]
Hi Lars,

Great, thank you! : )

Best Regards
Lin Sun
From: Lars Ingebrigtsen
Sent: Tuesday, May 18, 2021 00:05
To: Sun Lin
Cc: Eli Zaretskii; Lin Sun; 47119 <at> debbugs.gnu.org
Subject: Re: bug#47119: 28.0.50; [patch][Dired] new user option for compressing dir suffix

Sun Lin <sunlin7 <at> yahoo.com> writes:

> There is another user option `compress-file-default-suffix` that allow user custom
> default suffix for compressing file in dired-mode.
>
> These two patch allow user custom suffix for compressing folder and file in
> dired-mode by pressing "Z".
>
> Both two patches are attached. 

Thanks; applied to Emacs 28 with some small changes.

I'm not quite sure I understood the \000 change, but in testing, things
seem to work fine for me.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47119; Package emacs. (Tue, 18 May 2021 14:56:01 GMT) Full text and rfc822 format available.

Message #48 received at 47119 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Sun Lin <sunlin7 <at> yahoo.com>, Eli Zaretskii <eliz <at> gnu.org>,
 47119 <at> debbugs.gnu.org, Lin Sun <lin.sun <at> zoom.us>
Subject: Re: bug#47119: 28.0.50;
 [patch][Dired] new user option for compressing dir suffix
Date: Tue, 18 May 2021 10:55:14 -0400
Lars Ingebrigtsen wrote:

> [...] in testing, things seem to work fine for me.

files-tests-file-name-non-special-dired-compress-handler
fails since dac20f08. Ref eg https://hydra.nixos.org/build/143251935
Reproduced on CentOS 8.3.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47119; Package emacs. (Tue, 18 May 2021 15:50:01 GMT) Full text and rfc822 format available.

Message #51 received at 47119 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Sun Lin <sunlin7 <at> yahoo.com>, Eli Zaretskii <eliz <at> gnu.org>,
 47119 <at> debbugs.gnu.org, Lin Sun <lin.sun <at> zoom.us>
Subject: Re: bug#47119: 28.0.50; [patch][Dired] new user option for
 compressing dir suffix
Date: Tue, 18 May 2021 17:49:27 +0200
Glenn Morris <rgm <at> gnu.org> writes:

> Lars Ingebrigtsen wrote:
>
>> [...] in testing, things seem to work fine for me.
>
> files-tests-file-name-non-special-dired-compress-handler
> fails since dac20f08. Ref eg https://hydra.nixos.org/build/143251935
> Reproduced on CentOS 8.3.

Thanks; this should now be fixed.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47119; Package emacs. (Wed, 19 May 2021 00:14:02 GMT) Full text and rfc822 format available.

Message #54 received at 47119 <at> debbugs.gnu.org (full text, mbox):

From: Sun Lin <sunlin7 <at> yahoo.com>
To: Glenn Morris <rgm <at> gnu.org>, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>,
 "47119 <at> debbugs.gnu.org" <47119 <at> debbugs.gnu.org>, Lin Sun <lin.sun <at> zoom.us>
Subject: Re: bug#47119: 28.0.50; [patch][Dired] new user option for
 compressing dir suffix
Date: Wed, 19 May 2021 00:12:54 +0000 (UTC)
Hi Lars, Glenn,

Thank you so much, it's my failed, glad it's fixed now. 


Best Regards

On Tuesday, May 18, 2021, 03:49:36 PM UTC, Lars Ingebrigtsen <larsi <at> gnus.org> wrote: 

Glenn Morris <rgm <at> gnu.org> writes:


> Lars Ingebrigtsen wrote:
>
>> [...] in testing, things seem to work fine for me.
>
> files-tests-file-name-non-special-dired-compress-handler
> fails since dac20f08. Ref eg https://hydra.nixos.org/build/143251935
> Reproduced on CentOS 8.3.


Thanks; this should now be fixed.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog: http://lars.ingebrigtsen.no





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47119; Package emacs. (Wed, 19 May 2021 15:49:01 GMT) Full text and rfc822 format available.

Message #57 received at 47119 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Sun Lin <sunlin7 <at> yahoo.com>, Eli Zaretskii <eliz <at> gnu.org>,
 47119 <at> debbugs.gnu.org, Lin Sun <lin.sun <at> zoom.us>
Subject: Re: bug#47119: 28.0.50;
 [patch][Dired] new user option for compressing dir suffix
Date: Wed, 19 May 2021 11:47:53 -0400
I also wonder how useful it is to say eg "the default nil means .tar"
rather than just making the default value be ".tar"?
(Spotted because the custom :type did not allow for nil.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47119; Package emacs. (Thu, 20 May 2021 10:21:02 GMT) Full text and rfc822 format available.

Message #60 received at 47119 <at> debbugs.gnu.org (full text, mbox):

From: LinSun <lin.sun <at> zoom.us>
To: Glenn Morris <rgm <at> gnu.org>, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Sun Lin <sunlin7 <at> yahoo.com>, Eli Zaretskii <eliz <at> gnu.org>,
 "47119 <at> debbugs.gnu.org" <47119 <at> debbugs.gnu.org>
Subject: RE: bug#47119: 28.0.50; [patch][Dired] new user option for
 compressing dir suffix
Date: Thu, 20 May 2021 18:20:21 +0800
[Message part 1 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47119; Package emacs. (Tue, 25 May 2021 04:58:01 GMT) Full text and rfc822 format available.

Message #63 received at 47119 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Sun Lin <sunlin7 <at> yahoo.com>, Eli Zaretskii <eliz <at> gnu.org>,
 47119 <at> debbugs.gnu.org, Lin Sun <lin.sun <at> zoom.us>
Subject: Re: bug#47119: 28.0.50; [patch][Dired] new user option for
 compressing dir suffix
Date: Tue, 25 May 2021 06:56:55 +0200
Glenn Morris <rgm <at> gnu.org> writes:

> I also wonder how useful it is to say eg "the default nil means .tar"
> rather than just making the default value be ".tar"?
> (Spotted because the custom :type did not allow for nil.)

Yes, defaulting to .tar/.gz in these two variables does sound more regular.

LinSun <lin.sun <at> zoom.us> writes:

> The nil is useful for distinguish default value from custom setting value.

You can have non-nil default values -- the defcustom machinery keeps
track of what the defaults are.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 22 Jun 2021 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 308 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.