From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: vincent.belaiche@gmail.com (Vincent =?UTF-8?Q?Bela=C3=AFche?=) Newsgroups: gmane.emacs.bugs Subject: bug#27391: 25.2.50; utf-8 coding cookie is not applied on some specific markdown file Date: Mon, 19 Jun 2017 12:51:33 +0200 Message-ID: <84lgooxnbe.fsf@gmail.com> References: <841sqkdzh5.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1497869817 20372 195.159.176.226 (19 Jun 2017 10:56:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 19 Jun 2017 10:56:57 +0000 (UTC) Cc: Vincent =?UTF-8?Q?Bela=C3=AFche?= To: Philipp Stephani , 27391@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 19 12:56:50 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMuMT-0004q0-Um for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Jun 2017 12:56:50 +0200 Original-Received: from localhost ([::1]:41695 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMuMX-0008IB-It for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Jun 2017 06:56:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42611) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMuHu-0003yc-4o for bug-gnu-emacs@gnu.org; Mon, 19 Jun 2017 06:52:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMuHq-0008Ml-4B for bug-gnu-emacs@gnu.org; Mon, 19 Jun 2017 06:52:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52973) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dMuHq-0008Mc-1L for bug-gnu-emacs@gnu.org; Mon, 19 Jun 2017 06:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dMuHp-0003Mg-Ml for bug-gnu-emacs@gnu.org; Mon, 19 Jun 2017 06:52:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: vincent.belaiche@gmail.com (Vincent =?UTF-8?Q?Bela=C3=AFche?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Jun 2017 10:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27391 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27391-submit@debbugs.gnu.org id=B27391.149786950012906 (code B ref 27391); Mon, 19 Jun 2017 10:52:01 +0000 Original-Received: (at 27391) by debbugs.gnu.org; 19 Jun 2017 10:51:40 +0000 Original-Received: from localhost ([127.0.0.1]:55649 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMuHU-0003M6-Ex for submit@debbugs.gnu.org; Mon, 19 Jun 2017 06:51:40 -0400 Original-Received: from smtp02.smtpout.orange.fr ([80.12.242.124]:18455 helo=smtp.smtpout.orange.fr) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMuHS-0003Ls-Th for 27391@debbugs.gnu.org; Mon, 19 Jun 2017 06:51:39 -0400 Original-Received: from AigleRoyal ([90.32.171.63]) by mwinf5d55 with ME id aarU1v0051NRGYS03arUM1; Mon, 19 Jun 2017 12:51:32 +0200 X-ME-Helo: AigleRoyal X-ME-Auth: dmluY2VudGJlbGFpY2hlQG9yYW5nZS5mcg== X-ME-Date: Mon, 19 Jun 2017 12:51:32 +0200 X-ME-IP: 90.32.171.63 In-Reply-To: X-Antivirus: Avast (VPS 170619-0, 19/06/2017), Outbound message X-Antivirus-Status: Clean X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:133749 Archived-At: [...] > > With git-blame it's not really tedious. Commit > 6b61353c0a0320ee15bb6488149735381fed62ec replaced ^\\(.*\\)[ \t]* with > [\r\n]\\([^[\r\n]*\\)[ \t]*, so I think it's almost certain this is a > typo (the previous regex didn't exclude the [ either). Anyway, if > people want this to stay, they should have added a comment. Thank you, I had a look at Wikipedia for the QWERTY keyboard layout (I have a French keyboard and the layout is somehow different for \ and ]). Modern QWERTY layout is as follows: 1 2 3 4 5 6 7 8 9 0 - =3D Q W E R T Y U I O P [ ] \ A S D F G H J K L ; ' Z X C V B N M , . / So ] is just next to \. So, yes, definitely this is a typo, the author had too big a finger when hitting \. Concerning factorization, couldn't one use [\n\r] in all cases rather than a switch based on some input argument ? I was also wondering whether it is not possible to have a single regexp for the whole Local Variable section. The following `doit' function is a trial to do so. `M-x doit' will seach forward the whole Local Variables section and display "ok" if found, "nak" otherwise. (defun doit () (interactive) (let* ((eol "\\(\r\n?\\|\n\\)") (eol-again "\\1") (space-maybe "[ \t]*") ;; suffix may be the empty string (suffix "\\([^ \r\n]+\\(?:[^\r\n]*[^ \r\n]\\)?\\|\\)") (prefix "\\([ \t]*[^ \r\n]+\\(?:[^\r\n]*[^ \r\n]\\)?\\)") (prefix-again "\\2") (suffix-again "\\3") (symbol: "\\(?:\\(?:[^][()'\" \t\r\n]\\|\\\\[][()'\" \t]\\)+[ \t]*:\\)") (sexp (concat "\\(?:" (substring prefix 2)))) (message (if (and (re-search-forward (concat eol prefix space-maybe "Local Variables:" space-maybe suffix space-maybe e= ol-again "\\(?:" prefix space-maybe symbol: sexp space-maybe suffix-again spac= e-maybe eol-again "\\)*" prefix space-maybe "End:" space-maybe suffix space-maybe "\\(" eol-aga= in "\\)?" ) nil t) ;; when the tailing eol is not there we must be at EOB. (or (match-string 3) (eobp))) "ok" "nak")))) Vincent. --- L'absence de virus dans ce courrier =C3=A9lectronique a =C3=A9t=C3=A9 v=C3= =A9rifi=C3=A9e par le logiciel antivirus Avast. https://www.avast.com/antivirus