all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#72448: "xdg-mime query filetype" fails silently on many filetypes (with fixes I see)
@ 2024-08-03 18:33 Sébastien Lerique
  2024-08-04  9:23 ` Liliana Marie Prikler
  0 siblings, 1 reply; 3+ messages in thread
From: Sébastien Lerique @ 2024-08-03 18:33 UTC (permalink / raw)
  To: 72448

Ahoy Guix!

"xdg-mime query filetype a-book.epub" or "whatever.pdf" returns nothing,
which is both puzzling and limiting as it blocks "xdg-open" to work for
many files.

My case was opening pdf or epub files from Emacs, which "xdg-open"
always sends to the browser, whatever my config (instead of e.g. evince
or Foliate).

So debugging shows that:
in ".xdg-mime-real",
(/gnu/store/06ll0ydqsf4bjxwpwsi68dmn2cg0biy6-xdg-utils-1.1.3/bin/xdg-mime
points there),
l.673-684 in "info_gnome()",
even if the "if ... elif ... elif ... fi" fails
(i.e. none of "gio", "gvfs-info", or "gnomevfs-info" are available),
then l.696 "if [ $? -eq 0 ]" gives always true.

Why? I don't know. I guess having a "case ..." instead of "if ... fi"
would solve this.

But the result is "exit_success" gets called whatever the situation, and
xdg-mime often gives no output, which then bugs "xdg-open".

Running this in "guix shell gnome-vfs" solves it, but what should be
done to fix? And how did this not appear earlier? (is xdg* new?)

The options I see are adding the "gnome-vfs" dependency ("gvfs" doesn't
provide "gvfs-info", and "gio" is not a package), or proposing "case"
instead of "if" upstream.

-- 
Sébastien Lerique
https://slvh.fr/




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

end of thread, other threads:[~2024-08-09  9:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-03 18:33 bug#72448: "xdg-mime query filetype" fails silently on many filetypes (with fixes I see) Sébastien Lerique
2024-08-04  9:23 ` Liliana Marie Prikler
2024-08-09  9:26   ` Sébastien Lerique

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.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.