Gnus development mailing list
 help / color / mirror / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: Katsumi Yamaoka <yamaoka@jpl.org>
Cc: ding@gnus.org
Subject: Re: External viewer output inserted into Article buffer
Date: Wed, 27 Feb 2013 16:20:48 +0100	[thread overview]
Message-ID: <87sj4hiy0f.fsf@thinkpad.tsdh.de> (raw)
In-Reply-To: <b4mk3punm9q.fsf@jpl.org> (Katsumi Yamaoka's message of "Wed, 27 Feb 2013 18:23:13 +0900")

Katsumi Yamaoka <yamaoka@jpl.org> writes:

>>> Now when I close the evince instance that was opened from within
>>> gnus, that warning is inserted into the Article buffer.
>>>
>>> It's just a viewing issue.  When opening the article again, the
>>> fontconfig warnings aren't there anymore.
>
>> I see the same problem, but with attached pictures and the feh
>> viewer.  Seems to be a general problem.
>
> This is a feature Lars added:
>
> 2012-02-09  Lars Ingebrigtsen  <larsi@gnus.org>
>  * mm-decode.el (mm-display-external): Output the text from the command
>  in the buffer after the command finished.  This makes text-based
>  commands behave better.

Ah, ok.  So if I'd use "pdftotext %f -" as application for the
application/pdf mime type, the clicking on the attachment would insert
its plain-text contents into the buffer.  Indeed, that's a cool feature.

> If you want those warnings to appear in the article buffer without
> waiting for finishing of a command, something like a quick hack
> attached below will help.

No, no.  I was just amazed that there's anything inserted into the
article buffer, no matter at what point in time.

> Otherwise, if you want certain kinds of text not to appear, I have no
> idea how to distinguish whether it's a warning or whether a command is
> used for text-output.

Can't we simply assume that meaningful text-output arrives at stdout and
warnings appear at stderr?

At least

  $ pdftotext foo.pdf - 2> /dev/null

shows the pdf contents, whereas

  $ evinge foo.pdf 2> /dev/null

outputs nothing, i.e., its warnings are redirected to /dev/null.

Maybe there should be an option if one wants to ignore standard error
output, though.

Oh, and maybe the output inserted into the article buffer should be
somewhat outstanding, e.g., fontify it with some special face.  If it
had been fontified with something different than 'default, I'd
immediately seen that it is a feature and not a bug. :-)

Bye,
Tassilo



  reply	other threads:[~2013-02-27 15:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-19  8:17 Tassilo Horn
2013-02-25 12:41 ` Michael Heerdegen
2013-02-27  9:23   ` Katsumi Yamaoka
2013-02-27 15:20     ` Tassilo Horn [this message]
2013-08-01 21:24       ` Lars Magne Ingebrigtsen

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=87sj4hiy0f.fsf@thinkpad.tsdh.de \
    --to=tsdh@gnu.org \
    --cc=ding@gnus.org \
    --cc=yamaoka@jpl.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).