[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding streams for standard out and standard err

From: Phillip Lord
Subject: Re: Adding streams for standard out and standard err
Date: Thu, 21 Jul 2016 21:13:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> From: address@hidden (Phillip Lord)
>> Cc: address@hidden
>> Date: Thu, 21 Jul 2016 19:52:58 +0100
>> (append-to-file (print buffer-undo-list) nil "/dev/stderr")
>> seems clunky compared to:
>> (print buffer-undo-list 'stdout)
> Nothing a simple function won't heal, right?
> Maybe that's all we need: a small wrapper around append-to-file.

Actually, adding a new stream was your idea...


I'd never heard of streams in emacs before. I thought it seemed like a
nice idea, so I thought I would give it a go.

Yes, you are probably correct, that append-to-file could be used,
without resorting to new C primitives. However, all the functionality
that we need is already in the C layer. Also append-to-file (or rather
write-region) would need updating to not send messages.

It would also allow fixing this:

(defun append-to-file (start end filename)
  (interactive "r\nFAppend to file: ")
  (prog1 (write-region start end filename t)
    (when save-silently (message nil))))

Append-to-file does not actually save-silently AFAICT, it just hides the
message quickly.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]