emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Re: /srv/bzr/emacs/trunk r101419: epa-file: suppress file-


From: Daiki Ueno
Subject: [Emacs-diffs] Re: /srv/bzr/emacs/trunk r101419: epa-file: suppress file-locking question on M-x revert-buffer
Date: Tue, 14 Sep 2010 09:11:20 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>>   * epa-file.el (epa-file-insert-file-contents): If visiting, bind
>>   buffer-file-name to avoid file-locking.  (Bug#7026)
>
> Thanks.  Note that maybe setting buffer-file-name at the end rather than
> at the beginning might be a more straightforward fix.

Well, there are 2 places that the buffer will be modified:

  (save-restriction
    (narrow-to-region (point) (point))
*   (epa-file-decode-and-insert string file visit beg end replace)
    (setq length (- (point-max) (point-min))))
  (if replace
*     (delete-region (point) (point-max))))

So I thought that binding buffer-file-name at the beginning is more
straightforward.  Perhaps doing it twice on those lines might be an
idea?

Regards,
-- 
Daiki Ueno



reply via email to

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