GNU bug report logs - #18344
Archive (e.g. tarball) file buffers are editable, but have no undo information

Previous Next

Package: emacs;

Reported by: Paul Pogonyshev <pogonyshev <at> gmail.com>

Date: Thu, 28 Aug 2014 17:12:01 UTC

Severity: important

Fixed in version 24.3.94

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Glenn Morris <rgm <at> gnu.org>
To: Paul Pogonyshev <pogonyshev <at> gmail.com>
Cc: dan <at> haxney.org, 18344 <at> debbugs.gnu.org
Subject: bug#18344: Archive (e.g. tarball) file buffers are editable, but have no undo information
Date: Thu, 28 Aug 2014 15:16:28 -0400
Following seems to fix it for me

*** lisp/tar-mode.el	2014-02-10 01:34:22 +0000
--- lisp/tar-mode.el	2014-08-28 19:11:24 +0000
***************
*** 800,807 ****
                            tarname
                            ")"))
           (buffer (generate-new-buffer bufname)))
-     (with-current-buffer buffer
-       (setq buffer-undo-list t))
      (with-current-buffer tar-data-buffer
        (let (coding)
          (narrow-to-region start end)
--- 800,805 ----
***************
*** 829,835 ****
              (with-current-buffer buffer
                (set-buffer-multibyte nil)))
          (widen)
!         (decode-coding-region start end coding buffer)))
      buffer))
  
  (defun tar-extract (&optional other-window-p)
--- 827,837 ----
              (with-current-buffer buffer
                (set-buffer-multibyte nil)))
          (widen)
!         (with-current-buffer buffer
!           (setq buffer-undo-list t))
!         (decode-coding-region start end coding buffer)
!         (with-current-buffer buffer
!           (setq buffer-undo-list nil))))
      buffer))
  
  (defun tar-extract (&optional other-window-p)
***************
*** 869,875 ****
                (with-current-buffer tar-buffer
                  default-directory))
          (set-buffer-modified-p nil)
-         (setq buffer-undo-list t)
          (normal-mode)                   ; pick a mode.
          (set (make-local-variable 'tar-superior-buffer) tar-buffer)
          (set (make-local-variable 'tar-superior-descriptor) descriptor)
--- 871,876 ----





This bug report was last modified 10 years and 265 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.