GNU bug report logs - #7518
image-dired defcustom'd paths

Previous Next

Package: emacs;

Reported by: MON KEY <monkey <at> sandpframing.com>

Date: Tue, 30 Nov 2010 00:36:02 UTC

Severity: wishlist

Done: Chong Yidong <cyd <at> stupidchicken.com>

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 7518 in the body.
You can then email your comments to 7518 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 owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7518; Package emacs. (Tue, 30 Nov 2010 00:36:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to MON KEY <monkey <at> sandpframing.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 30 Nov 2010 00:36:02 GMT) Full text and rfc822 format available.

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

From: MON KEY <monkey <at> sandpframing.com>
To: bug-gnu-emacs <at> gnu.org
Subject: image-dired defcustom'd paths
Date: Mon, 29 Nov 2010 19:40:59 -0500
current through bzr revision 102504

Now that ImageMagick libs are accessble to Emacs24 maybe more users
will be using image-dired.

The defcustom form for variables

`image-dired-dir',
`image-dired-db-file',
`image-dired-temp-image-file',
`image-dired-gallery-dir'
`image-dired-temp-rotate-image-file',

each evaluate `locate-user-emacs-file' when binding their default path
values.

There is something wrong about this.

AFAIK `image-dired' isn't loaded by default. Why should _each_ of
these variables elevate to creation of a `user-emacs-directory'
if/when one doesn't already exit? By the time (require 'image-dired)
gets evaluated shouldnt' `user-emacs-directory' already be well
established?

At best only `image-dired-dir' should need to to this and even then it
is suspect. Maybe the rest of the do somethign more like:

(make-directory
 (expand-file-name "some/path-for/image-dired-var" image-dired-dir))

or, respectively:

(make-directory
 (expand-file-name "some/path-for/image-dired-var" image-dired-dir) t)


Also, w/re those of the above variables which bind directory paths for
a temporary files, e.g.:

 `image-dired-temp-image-file' and `image-dired-temp-rotate-image-file'

Why not just use `temporary-file-directory' and/or
`small-temporary-file-directory' as the base paths?

--
/s_P\




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7518; Package emacs. (Sun, 05 Dec 2010 01:00:03 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> stupidchicken.com>
To: MON KEY <monkey <at> sandpframing.com>
Cc: 7518 <at> debbugs.gnu.org
Subject: Re: bug#7518: image-dired defcustom'd paths
Date: Sat, 04 Dec 2010 20:05:05 -0500
MON KEY <monkey <at> sandpframing.com> writes:

> `image-dired-dir', `image-dired-db-file',
> `image-dired-temp-image-file', `image-dired-gallery-dir'
> `image-dired-temp-rotate-image-file',
>
> each evaluate `locate-user-emacs-file' when binding their default path
> values.
>
> There is something wrong about this.
>
> AFAIK `image-dired' isn't loaded by default. Why should _each_ of
> these variables elevate to creation of a `user-emacs-directory'
> if/when one doesn't already exit?

This sentence does not parse.

The usage of locate-user-emacs-file in image-dired is correct, as far as
I can tell.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7518; Package emacs. (Mon, 06 Dec 2010 00:51:02 GMT) Full text and rfc822 format available.

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

From: MON KEY <monkey <at> sandpframing.com>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 7518 <at> debbugs.gnu.org
Subject: Re: bug#7518: image-dired defcustom'd paths
Date: Sun, 5 Dec 2010 19:56:36 -0500
On Sat, Dec 4, 2010 at 8:05 PM, Chong Yidong <cyd <at> stupidchicken.com> wrote:
> MON KEY <monkey <at> sandpframing.com> writes:

>> AFAIK `image-dired' isn't loaded by default. Why should _each_ of
>> these variables elevate to creation of a `user-emacs-directory'
>> if/when one doesn't already exit?
>

> This sentence does not parse.
>

>> Why should _each_ of these variables elevate to creation of a
>> `user-emacs-directory' if/when one doesn't already exit?
>

`image-dired-dir' is the "top-level" defcustom from which other related
`image-dired-*' vars derive their path default values.  As such, only
`image-dired-dir' need evaluate a form containing `locate-user-emacs-file'
any other of the paths which "inherit" from `image-dired-dir' will either find
an existing directoy already available or will incorrectly create one which
may otherwise be separate from a user paths specified the in some other
`image-dired-*' var.

IOW, "hands of my directory tree image-dired!"

Moreover, I would argue that none of the `image-dired-*' vars should
be hardwired
by default to `user-home-directory' not only is this non-transparently intrusive
but it is potentially error prone on w32.

Let the user explicitly specify a path for these instead if this is
what is wanted.

As an aside, none of the `image-dired-*' path customizations have :type
specializations more specific than string
so at the very least it isn't immediately clear that these vars are creat.

>
> The usage of locate-user-emacs-file in image-dired is correct, as far as
> I can tell.
>

Maybe not. :)
Most other packages don't operate this way to they?

--
/s_P\




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7518; Package emacs. (Mon, 06 Dec 2010 19:42:01 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> stupidchicken.com>
To: MON KEY <monkey <at> sandpframing.com>
Cc: 7518 <at> debbugs.gnu.org
Subject: Re: bug#7518: image-dired defcustom'd paths
Date: Mon, 06 Dec 2010 14:47:01 -0500
MON KEY <monkey <at> sandpframing.com> writes:

> `image-dired-dir' is the "top-level" defcustom from which other related
> `image-dired-*' vars derive their path default values.  As such, only
> `image-dired-dir' need evaluate a form containing `locate-user-emacs-file'
> any other of the paths which "inherit" from `image-dired-dir' will either find
> an existing directoy already available or will incorrectly create one which
> may otherwise be separate from a user paths specified the in some other
> `image-dired-*' var.

If you mean that the other image-dired-* variables should use the value
of image-dired-dir, that would be fine, and a little cleaner.  I've
committed such a change.  Thanks.

> Moreover, I would argue that none of the `image-dired-*' vars should
> be hardwired by default to `user-home-directory' not only is this
> non-transparently intrusive but it is potentially error prone on w32.

If you encounter a problem with locate-user-emacs-dir on w32, report a
different bug.




bug closed, send any further explanations to MON KEY <monkey <at> sandpframing.com> Request was from Chong Yidong <cyd <at> stupidchicken.com> to control <at> debbugs.gnu.org. (Mon, 06 Dec 2010 19:43:02 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7518; Package emacs. (Tue, 07 Dec 2010 02:44:01 GMT) Full text and rfc822 format available.

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

From: MON KEY <monkey <at> sandpframing.com>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 7518 <at> debbugs.gnu.org
Subject: Re: bug#7518: image-dired defcustom'd paths
Date: Mon, 6 Dec 2010 21:49:44 -0500
On Mon, Dec 6, 2010 at 2:47 PM, Chong Yidong <cyd <at> stupidchicken.com> wrote:
> MON KEY <monkey <at> sandpframing.com> writes:

> If you mean that the other image-dired-* variables should use the value
> of image-dired-dir, that would be fine, and a little cleaner.  I've
> committed such a change.  Thanks.
>

Yes, this is what I was trying to get at.
Thanks for taking the time to interpret Mon-ish.

>
> If you encounter a problem with locate-user-emacs-dir on w32, report a
> different bug.
>
I'll keep an eye open once 24 rolls out (which is when I suspect it
will rear its head again [-: )

--
/s_P\




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 04 Jan 2011 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 170 days ago.

Previous Next


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