GNU bug report logs - #11127
24.0.94; [PATCH] Tutorial breaks with modified key bindings

Previous Next

Package: emacs;

Reported by: "Aaron S. Hawley" <aaron.s.hawley <at> gmail.com>

Date: Thu, 29 Mar 2012 19:22:02 UTC

Severity: minor

Found in version 24.0.94

Fixed in version 24.4

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: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: "Aaron S. Hawley" <aaron.s.hawley <at> gmail.com>
Subject: bug#11127: closed (Re: bug#11127: 24.0.94; [PATCH] Tutorial
 breaks with modified key bindings)
Date: Mon, 11 Feb 2013 01:53:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#11127: 24.0.94; [PATCH] Tutorial breaks with modified key bindings

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 11127 <at> debbugs.gnu.org.

-- 
11127: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11127
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Glenn Morris <rgm <at> gnu.org>
To: 11127-done <at> debbugs.gnu.org
Subject: Re: bug#11127: 24.0.94;
	[PATCH] Tutorial breaks with modified key bindings
Date: Sun, 10 Feb 2013 20:52:18 -0500
Version: 24.4

Glenn Morris wrote:

> I'd rather have an explicit enable-dir-local-variables variable.

Added.

> Also, I think there should probably some way in a dir-locals file to say
> "these settings should only be applied to buffers with files".

Will open wishlist for this.

[Message part 3 (message/rfc822, inline)]
From: "Aaron S. Hawley" <aaron.s.hawley <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.94; [PATCH] Tutorial breaks with modified key bindings
Date: Thu, 29 Mar 2012 14:49:33 -0400
2012-03-29  Aaron S. Hawley  <aaron.s.hawley <at> gmail.com>

        * tutorial.el (help-with-tutorial, tutorial--display-changes): If
        user has modified default key bindings then Emacs complains
        "Buffer is read-only: #<buffer TUTORIAL>" rather than adding the
        notice about "the most important standard Emacs commands".

--- tutorial.el	2012-02-13 11:13:25.000000000 -0500
+++ tutorial.el	2012-03-29 14:25:01.667926700 -0400
@@ -538,7 +538,8 @@
 If some of the default key bindings that the tutorial depends on
 have been changed then display the changes in the tutorial buffer
 with some explanatory links."
-  (let* ((changed-keys (tutorial--find-changed-keys
+  (let* ((inhibit-read-only t)
+         (changed-keys (tutorial--find-changed-keys
 			tutorial--default-keys))
 	 ;; Alist of element (DESC . CK) where DESC is the
 	 ;; key-description of a changed key and CK is the
@@ -828,7 +829,7 @@
           (setq old-tut-file
                 (y-or-n-p "Resume your last saved tutorial? ")))
         (if old-tut-file
-            (progn
+            (let ((inhibit-read-only t))
               (insert-file-contents (tutorial--saved-file))
 	      (let ((enable-local-variables :safe))
 		(hack-local-variables))
@@ -846,7 +847,8 @@
               (delete-region (point-min) (point))
               (goto-char tutorial--point-before-chkeys)
               (setq tutorial--point-before-chkeys (point-marker)))
-          (insert-file-contents (expand-file-name filename tutorial-directory))
+          (let ((inhibit-read-only t))
+            (insert-file-contents (expand-file-name filename
tutorial-directory)))
 	  (let ((enable-local-variables :safe))
 	    (hack-local-variables))
           (forward-line)
@@ -871,12 +873,14 @@
           ;; Delete the arch-tag line, so as not to confuse readers.
           (goto-char (point-max))
           (if (search-backward ";;; arch-tag: " nil t)
-              (delete-region (point) (point-max)))
+              (let ((inhibit-read-only t))
+                (delete-region (point) (point-max))))
           (goto-char (point-min))
           (search-forward "\n<<")
           (beginning-of-line)
           ;; Convert the <<...>> line to the proper [...] line,
           ;; or just delete the <<...>> line if a [...] line follows.
+          (let ((inhibit-read-only t))
           (cond ((save-excursion
                    (forward-line 1)
                    (looking-at "\\["))
@@ -887,18 +891,19 @@
                  (looking-at "<<")
                  (replace-match "[")
                  (search-forward ">>")
-                 (replace-match "]")))
+                 (replace-match "]"))))
           (beginning-of-line)
           ;; FIXME: if the window is not tall, and especially if the
           ;; big red "NOTICE: The main purpose..." text has been
           ;; inserted at the start of the buffer, the "type C-v to
           ;; move to the next screen" might not be visible on the
           ;; first screen (n < 0).  How will the novice know what to do?
-          (let ((n (- (window-height (selected-window))
+          (let ((inhibit-read-only t)
+                (n (- (window-height (selected-window))
                       (count-lines (point-min) (point))
                       6)))
             (if (< n 8)
-                (progn
+                (let ((inhibit-read-only t))
                   ;; For a short gap, we don't need the [...] line,
                   ;; so delete it.
                   (delete-region (point) (progn (end-of-line) (point)))

Thanks for Emacs,
aaron

-- 
In general, we reserve the right to have a poor
memory--the computer, however, is supposed to
remember!  Poor computer.  -- Guy Lewis Steele Jr.



This bug report was last modified 12 years and 104 days ago.

Previous Next


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