[Top][All Lists]

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

[debbugs-tracker] bug#11127: closed (24.0.94; [PATCH] Tutorial breaks wi

From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#11127: closed (24.0.94; [PATCH] Tutorial breaks with modified key bindings)
Date: Mon, 11 Feb 2013 01:53:02 +0000

Your message dated Sun, 10 Feb 2013 20:52:18 -0500
with message-id <address@hidden>
and subject line Re: bug#11127: 24.0.94; [PATCH] Tutorial breaks with modified 
key bindings
has caused the debbugs.gnu.org bug report #11127,
regarding 24.0.94; [PATCH] Tutorial breaks with modified key bindings
to be marked as done.

(If you believe you have received this mail in error, please contact

11127: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11127
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- 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  <address@hidden>

        * 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
         ;; 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))
@@ -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
          (let ((enable-local-variables :safe))
@@ -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<<")
           ;; 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 "]"))))
           ;; 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))
             (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,

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

--- End Message ---
--- Begin Message --- Subject: Re: bug#11127: 24.0.94; [PATCH] Tutorial breaks with modified key bindings Date: Sun, 10 Feb 2013 20:52:18 -0500 User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
Version: 24.4

Glenn Morris wrote:

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


> 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.

--- End Message ---

reply via email to

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