GNU bug report logs - #15938
diff-mode mishandles diff-default-read-only

Previous Next

Package: emacs;

Reported by: Ivan Shmakov <ivan <at> siamics.net>

Date: Wed, 20 Nov 2013 20:20:02 UTC

Severity: minor

Tags: patch

Fixed in version 24.4

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15938 in the body.
You can then email your comments to 15938 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#15938; Package emacs. (Wed, 20 Nov 2013 20:20:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ivan Shmakov <ivan <at> siamics.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 20 Nov 2013 20:20:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ivan Shmakov <ivan <at> siamics.net>
To: bug-gnu-emacs <at> gnu.org
Subject: diff-mode mishandles diff-default-read-only 
Date: Wed, 20 Nov 2013 19:47:29 +0000
	In addition to making the -*- Diff -*- buffers read-only when
	diff-default-read-only is non-nil, diff-mode also makes such
	buffers /writable/ when diff-default-read-only is nil, while per
	the documentation, I’d expect for diff-mode to have no effect on
	buffer-read-only in this latter case.

	Please consider the patch below, which seems to fix the issue.

--- diff-mode.el.~1~
+++ diff-mode.el	2013-11-20 19:42:41.000000000 +0000
@@ -1366,7 +1366,8 @@ (define-derived-mode diff-mode fundamental-mode "Diff"
 
   (diff-setup-whitespace)
 
-  (setq buffer-read-only diff-default-read-only)
+  (when diff-default-read-only
+    (setq buffer-read-only t))
   ;; setup change hooks
   (if (not diff-update-on-the-fly)
       (add-hook 'write-contents-functions 'diff-write-contents-hooks nil t)

-- 
FSF associate member #7257




Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Sat, 23 Nov 2013 02:58:01 GMT) Full text and rfc822 format available.

Notification sent to Ivan Shmakov <ivan <at> siamics.net>:
bug acknowledged by developer. (Sat, 23 Nov 2013 02:58:05 GMT) Full text and rfc822 format available.

Message #10 received at 15938-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 15938-done <at> debbugs.gnu.org
Subject: Re: bug#15938: diff-mode mishandles diff-default-read-only
Date: Fri, 22 Nov 2013 21:57:03 -0500
Version: 24.4

Thanks; applied.

(BTW, we'd probably need a copyright assignment to accept anything more
than 2-3 lines more from you in future. So maybe think about starting
that process if you expect to contribute more.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15938; Package emacs. (Sat, 23 Nov 2013 08:16:02 GMT) Full text and rfc822 format available.

Message #13 received at 15938 <at> debbugs.gnu.org (full text, mbox):

From: Ivan Shmakov <ivan <at> siamics.net>
To: 15938 <at> debbugs.gnu.org
Subject: Re: bug#15938: diff-mode mishandles diff-default-read-only
Date: Sat, 23 Nov 2013 08:14:56 +0000
>>>>> Glenn Morris <rgm <at> gnu.org> writes:

 > Version: 24.4 Thanks; applied.

 > (BTW, we'd probably need a copyright assignment to accept anything
 > more than 2-3 lines more from you in future.  So maybe think about
 > starting that process if you expect to contribute more.)

	JFTR, does that mean 2–3 LoC /in total/, or 2–3 LoC
	/per change/?  I have no plans on working on substantial changes
	to Emacs at this moment, though I hope to contribute some more
	trivial bug fixes, just like those I’ve sent recently.

-- 
FSF associate member #7257




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15938; Package emacs. (Sat, 23 Nov 2013 18:55:02 GMT) Full text and rfc822 format available.

Message #16 received at 15938 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Ivan Shmakov <ivan <at> siamics.net>
Cc: 15938 <at> debbugs.gnu.org
Subject: Re: bug#15938: diff-mode mishandles diff-default-read-only
Date: Sat, 23 Nov 2013 13:54:25 -0500
Ivan Shmakov wrote:

>  > (BTW, we'd probably need a copyright assignment to accept anything
>  > more than 2-3 lines more from you in future.  So maybe think about
>  > starting that process if you expect to contribute more.)
>
> 	JFTR, does that mean 2–3 LoC /in total/, or 2–3 LoC
> 	/per change/?  I have no plans on working on substantial changes
> 	to Emacs at this moment, though I hope to contribute some more
> 	trivial bug fixes, just like those I've sent recently.

2-3 lines in total. So if you prefer not to do an assignment, it's best
if future reports just describe what the problem is, without including
patches.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 22 Dec 2013 12:24:04 GMT) Full text and rfc822 format available.

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

Previous Next


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