bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#25645: reproducer?


From: Alex Bennée
Subject: bug#25645: reproducer?
Date: Wed, 04 Oct 2017 09:46:17 +0100
User-agent: mu4e 0.9.19; emacs 26.0.60

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Alex Bennée <alex.bennee@linaro.org>
>> Cc: 25645@debbugs.gnu.org
>> Date: Wed, 04 Oct 2017 01:31:39 +0100
>>
>> copying: message-default-charset -> utf-8
>
> A stab in the dark: what if you filter out message-default-charset
> from the cloned locals?

Good guess:

(defun message-clone-locals (buffer &optional varstr)
  "Clone the local variables from BUFFER to the current buffer."
  (message "message-clone-locals: %s" buffer)
  (let ((locals (with-current-buffer buffer (buffer-local-variables)))
        (regexp 
"^gnus\\|^nn\\|^message\\|^sendmail\\|^smtp\\|^user-mail-address"))
    (mapcar
     (lambda (local)
       (when (and (consp local)
                  (car local)
                  (string-match regexp (symbol-name (car local)))
                  (or (null varstr)
                      (string-match varstr (symbol-name (car local)))))
         (ignore-errors
           (unless (string-match "message-default-charset" (symbol-name (car 
local)))
             (message "copying: %s -> %s" (car local) (cdr local))
             (set (make-local-variable (car local))
                  (cdr local))))))
     locals)))

Although I feel a slightly neater solution is needed.

So is the problem we are attempting to double encode an already encoded
buffer or something else?

--
Alex Bennée





reply via email to

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