Gnus development mailing list
 help / color / 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

* Re: Running emacs as a daemon, Gnus shows X-Faces using ImageMagick in a new window
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2019-12-24 16:51 UTC (permalink / raw)
  To: Adam Sjøgren; +Cc: ding

Adam Sjøgren <asjo@koldfront.dk> writes:

> 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 -")

I don't think it's ever actually helpful to pop up ImageMagick windows,
so I've now changed the default to not display anything when there's no
pbm support in Emacs 27.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



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

* Re: Running emacs as a daemon, Gnus shows X-Faces using ImageMagick in a new window
  2019-12-24 16:51 ` Lars Ingebrigtsen
@ 2019-12-25 15:11   ` Adam Sjøgren
  0 siblings, 0 replies; 3+ messages in thread
From: Adam Sjøgren @ 2019-12-25 15:11 UTC (permalink / raw)
  To: ding

Lars writes:

> I don't think it's ever actually helpful to pop up ImageMagick windows,
> so I've now changed the default to not display anything when there's no
> pbm support in Emacs 27.

👍 - let's see if anybody misses the functionality.


  Best regards,

    Adam

-- 
 "Här kommer rädslan, gamle vän                             Adam Sjøgren
  När alla fjärilar i magen vaknar upp                 asjo@koldfront.dk
  Viskar välkommen hem"




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

end of thread, back to index

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

Gnus development mailing list

Archives are clonable: git clone --mirror http://inbox.vuxu.org/ding

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.emacs.gnus.general


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git