Gnus development mailing list
 help / color / mirror / Atom feed
From: "Adam Sjøgren" <asjo@koldfront.dk>
To: ding@gnus.org
Subject: Running emacs as a daemon, Gnus shows X-Faces using ImageMagick in a new window
Date: Tue, 17 Dec 2019 21:27:44 +0100	[thread overview]
Message-ID: <87v9qepuin.fsf@tullinup.koldfront.dk> (raw)

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




             reply	other threads:[~2019-12-17 20:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-17 20:27 Adam Sjøgren [this message]
2019-12-24 16:51 ` Lars Ingebrigtsen
2019-12-25 15:11   ` Adam Sjøgren

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=87v9qepuin.fsf@tullinup.koldfront.dk \
    --to=asjo@koldfront.dk \
    --cc=ding@gnus.org \
    /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.
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).