emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] New with-file-buffer macro


From: Eli Zaretskii
Subject: Re: [PATCH] New with-file-buffer macro
Date: Thu, 31 Dec 2020 21:48:17 +0200

> From: Adam Porter <adam@alphapapa.net>
> Date: Thu, 31 Dec 2020 13:13:57 -0600
> 
>       (let ((coding-system-for-write buffer-file-coding-system))
>         (with-file-buffer (expand-file-name (concat name "-readme.txt")
>                                             package-build-archive-dir)
>             (:insert nil :write t :overwrite t)

The binding for coding-system-for-write will pick up the value from
the wrong buffer, won't it?

In general, it looks to me like this macro is not very useful: it
basically saves you two function calls.  Is it really such a big deal?
Most of the churn with the paradigm of reading a file and doing
something with it is not in these two function calls, it is elsewhere,
and what your macro does is just leave all of those tedious details to
the user, just using a different syntax (plist instead of setting or
binding variables).



reply via email to

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