emacs-devel
[Top][All Lists]
Advanced

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

Re: Inhibit "Wrote foo" from write-region


From: Sebastian Wiesner
Subject: Re: Inhibit "Wrote foo" from write-region
Date: Wed, 22 Jan 2014 13:37:24 +0100
User-agent: mu4e 0.9.9.6pre2; emacs 24.3.50.1

address@hidden writes:

>>>>>> "Sebastian" == Sebastian Wiesner <address@hidden> writes:
>
> Sebastian> For individual calls to write-region, this behaviour can be
> Sebastian> inhibited by passing a symbol as VISIT argument,
> Sebastian> e.g. (write-region "Hello world" nil "foo" 'no-message),
> Sebastian> however package.el, url.el and other involved packages do not
> Sebastian> make general use of this.  For instance,
> Sebastian> "package--write-file-no-coding" is defined as follows:
>
> Sebastian> (defun package--write-file-no-coding (file-name)
> Sebastian>   (let ((buffer-file-coding-system 'no-conversion))
> Sebastian>     (write-region (point-min) (point-max) file-name)))
>
> I agree it would be nice to fix this.
>
> Meanwhile as a workaround I think your program could advise write-region
> to add the needed argument.

I do that now, but this does obviously not catch messages, which specify
a string for VISIT.  In this case, "write-region" still produces these
messages.

Also, overriding a core function like write-region just to silence some
messages feels a little brittle.

Thank you for your advice, though




reply via email to

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