From unknown Sun Jun 22 00:41:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11127: 24.0.94; [PATCH] Tutorial breaks with modified key bindings Resent-From: "Aaron S. Hawley" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Mar 2012 19:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11127 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 11127@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.133304890114748 (code B ref -1); Thu, 29 Mar 2012 19:22:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Mar 2012 19:21:41 +0000 Received: from localhost ([127.0.0.1]:45246 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDKui-0003pp-HH for submit@debbugs.gnu.org; Thu, 29 Mar 2012 15:21:40 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52065) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDKuF-0003p5-BR for submit@debbugs.gnu.org; Thu, 29 Mar 2012 15:21:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SDKPl-0001Rm-LH for submit@debbugs.gnu.org; Thu, 29 Mar 2012 14:49:43 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:53202) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDKPl-0001Rb-Fm for submit@debbugs.gnu.org; Thu, 29 Mar 2012 14:49:41 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51594) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDKPj-0003vN-MF for bug-gnu-emacs@gnu.org; Thu, 29 Mar 2012 14:49:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SDKPh-0001QZ-1B for bug-gnu-emacs@gnu.org; Thu, 29 Mar 2012 14:49:39 -0400 Received: from mail-bk0-f41.google.com ([209.85.214.41]:44428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDKPg-0001Pv-Nk for bug-gnu-emacs@gnu.org; Thu, 29 Mar 2012 14:49:36 -0400 Received: by bkwq16 with SMTP id q16so2759467bkw.0 for ; Thu, 29 Mar 2012 11:49:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=tvu1jIsipulq4vGGYlFDc96h+17xFtLh9CX1fHZQqzI=; b=f30qu3vq/83KyVmamHT8vxZEVr+xUkC91vaJ9u31rVmBXKFq0LkFpGKnmA6XBU1gk8 loVYg78Db0DZJ16aZGlNoYa4FrZQC5oWHbAmRFBrxRSq8OaUOOraVHFdnBEmJvFXKOwr /fINwiKEK/tPX55uLFrVa0mM7wuQZ9L36UwC5FjvPz4duKPk9B4V6HdpZMookUnXadsq BH23bGG1o5ZAlw/cHytjXs1pCIAqS1ctJXo0Lsth4Z1u+APCBlT1ZQdO7F3ylkDN6uq0 EqJdNy4CWPVgXmXvABltktH7d5euxPTF49jJCRQotuCtBsV/7FVkMeBO6AAVNP/lPZPv FqGA== MIME-Version: 1.0 Received: by 10.204.150.75 with SMTP id x11mr14204494bkv.62.1333046973989; Thu, 29 Mar 2012 11:49:33 -0700 (PDT) Received: by 10.205.35.78 with HTTP; Thu, 29 Mar 2012 11:49:33 -0700 (PDT) Date: Thu, 29 Mar 2012 14:49:33 -0400 Message-ID: From: "Aaron S. Hawley" Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) 2012-03-29 Aaron S. Hawley * tutorial.el (help-with-tutorial, tutorial--display-changes): If user has modified default key bindings then Emacs complains "Buffer is read-only: #" 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. From unknown Sun Jun 22 00:41:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11127: 24.0.94; [PATCH] Tutorial breaks with modified key bindings Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Mar 2012 20:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11127 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: "Aaron S. Hawley" Cc: 11127@debbugs.gnu.org Received: via spool by 11127-submit@debbugs.gnu.org id=B11127.133305415223072 (code B ref 11127); Thu, 29 Mar 2012 20:50:02 +0000 Received: (at 11127) by debbugs.gnu.org; 29 Mar 2012 20:49:12 +0000 Received: from localhost ([127.0.0.1]:45315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDMHP-000604-RM for submit@debbugs.gnu.org; Thu, 29 Mar 2012 16:49:12 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:57133) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDMHO-0005zy-T3 for 11127@debbugs.gnu.org; Thu, 29 Mar 2012 16:49:11 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SDLmu-0003HC-KY; Thu, 29 Mar 2012 16:17:40 -0400 From: Glenn Morris References: X-Spook: Jiang Zemin Janet Reno anthrax Rand Corporation diwn ISEC X-Ran: p8q\Hy)'Z=34'RF2FN6(Y/5#r6Q>+=(gvfAjo[0s|*S(90qn/vDJ[:dn82AK\yR9@2qxb: X-Hue: magenta X-Attribution: GM Date: Thu, 29 Mar 2012 16:17:40 -0400 In-Reply-To: (Aaron S. Hawley's message of "Thu, 29 Mar 2012 14:49:33 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) "Aaron S. Hawley" wrote: > * tutorial.el (help-with-tutorial, tutorial--display-changes): If > user has modified default key bindings then Emacs complains > "Buffer is read-only: #" rather than adding the > notice about "the most important standard Emacs commands". I cannot reproduce this with the current trunk. I did: emacs -Q (global-set-key [?\C-f] 'ignore) C-h t The tutorial opens just fine: Emacs tutorial. See end for copying conditions. NOTICE: The main purpose of the Emacs tutorial is to teach you the most important standard Emacs commands (key bindings). However, your Emacs has been customized by changing some of these basic editing commands, so it doesn't correspond to the tutorial. We have inserted colored notices where the altered commands have been introduced. [More] Why is your tutorial read-only? From unknown Sun Jun 22 00:41:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11127: 24.0.94; [PATCH] Tutorial breaks with modified key bindings Resent-From: "Aaron S. Hawley" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Mar 2012 22:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11127 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Glenn Morris Cc: 11127@debbugs.gnu.org Received: via spool by 11127-submit@debbugs.gnu.org id=B11127.133305858430272 (code B ref 11127); Thu, 29 Mar 2012 22:04:01 +0000 Received: (at 11127) by debbugs.gnu.org; 29 Mar 2012 22:03:04 +0000 Received: from localhost ([127.0.0.1]:45404 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDNQt-0007sD-Q2 for submit@debbugs.gnu.org; Thu, 29 Mar 2012 18:03:04 -0400 Received: from mail-bk0-f44.google.com ([209.85.214.44]:56457) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDNQr-0007rn-5q for 11127@debbugs.gnu.org; Thu, 29 Mar 2012 18:03:02 -0400 Received: by bkuw5 with SMTP id w5so2407683bku.3 for <11127@debbugs.gnu.org>; Thu, 29 Mar 2012 14:31:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=zt0OFYttP9qZ9TOJz8MnCt5MgVwYI2lZglZkISJnwJU=; b=Z+pmXOeE0WKx0LOD72k84HSPtZ1usF63KJdOc7y1NzC0ehGbSlM8vHPBHRqe5J/VUq pQb3F5cdf3BAd5b7xFsJSiV72J5aUJpRx/nTBBd7I8NIviFlU1WefLW8yFPvhWztwYbT 1dy7DTHDXr+rrF+a3BGyByMIJSH1QV9utrg3nkyMESHIFc8ixymWNtuKxtnEw00EHhCe K0VgkYbIHQfkQwUYXrOK7za3scVl1Q8LEx5Ybj6MsjBsa+F6+tlGcMhfLZyCORvofuZt OwOD2B4Ufrvnkz29Z6jPFbY6iSVPyeVZE/QnXaOW5o2jqzkJN0jsIGBfipE1IxOyLyAn wuEQ== MIME-Version: 1.0 Received: by 10.204.154.194 with SMTP id p2mr11391686bkw.80.1333056691499; Thu, 29 Mar 2012 14:31:31 -0700 (PDT) Received: by 10.205.35.78 with HTTP; Thu, 29 Mar 2012 14:31:31 -0700 (PDT) In-Reply-To: References: Date: Thu, 29 Mar 2012 17:31:31 -0400 Message-ID: From: "Aaron S. Hawley" Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Glenn Morris wrote: > I cannot reproduce this with the current trunk. I did: > > emacs -Q > (global-set-key [?\C-f] 'ignore) > C-h t > > The tutorial opens just fine: > > Emacs tutorial. See end for copying conditions. > > NOTICE: The main purpose of the Emacs tutorial is to teach you > the most important standard Emacs commands (key bindings). > However, your Emacs has been customized by changing some of > these basic editing commands, so it doesn't correspond to the > tutorial. We have inserted colored notices where the altered > commands have been introduced. [More] > > Why is your tutorial read-only? Glenn, Sorry, should have tried -Q. Turns out the tutorial was read-only because I had dir-locals that set a directory to read-only and I happened to run `C-h t' from that directory. Try with, emacs -Q (dir-locals-set-class-variables 'unwritable-directory '((nil . ((buffer-read-only . t))))) (dir-locals-set-directory-class default-directory 'unwritable-directory) C-h t I believe I've found a corner-case. Although, is (hack-local-variables) really that necessary in tutorial.el? It's not clear to me. aaron From unknown Sun Jun 22 00:41:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11127: 24.0.94; [PATCH] Tutorial breaks with modified key bindings Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Mar 2012 04:30:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11127 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: "Aaron S. Hawley" Cc: 11127@debbugs.gnu.org Received: via spool by 11127-submit@debbugs.gnu.org id=B11127.13330817867987 (code B ref 11127); Fri, 30 Mar 2012 04:30:01 +0000 Received: (at 11127) by debbugs.gnu.org; 30 Mar 2012 04:29:46 +0000 Received: from localhost ([127.0.0.1]:45746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDTT7-00024m-GD for submit@debbugs.gnu.org; Fri, 30 Mar 2012 00:29:45 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:35325) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDTT5-00024f-Ee for 11127@debbugs.gnu.org; Fri, 30 Mar 2012 00:29:43 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SDSyZ-0007J3-Ke; Thu, 29 Mar 2012 23:58:11 -0400 From: Glenn Morris References: X-Spook: passwd AK-47 Peking sniper Geraldton CIDA KGB PGP X-Ran: 9HhR-8z806rx4=9;I4|9d[V%~p^LX(FC'#=/mb^,#PfSf1||,)WYk]g_Ch\x)"Tk X-Hue: green X-Attribution: GM Date: Thu, 29 Mar 2012 23:58:11 -0400 In-Reply-To: (Aaron S. Hawley's message of "Thu, 29 Mar 2012 17:31:31 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) "Aaron S. Hawley" wrote: > (dir-locals-set-class-variables > 'unwritable-directory > '((nil . ((buffer-read-only . t))))) > (dir-locals-set-directory-class default-directory 'unwritable-directory) > C-h t > > I believe I've found a corner-case. A very small corner I should imagine. ;) I'll make it set buffer-read-only (back) to nil after hacking locals. Though maybe there are other directory locals that could cause non-standard behaviour. It's a shame there appears to be no setting for enable-local-variables that means "respect (safe) file-locals, but ignore directory locals". > Although, is (hack-local-variables) really that necessary in tutorial.el? Some of the languages set sentence-end-double-space to nil. That appears to be it. Personally, I think this takes "translation" a bit too far, but without the local setting the sentence motion commands don't work correctly. (Though I don't recall ever seeing this reported as a bug, and prior to 24 local variables were not respected in the tutorial.) I also think any Local Variables section should be removed from the displayed tutorial buffer. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 30 00:32:09 2012 Received: (at control) by debbugs.gnu.org; 30 Mar 2012 04:32:09 +0000 Received: from localhost ([127.0.0.1]:45750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDTVQ-00029Y-56 for submit@debbugs.gnu.org; Fri, 30 Mar 2012 00:32:08 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:35412) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDTUw-00028f-V5 for control@debbugs.gnu.org; Fri, 30 Mar 2012 00:32:06 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SDT0S-0007XC-7C for control@debbugs.gnu.org; Fri, 30 Mar 2012 00:00:08 -0400 Date: Fri, 30 Mar 2012 00:00:08 -0400 Message-Id: Subject: control message for bug 11127 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) severity 11127 minor From unknown Sun Jun 22 00:41:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11127: 24.0.94; [PATCH] Tutorial breaks with modified key bindings Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Mar 2012 13:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11127 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Glenn Morris Cc: "Aaron S. Hawley" , 11127@debbugs.gnu.org Received: via spool by 11127-submit@debbugs.gnu.org id=B11127.13331126624289 (code B ref 11127); Fri, 30 Mar 2012 13:05:02 +0000 Received: (at 11127) by debbugs.gnu.org; 30 Mar 2012 13:04:22 +0000 Received: from localhost ([127.0.0.1]:46290 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDbV7-000178-Oc for submit@debbugs.gnu.org; Fri, 30 Mar 2012 09:04:21 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.183]:28749) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDbUe-00016F-KF for 11127@debbugs.gnu.org; Fri, 30 Mar 2012 09:04:20 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AicFAKU/KE9MCqRV/2dsb2JhbACBX5x7eYhwnhmGGQSbGYQJ X-IronPort-AV: E=Sophos;i="4.73,1,1325480400"; d="scan'208";a="170666474" Received: from 76-10-164-85.dsl.teksavvy.com (HELO pastel.home) ([76.10.164.85]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 30 Mar 2012 08:32:19 -0400 Received: by pastel.home (Postfix, from userid 20848) id EA53459276; Fri, 30 Mar 2012 08:32:18 -0400 (EDT) From: Stefan Monnier Message-ID: References: Date: Fri, 30 Mar 2012 08:32:18 -0400 In-Reply-To: (Glenn Morris's message of "Thu, 29 Mar 2012 23:58:11 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > Though maybe there are other directory locals that could cause > non-standard behaviour. It's a shame there appears to be no setting for > enable-local-variables that means "respect (safe) file-locals, but > ignore directory locals". In the case of the tutorial, maybe we should use the tutorial's location to initialize the default-directory setting, which would prevent it from using the wrong dir-local settings. Stefan From unknown Sun Jun 22 00:41:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11127: 24.0.94; [PATCH] Tutorial breaks with modified key bindings Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Mar 2012 16:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11127 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: "Aaron S. Hawley" , 11127@debbugs.gnu.org Received: via spool by 11127-submit@debbugs.gnu.org id=B11127.133312633726438 (code B ref 11127); Fri, 30 Mar 2012 16:53:01 +0000 Received: (at 11127) by debbugs.gnu.org; 30 Mar 2012 16:52:17 +0000 Received: from localhost ([127.0.0.1]:47236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDf3h-0006sL-A9 for submit@debbugs.gnu.org; Fri, 30 Mar 2012 12:52:17 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:56859) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDf3U-0006s3-6J for 11127@debbugs.gnu.org; Fri, 30 Mar 2012 12:52:15 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SDeYu-0004pL-Rw; Fri, 30 Mar 2012 12:20:28 -0400 From: Glenn Morris References: X-Spook: assassinate Jyllandsposten Security Council MDA Noriega X-Ran: XM9sz\KAyxEjtM+hdj*9z^Xh)&),w44VZ{!h,BG8l|/sa+%n#C!|SoJJE-P\))Il X-Hue: magenta X-Attribution: GM Date: Fri, 30 Mar 2012 12:20:28 -0400 In-Reply-To: (Stefan Monnier's message of "Fri, 30 Mar 2012 08:32:18 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Stefan Monnier wrote: > In the case of the tutorial, maybe we should use the tutorial's location > to initialize the default-directory setting, which would prevent it from > using the wrong dir-local settings. I'm not sure that will help with the specified example, where dir-locals are applied by a class setting, not an actual file. Also, the tutorial explains the use of C-x C-s, which implicitly relies on the directory being writable (maybe it should actually set d-d to ~). From unknown Sun Jun 22 00:41:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11127: 24.0.94; [PATCH] Tutorial breaks with modified key bindings Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Mar 2012 17:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11127 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "Aaron S. Hawley" Cc: 11127@debbugs.gnu.org Received: via spool by 11127-submit@debbugs.gnu.org id=B11127.13331301413099 (code B ref 11127); Fri, 30 Mar 2012 17:56:02 +0000 Received: (at 11127) by debbugs.gnu.org; 30 Mar 2012 17:55:41 +0000 Received: from localhost ([127.0.0.1]:47287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDg2m-0000nX-3L for submit@debbugs.gnu.org; Fri, 30 Mar 2012 13:55:41 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:58232) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDg2j-0000nP-Ps for 11127@debbugs.gnu.org; Fri, 30 Mar 2012 13:55:22 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SDfYA-00068d-81; Fri, 30 Mar 2012 13:23:46 -0400 From: Glenn Morris References: X-Spook: basement Afghanistan KGB Mossad PLO Albanian Nazi S Box X-Ran: 2=y7>G|qqz2>m;eMp1\60K/W145*vRWUi4/A(L)9V\~m,S@-oQj?^*n"n1Dd@4Bj`3/>=T X-Hue: white X-Attribution: GM Date: Fri, 30 Mar 2012 13:23:46 -0400 In-Reply-To: (Aaron S. Hawley's message of "Thu, 29 Mar 2012 17:31:31 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) "Aaron S. Hawley" wrote: > emacs -Q > (dir-locals-set-class-variables > 'unwritable-directory > '((nil . ((buffer-read-only . t))))) > (dir-locals-set-directory-class default-directory 'unwritable-directory) By the way, I know this example is partially taken fron the manual, but I think I am going to say "don't do that", since it also affects some non-file buffers, eg log-edit ones. Although you probably won't be trying to commit a file from an unwritable directory anyway. The more obvious sources of problems, eg dired and vc-dir, happen to already make their buffers read-only. From unknown Sun Jun 22 00:41:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11127: 24.0.94; [PATCH] Tutorial breaks with modified key bindings Resent-From: "Aaron S. Hawley" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Mar 2012 18:14:27 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11127 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Glenn Morris Cc: Stefan Monnier , 11127@debbugs.gnu.org Received: via spool by 11127-submit@debbugs.gnu.org id=B11127.133313307612226 (code B ref 11127); Fri, 30 Mar 2012 18:14:27 +0000 Received: (at 11127) by debbugs.gnu.org; 30 Mar 2012 18:44:36 +0000 Received: from localhost ([127.0.0.1]:47365 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDgoK-0003B2-2W for submit@debbugs.gnu.org; Fri, 30 Mar 2012 14:44:36 -0400 Received: from mail-bk0-f44.google.com ([209.85.214.44]:50061) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDgoH-0003An-DZ for 11127@debbugs.gnu.org; Fri, 30 Mar 2012 14:44:30 -0400 Received: by bkuw5 with SMTP id w5so791369bku.3 for <11127@debbugs.gnu.org>; Fri, 30 Mar 2012 11:12:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=nAYWkcRxWAovXobs3449+dF3AT31e0Km2eTH5sKtTLA=; b=GeducsLq7rFHqeaMIJx26LZnT5u2PhygnSMa8CJ/5+9Bkmw4nhYQ0Izw5mwUM/6aW2 QdBkMMCvHnP2l3oe+mbyNLhhF9yf/z4DarstTLH8uvSEA4ym+UdR1bi4SViKZZ8LFqI0 Q7XcM773uRkys+mLmVLyizymEH32NwbQgn7N/VYDyi8blkxW+rvi+TxIUbrqA6gQpAM3 OAFeguDqAA6m8bE2ZVA2QgV1K1/xIBqPUMZxIUdD1nyu6Jyk4F6jzpOP/tq3ia+mesAL hNuINkoyjDSgJhhz6DqeI8Uw1+Vnz1LcGtUX5sTHoc0tQ0ev/msLd8Z3IK27KcTsx47T oF4g== MIME-Version: 1.0 Received: by 10.205.122.73 with SMTP id gf9mr1358937bkc.96.1333131174789; Fri, 30 Mar 2012 11:12:54 -0700 (PDT) Received: by 10.205.35.78 with HTTP; Fri, 30 Mar 2012 11:12:54 -0700 (PDT) In-Reply-To: References: Date: Fri, 30 Mar 2012 14:12:54 -0400 Message-ID: From: "Aaron S. Hawley" Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > I'm not sure that will help with the specified example, where dir-locals > are applied by a class setting, not an actual file. My understanding is that all dir-locals classes need to apply to some directory path. > Also, the tutorial explains the use of C-x C-s, which implicitly relies > on the directory being writable (maybe it should actually set d-d to ~). Stefan's last comment made me wonder whether we could let-bind `default-directory' to a bogus value that will never be a dir-locals path. How about the empty string? This patch seems to work. I tested it with the same scenario before. emacs -Q (progn (dir-locals-set-class-variables 'unwritable-directory '((nil . ((buffer-read-only . t))))) (dir-locals-set-directory-class default-directory 'unwritable-directory)) C-h t --- tutorial.el 2012-02-13 11:13:25.000000000 -0500 +++ tutorial.el 2012-03-30 13:57:49.942206100 -0400 @@ -830,7 +830,8 @@ (if old-tut-file (progn (insert-file-contents (tutorial--saved-file)) - (let ((enable-local-variables :safe)) + (let ((default-directory "") + (enable-local-variables :safe)) (hack-local-variables)) (goto-char (point-min)) (setq old-tut-point @@ -847,7 +848,8 @@ (goto-char tutorial--point-before-chkeys) (setq tutorial--point-before-chkeys (point-marker))) (insert-file-contents (expand-file-name filename tutorial-directory)) - (let ((enable-local-variables :safe)) + (let ((default-directory "") + (enable-local-variables :safe)) (hack-local-variables)) (forward-line) (setq tutorial--point-before-chkeys (point-marker))) From unknown Sun Jun 22 00:41:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11127: 24.0.94; [PATCH] Tutorial breaks with modified key bindings Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 Mar 2012 18:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11127 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "Aaron S. Hawley" Cc: Stefan Monnier , 11127@debbugs.gnu.org Received: via spool by 11127-submit@debbugs.gnu.org id=B11127.133321891210611 (code B ref 11127); Sat, 31 Mar 2012 18:36:01 +0000 Received: (at 11127) by debbugs.gnu.org; 31 Mar 2012 18:35:12 +0000 Received: from localhost ([127.0.0.1]:33196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SE38p-0002l5-Ca for submit@debbugs.gnu.org; Sat, 31 Mar 2012 14:35:12 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:59459) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SE38n-0002ky-6E for 11127@debbugs.gnu.org; Sat, 31 Mar 2012 14:35:09 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SE38f-0006z3-EW; Sat, 31 Mar 2012 14:35:01 -0400 From: Glenn Morris References: X-Spook: 9705 Samford Road oil Dick Cheney Lon Horiuchi cypherpunk X-Ran: 55|_D]:}SymOx+K3~':W+z>!Dy?b(tZ4PV!JDO@TKvw#HR~\".\m|_n$KG X-Hue: magenta X-Attribution: GM Date: Sat, 31 Mar 2012 14:35:01 -0400 In-Reply-To: (Aaron S. Hawley's message of "Fri, 30 Mar 2012 14:12:54 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) "Aaron S. Hawley" wrote: > + (let ((default-directory "") > + (enable-local-variables :safe)) 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". From unknown Sun Jun 22 00:41:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11127: 24.0.94; [PATCH] Tutorial breaks with modified key bindings Resent-From: "Aaron S. Hawley" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Apr 2012 13:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11127 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Glenn Morris Cc: Stefan Monnier , 11127@debbugs.gnu.org Received: via spool by 11127-submit@debbugs.gnu.org id=B11127.13333733371105 (code B ref 11127); Mon, 02 Apr 2012 13:29:02 +0000 Received: (at 11127) by debbugs.gnu.org; 2 Apr 2012 13:28:57 +0000 Received: from localhost ([127.0.0.1]:35597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SEhJY-0000Hl-Rp for submit@debbugs.gnu.org; Mon, 02 Apr 2012 09:28:57 -0400 Received: from mail-bk0-f44.google.com ([209.85.214.44]:61975) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SEhJW-0000Hd-4C for 11127@debbugs.gnu.org; Mon, 02 Apr 2012 09:28:55 -0400 Received: by bkuw5 with SMTP id w5so2201838bku.3 for <11127@debbugs.gnu.org>; Mon, 02 Apr 2012 06:28:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=+DvoYNjGHpvPG22e0lQTr55oaSBJKFW6rUhU24pdiMc=; b=jV1YDELQhq2uPb/sqbzivwHa815lWtUJz3oLgMjNHWXX7rah3W6CUQcwHS6sZauQOJ fIVufqd1s6ld90Kl3DME+jZdhDAIC6phWwHi1G6dJ5AF0snfqQjtAx7EzND/uaEKsr34 E74qBhEOJ7QWEK4LQFLj57+QEWDebrf0TCFtzSNJG1RGVLtgkZxZsxOfE6kRELqqweqq +0MjxQdpHkZG5pXx1RzDwsDx6VLMhriwBH5v8FJ3zlzjeQ5uEzWkEy0BkM/jVe9dywOQ rBfjWy5W5C0ut7u/OvsNB9zcDFDuIgJPBkIUJVd0PRxSWy5sggvz+6u2ACf2DybsJMgd dELw== MIME-Version: 1.0 Received: by 10.204.128.75 with SMTP id j11mr3409253bks.2.1333373317067; Mon, 02 Apr 2012 06:28:37 -0700 (PDT) Received: by 10.204.37.133 with HTTP; Mon, 2 Apr 2012 06:28:36 -0700 (PDT) In-Reply-To: References: Date: Mon, 2 Apr 2012 09:28:36 -0400 Message-ID: From: "Aaron S. Hawley" Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On 3/31/12, Glenn Morris wrote: > "Aaron S. Hawley" wrote: > >> + (let ((default-directory "") >> + (enable-local-variables :safe)) > > I'd rather have an explicit enable-dir-local-variables variable. I agree. > 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". I believe it is the case already that dir-locals only applies to buffers associated with files. It's only because tutorial.el calls `hack-local-variables' that it applies here. From unknown Sun Jun 22 00:41:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11127: 24.0.94; [PATCH] Tutorial breaks with modified key bindings Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Apr 2012 20:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11127 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "Aaron S. Hawley" Cc: Stefan Monnier , 11127@debbugs.gnu.org Received: via spool by 11127-submit@debbugs.gnu.org id=B11127.13340046689462 (code B ref 11127); Mon, 09 Apr 2012 20:52:01 +0000 Received: (at 11127) by debbugs.gnu.org; 9 Apr 2012 20:51:08 +0000 Received: from localhost ([127.0.0.1]:47392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SHLYK-0002SZ-8X for submit@debbugs.gnu.org; Mon, 09 Apr 2012 16:51:08 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:48687) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SHLYI-0002SR-EM for 11127@debbugs.gnu.org; Mon, 09 Apr 2012 16:51:07 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SHLXL-0000Lf-4k; Mon, 09 Apr 2012 16:50:07 -0400 From: Glenn Morris References: X-Spook: Plame Attorney General Bruxelles CESID number key SWAT X-Ran: g?V#\4Z{W:'Q8}'LKf`W|,(p5O]L86,.MY]M|5`d025b*jZll8X(>[AsU?d8z%{_85]GXy X-Hue: magenta X-Attribution: GM Date: Mon, 09 Apr 2012 16:50:07 -0400 In-Reply-To: (Aaron S. Hawley's message of "Mon, 2 Apr 2012 09:28:36 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) "Aaron S. Hawley" wrote: >> 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". > > I believe it is the case already that dir-locals only applies to > buffers associated with files. It's only because tutorial.el calls > `hack-local-variables' that it applies here. It also applies to some file-less buffers, such as vc-dir. This is by design, such buffers manually hack the dir-locals. From unknown Sun Jun 22 00:41:07 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: "Aaron S. Hawley" Subject: bug#11127: closed (Re: bug#11127: 24.0.94; [PATCH] Tutorial breaks with modified key bindings) Message-ID: References: X-Gnu-PR-Message: they-closed 11127 X-Gnu-PR-Package: emacs Reply-To: 11127@debbugs.gnu.org Date: Mon, 11 Feb 2013 01:53:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1360547582-22563-1" This is a multi-part message in MIME format... ------------=_1360547582-22563-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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@debbugs.gnu.org. --=20 11127: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D11127 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1360547582-22563-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 11127-done) by debbugs.gnu.org; 11 Feb 2013 01:52:39 +0000 Received: from localhost ([127.0.0.1]:49618 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U4iZT-0005rM-1i for submit@debbugs.gnu.org; Sun, 10 Feb 2013 20:52:39 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:38723) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U4iZQ-0005rF-Pb for 11127-done@debbugs.gnu.org; Sun, 10 Feb 2013 20:52:37 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1U4iZ8-0001MK-S5; Sun, 10 Feb 2013 20:52:18 -0500 From: Glenn Morris To: 11127-done@debbugs.gnu.org Subject: Re: bug#11127: 24.0.94; [PATCH] Tutorial breaks with modified key bindings References: X-Spook: infowar anthrax Chobetsu Uzi Leuken-Baden offensive X-Ran: iQ;E#hvLW`YEG\ANP9[FOaHKN(m8$:%Ph?G$u>s?sKrxX;{2T+7qrKx+1Q9y]M"?0QWSS3 X-Hue: blue X-Debbugs-No-Ack: yes X-Attribution: GM Date: Sun, 10 Feb 2013 20:52:18 -0500 In-Reply-To: (Glenn Morris's message of "Sat, 31 Mar 2012 14:35:01 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 11127-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) 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. ------------=_1360547582-22563-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 29 Mar 2012 19:21:41 +0000 Received: from localhost ([127.0.0.1]:45246 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDKui-0003pp-HH for submit@debbugs.gnu.org; Thu, 29 Mar 2012 15:21:40 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52065) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDKuF-0003p5-BR for submit@debbugs.gnu.org; Thu, 29 Mar 2012 15:21:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SDKPl-0001Rm-LH for submit@debbugs.gnu.org; Thu, 29 Mar 2012 14:49:43 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:53202) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDKPl-0001Rb-Fm for submit@debbugs.gnu.org; Thu, 29 Mar 2012 14:49:41 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51594) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDKPj-0003vN-MF for bug-gnu-emacs@gnu.org; Thu, 29 Mar 2012 14:49:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SDKPh-0001QZ-1B for bug-gnu-emacs@gnu.org; Thu, 29 Mar 2012 14:49:39 -0400 Received: from mail-bk0-f41.google.com ([209.85.214.41]:44428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDKPg-0001Pv-Nk for bug-gnu-emacs@gnu.org; Thu, 29 Mar 2012 14:49:36 -0400 Received: by bkwq16 with SMTP id q16so2759467bkw.0 for ; Thu, 29 Mar 2012 11:49:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=tvu1jIsipulq4vGGYlFDc96h+17xFtLh9CX1fHZQqzI=; b=f30qu3vq/83KyVmamHT8vxZEVr+xUkC91vaJ9u31rVmBXKFq0LkFpGKnmA6XBU1gk8 loVYg78Db0DZJ16aZGlNoYa4FrZQC5oWHbAmRFBrxRSq8OaUOOraVHFdnBEmJvFXKOwr /fINwiKEK/tPX55uLFrVa0mM7wuQZ9L36UwC5FjvPz4duKPk9B4V6HdpZMookUnXadsq BH23bGG1o5ZAlw/cHytjXs1pCIAqS1ctJXo0Lsth4Z1u+APCBlT1ZQdO7F3ylkDN6uq0 EqJdNy4CWPVgXmXvABltktH7d5euxPTF49jJCRQotuCtBsV/7FVkMeBO6AAVNP/lPZPv FqGA== MIME-Version: 1.0 Received: by 10.204.150.75 with SMTP id x11mr14204494bkv.62.1333046973989; Thu, 29 Mar 2012 11:49:33 -0700 (PDT) Received: by 10.205.35.78 with HTTP; Thu, 29 Mar 2012 11:49:33 -0700 (PDT) Date: Thu, 29 Mar 2012 14:49:33 -0400 Message-ID: Subject: 24.0.94; [PATCH] Tutorial breaks with modified key bindings From: "Aaron S. Hawley" To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) 2012-03-29 Aaron S. Hawley * tutorial.el (help-with-tutorial, tutorial--display-changes): If user has modified default key bindings then Emacs complains "Buffer is read-only: #" 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. ------------=_1360547582-22563-1--