all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: AKIYAMA Kouhei <misohena@gmail.com>
Cc: 73231@debbugs.gnu.org
Subject: bug#73231: 30.0.91; image-dired cannot be operated until all thumbnails are created (MS-Windows)
Date: Sun, 15 Sep 2024 12:45:51 +0300	[thread overview]
Message-ID: <864j6hdzcg.fsf@gnu.org> (raw)
In-Reply-To: <CAAo_Hv-ZtfYNX43bgJ2g-g82EK7G=MHvJYMbqd6tTSraHmGdQg@mail.gmail.com> (message from AKIYAMA Kouhei on Sun, 15 Sep 2024 18:33:52 +0900)

> From: AKIYAMA Kouhei <misohena@gmail.com>
> Date: Sun, 15 Sep 2024 18:33:52 +0900
> Cc: 73231@debbugs.gnu.org
> 
> > Because the test is performed when the package is loaded, it might
> > make different decisions that the user expects, because the user
> > doesn't control when the package is loaded.  For example, if
> > ImageMagick is installed after this defcustom is evaluated, its
> > value will be incorrect from the user's POV.
> 
> Isn't that the same with GraphicsMagick? In your opinion, that means
> the (executable-find "gm") part is also incorrect from the user's POV?

Yes, IMO.  If GraphicsMagick is installed after the package is loaded
by Emacs, the result will be incorrect.

> > > If necessary, the user can change the settings of the
> > > program that creates thumbnails by themselves (after installing
> > > ImageMagick or GraphicsMagick).
> >
> > I'm talking about the default value.  Customizing this will make the
> > value fixed, not dynamically-decided.
> 
> Of course I'm talking about default values. Of course the value is
> fixed when the package is loaded. And I thought that was acceptable
> because I saw (executable-find "gm") written in defcustom. Is it
> wrong?

My point is that customizing the value is usually followed by saving
the customizations, which will cause all the future Emacs session to
use the same fixed value, bypassing the dynamic decision in the
original value.

> > > In other words, first create
> > > thumbnails with the built-in function (w32image-create-thumbnail), and
> > > if a user is dissatisfied with them, they can install either
> > > ImageMagick or GraphicsMagick and specify the program they installed
> > > via M-x customize-variable
> > > image-dired-cmd-create-thumbnail-program. Isn't this the same for most
> > > other parts of Emacs? For example, if a user is dissatisfied with grep
> > > and installs ripgrep, they will have to manually change grep-command
> > > themselves. Isn't it the same? Why does Emacs automatically determine
> > > the thumbnail creation method without the user's permission?
> >
> > Emacs does this in many other cases, so this is hardly an exception.
> 
> Even if you say "many other cases," it's still a minority when viewed
> in the context of Emacs as a whole, right?

It is used almost everywhere where some function can be provided
either by an external program or by an internal Emacs API.

> I was simply curious about
> why a different decision was made here compared to the method adopted
> by the majority, so I asked. I'm not saying you should do it that
> way. I just thought there might be a hint in the reasoning that could
> help me understand something.

Like I said, the main reason was technical: I wanted to make sure the
test detects when 'convert' or 'gm' is installed, even if they are
installed while the Emacs session is already running and it already
loaded the image-dired package.

> > I thought it should stay at its nil/t value until the user invokes
> > that hypothetical command to perform the check again and set the
> > variable to the value produced by the check.
> 
> That's fine, but wouldn't it be more natural to have them set a
> customization variable rather than calling the command?

Maybe.  We'll have to see when this becomes relevant.

> I didn't fully understand your thoughts on the existence test of the
> convert command, but I have some understanding. I hope this was
> helpful for people who have the same question as me. Of course, you
> are free to decide how to do it.

Thanks.





      reply	other threads:[~2024-09-15  9:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-13 13:07 bug#73231: 30.0.91; image-dired cannot be operated until all thumbnails are created (MS-Windows) AKIYAMA Kouhei
2024-09-13 16:02 ` Eli Zaretskii
2024-09-14  0:25   ` AKIYAMA Kouhei
2024-09-14  6:47     ` Eli Zaretskii
2024-09-14 11:18       ` AKIYAMA Kouhei
2024-09-14 11:38         ` Eli Zaretskii
2024-09-15  1:25           ` AKIYAMA Kouhei
2024-09-15  6:24             ` Eli Zaretskii
2024-09-15  7:32               ` AKIYAMA Kouhei
2024-09-15  8:05                 ` Eli Zaretskii
2024-09-15  9:33                   ` AKIYAMA Kouhei
2024-09-15  9:45                     ` Eli Zaretskii [this message]

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=864j6hdzcg.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=73231@debbugs.gnu.org \
    --cc=misohena@gmail.com \
    /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.