Gnus development mailing list
 help / color / mirror / Atom feed
* Running emacs as a daemon, Gnus shows X-Faces using ImageMagick in a new window
@ 2019-12-17 20:27 Adam Sjøgren
  2019-12-24 16:51 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Adam Sjøgren @ 2019-12-17 20:27 UTC (permalink / raw)
  To: ding

Sometimes I start Emacs up in the terminal, like this:

  emacs --daemon && TERM=xterm-256color emacsclient --create-frame --alternate-editor="" --eval "(gnus)" -nw

And I run into, I think, this problem:

  ;; Fixme: This isn't the right thing for mixed graphical and non-graphical
  ;; frames in a session.
  (defcustom gnus-article-x-face-command
    (if (gnus-image-type-available-p 'pbm)
        'gnus-display-x-face-in-from
      "{ echo \
  '/* Format_version=1, Width=48, Height=48, Depth=1, Valid_bits_per_item=16 */'\
  ; uncompface; } | icontopbm | display -")
    "String or function to be executed to display an X-Face header.
  If it is a string, the command will be executed in a sub-shell
  asynchronously.  The compressed face will be piped to this command."
    :type '(choice string
                   (function-item gnus-display-x-face-in-from)
                   function)
    :version "21.1"
    :group 'gnus-picon
    :group 'gnus-article-washing)

That is, if I open a graphical frame (using 'emacsclient --create-frame
--alternate-editor=""') later, every time I view an article with an
X-Face: header, a new window pops up - ImageMagick showing the X-Face.

I guess (gnus-image-type-available-p 'pbm) is only evaluated once, and
if it is in a tty-frame, it's nil, but in an X-frame it is t.

Funnily the Face: header is shown "inline", directly in the Emacs window.

How can I fix this? Do I just change it from a defcustom to a defun?

It's really annoying that Gnus behaves differently depending on whether
Emacs was originally started with a tty-frame or an X-frame, rather than
looking at what kind the current is, and adjusting accordingly.


(It's annoying enough that you can open an X-frame and close it again,
and close the X-connection, without quitting Emacs, but that's a whole
different can of [gtk-]worms.)


  Best regards,

    Adam

-- 
 "Why do you ask so much?"                                  Adam Sjøgren
 "I'm a kid. It's what we do."                         asjo@koldfront.dk




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

end of thread, other threads:[~2019-12-25 15:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-17 20:27 Running emacs as a daemon, Gnus shows X-Faces using ImageMagick in a new window Adam Sjøgren
2019-12-24 16:51 ` Lars Ingebrigtsen
2019-12-25 15:11   ` Adam Sjøgren

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 NNTP newsgroup(s).