From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: schulte.eric@gmail.com Newsgroups: gmane.emacs.bugs Subject: bug#14089: 24.3; file local variables can't have a colon in their name Date: Fri, 29 Mar 2013 13:01:45 -0600 Message-ID: <877gkqqbc6.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1364590359 8331 80.91.229.3 (29 Mar 2013 20:52:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Mar 2013 20:52:39 +0000 (UTC) To: 14089@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 29 21:53:06 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ULgIE-000690-4f for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 Mar 2013 21:52:58 +0100 Original-Received: from localhost ([::1]:52446 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULgHp-0007Dv-Uk for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 Mar 2013 16:52:33 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36106) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULgHk-0007Df-0F for bug-gnu-emacs@gnu.org; Fri, 29 Mar 2013 16:52:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULgHh-0005MQ-32 for bug-gnu-emacs@gnu.org; Fri, 29 Mar 2013 16:52:27 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47311) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULgHg-0005ME-VG for bug-gnu-emacs@gnu.org; Fri, 29 Mar 2013 16:52:24 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1ULgKE-0000Bs-7K for bug-gnu-emacs@gnu.org; Fri, 29 Mar 2013 16:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: schulte.eric@gmail.com Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Mar 2013 20:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 14089 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.1364590448638 (code B ref -1); Fri, 29 Mar 2013 20:55:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Mar 2013 20:54:08 +0000 Original-Received: from localhost ([127.0.0.1]:51417 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ULgJL-0000AE-Oq for submit@debbugs.gnu.org; Fri, 29 Mar 2013 16:54:08 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49180) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ULebb-0005gq-CN for submit@debbugs.gnu.org; Fri, 29 Mar 2013 15:04:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULeZ1-0001PR-S2 for submit@debbugs.gnu.org; Fri, 29 Mar 2013 15:02:14 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:56663) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULeZ1-0001PN-P8 for submit@debbugs.gnu.org; Fri, 29 Mar 2013 15:02:11 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60482) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULeYv-0003Oz-Rx for bug-gnu-emacs@gnu.org; Fri, 29 Mar 2013 15:02:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULeYt-0001N3-JK for bug-gnu-emacs@gnu.org; Fri, 29 Mar 2013 15:02:05 -0400 Original-Received: from mail-pa0-f51.google.com ([209.85.220.51]:54581) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULeYt-0001Mt-Cz for bug-gnu-emacs@gnu.org; Fri, 29 Mar 2013 15:02:03 -0400 Original-Received: by mail-pa0-f51.google.com with SMTP id jh10so460406pab.10 for ; Fri, 29 Mar 2013 12:02:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:subject:date:message-id:mime-version :content-type; bh=IdoHrcspZuOs/mVp8j/dCbNxNE1M4aoxniVssDbA/Vw=; b=BdiEQjsC/iGvfmtWwpVutEsievkFRPOVl7Kc6g2XhntQ1H9j6KIYcH3KQKLdaeS+Id d8vNzFhuaEfv9p9RButDa7cBLky8W3DUHC5siqo9NMF/EscyH5Vf6YZSgWBsEBIkebDI qSM8AJkSaX0mmj62zDS4CXOAx4zeYycrzMBMra1b40x0ACU/TIn+qxtKWUv+dwjc9S05 mdR8vJ6GT+vbE0CQ/i9ybWRIm9xzQN6nPrkKSq9z61I3o5/zN3YYROvNOF4QXzAY5Ovg i2+fU0zyZRZ2AB2b+p0kgdPVXGdsMBKX3zWPOvA3U7y7a4/fB3lZeCLLILrEA93vrTsz QpKw== X-Received: by 10.66.240.2 with SMTP id vw2mr5918903pac.157.1364583722444; Fri, 29 Mar 2013 12:02:02 -0700 (PDT) Original-Received: from bagel (c-174-56-50-60.hsd1.nm.comcast.net. [174.56.50.60]) by mx.google.com with ESMTPS id cy4sm3750607pbc.13.2013.03.29.12.02.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 29 Mar 2013 12:02:01 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Fri, 29 Mar 2013 16:54:06 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:72981 Archived-At: --=-=-= Content-Type: text/plain To reproduce this bug, try to open a file like the attached Org-mode file. The phrase "Malformed mode-line" will be echoed in the mini-buffer even though this file uses legal file local variable syntax. --=-=-= Content-Type: text/x-org Content-Disposition: inline; filename=bug-example.org # -*- org-babel-default-header-args:R ((session . "R")) -*- #+Title: Example Demonstrating a File Local Variable Bug #+Author: Eric Schulte #+Date: <2013-03-29 Fri> This `hack-local-variables-prop-line' function chokes on this variable name. To my knowledge it is legal to have a ":" in a variable name, and this practice is widely used in Org-mode, specifically in variables which one would want to set in a file local manner. --=-=-= Content-Type: text/plain This patch fixes this bug, I've signed the Emacs FSF copyright assignment papers, but it is a tiny patch so it shouldn't matter. Thanks! --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=temporary-file-variables-w-colons.txt # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: schulte.eric@gmail.com-20130328230926-46be4fl21w1g28wc # target_branch: http://bzr.savannah.gnu.org/r/emacs/trunk/ # testament_sha1: 969600ed8b879f2317f13e9f06968aafad4f786d # timestamp: 2013-03-28 17:09:47 -0600 # base_revision_id: monnier@iro.umontreal.ca-20130328163306-\ # 419khox8aneaoaxv # # Begin patch === modified file 'lisp/files.el' --- lisp/files.el 2013-03-24 06:42:25 +0000 +++ lisp/files.el 2013-03-28 23:09:26 +0000 @@ -3058,7 +3058,11 @@ (while (and (or (not mode-only) (not result)) (< (point) end)) - (unless (looking-at "[ \t]*\\([^ \t\n:]+\\)[ \t]*:[ \t]*") + ;; The first of these next two regexs handles the + ;; case when a variable name includes a ":", such as + ;; the `org-babel-default-header-args:R' variable. + (unless (or (looking-at "[ \t]*\\([^ \t\n]?+\\)[ \t]*:[ \t]*") + (looking-at "[ \t]*\\([^ \t\n:]+\\)[ \t]*:[ \t]*")) (message "Malformed mode-line") (throw 'malformed-line nil)) (goto-char (match-end 0)) # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWUbmhKQAAan/gAAyACBQ//// 0gAcD/////BQA80t1o3vPXpy93vdCSSJiMIGmJNhCT9FNMninqBiY0CDJEniaZNJ6T0oYR6gAAAA AAyTEmSnhRmkDT1AAyDQB6hoADakmp5DRTam1DajamgA0PUAaAAAkkmkwmFPJijRkzRAAHqAGgAz S1WEfhTwKtT3Lzh0ptUwFljq3RvPzgDg4+hi9JNFWatAiacBNp3IkDC56rp8faNALW4WJH9ce0I4 Z3GPJC6C2Mb/dxhkm8cOfdIQ66fN3VUdhn4rW+w5H6/o92st+ja2A7xflnsZ06UJhX+y7kGzooqq 7W3cVuusjwpFyfSvT2myqcZODnTyKrAEMOEEaFAZApCpsCwwBUubxmdbx0obNO9dlFeiheV1LyDX grJNYIaa/OZTZslmmUv7NSjYTFSk0HuVurzo5oI0iIlY6e7GirGiM9qyooTyBr4gzgBdrWq+Udoe 0ELOU2gsNRtBGh50VBsck88MdLUo+pMxY1mqNkZFkcH8gVyOKsQDBAUtQV1RrZdWaaXBQEh+HE2Q kWgqVFNjBZWqkg2pKMldeUECX3XNq1r2CtxigWqRU0OaIkCCVas9HdcHxV+nLC8RBtcVmSA7SxMZ lwmjRRgRp2L4OsGG70jewey+edEe9QsThoPhM5SSi9uw8jxVmjPJsysa316MLrg4yithl8O1FIx2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