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: Fri, 16 Jun 2017 12:00:06 +0200 Message-ID: <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 1497607278 18164 195.159.176.226 (16 Jun 2017 10:01:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 16 Jun 2017 10:01:18 +0000 (UTC) Cc: Vincent =?UTF-8?Q?Bela=C3=AFche?= To: 27391@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 16 12:01:12 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 1dLo3z-0004LC-Gg for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Jun 2017 12:01:11 +0200 Original-Received: from localhost ([::1]:57881 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLo44-00026H-TU for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Jun 2017 06:01:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59208) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLo3u-00025T-UV for bug-gnu-emacs@gnu.org; Fri, 16 Jun 2017 06:01:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dLo3q-0007vd-TE for bug-gnu-emacs@gnu.org; Fri, 16 Jun 2017 06:01:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47577) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dLo3q-0007vK-FU for bug-gnu-emacs@gnu.org; Fri, 16 Jun 2017 06:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dLo3q-0007AU-50 for bug-gnu-emacs@gnu.org; Fri, 16 Jun 2017 06:01:02 -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: Fri, 16 Jun 2017 10:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 27391 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.149760723227508 (code B ref -1); Fri, 16 Jun 2017 10:01:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Jun 2017 10:00:32 +0000 Original-Received: from localhost ([127.0.0.1]:50254 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLo3L-00079c-IG for submit@debbugs.gnu.org; Fri, 16 Jun 2017 06:00:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39879) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLo3J-00079O-K3 for submit@debbugs.gnu.org; Fri, 16 Jun 2017 06:00:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dLo3C-0007Uv-FU for submit@debbugs.gnu.org; Fri, 16 Jun 2017 06:00:24 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:59383) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dLo3C-0007Ur-Ch for submit@debbugs.gnu.org; Fri, 16 Jun 2017 06:00:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59064) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLo3A-00021Q-Hs for bug-gnu-emacs@gnu.org; Fri, 16 Jun 2017 06:00:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dLo36-0007Rj-EJ for bug-gnu-emacs@gnu.org; Fri, 16 Jun 2017 06:00:20 -0400 Original-Received: from smtp01.smtpout.orange.fr ([80.12.242.123]:27438 helo=smtp.smtpout.orange.fr) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dLo35-0007PE-UK for bug-gnu-emacs@gnu.org; Fri, 16 Jun 2017 06:00:16 -0400 Original-Received: from AigleRoyal ([90.32.171.63]) by mwinf5d24 with ME id ZN081v00C1NRGYS03N08xU; Fri, 16 Jun 2017 12:00:12 +0200 X-ME-Helo: AigleRoyal X-ME-Auth: dmluY2VudGJlbGFpY2hlQG9yYW5nZS5mcg== X-ME-Date: Fri, 16 Jun 2017 12:00:12 +0200 X-ME-IP: 90.32.171.63 X-Antivirus: Avast (VPS 170615-0, 15/06/2017), Outbound message X-Antivirus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:133631 Archived-At: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D I was editing some file written in Markdown. Here is the file : https://framagit.org/latex-pourquoi-comment/lpc-articles/blob/795ecb9d4f7b8= 870486fe6557f01d2fe450c4461/CONTRIBUTING.md My Emacs default configuration was to get files in latin-1. So I had added some `coding: utf-8' cookie in this file. But it did not work, the file was still read in latin-1 instead of utf8. I made a test with one more cookie `eval: (message "Hello")', this one worked, which means that the problem is not that cookies aren't read, the problem is within the application of the coding scheme. The only way for me to get the correct encoding is to place: (modify-coding-system-alist 'file "\\.m\\(d\\|arkdown\\)\\'" 'prefer-utf-8) In my init file. I made the trial with `emacs -q', and the problem is still there, which shows that markdown-mode is not to blame. My first thought was that markdown-mode was the culprit, see discussion here : https://github.com/jrblevin/markdown-mode/issues/198 Jason Blevin is the author of markdown-mode, he noted that the presence of the [ character has some impact. See: https://github.com/jrblevin/markdown-mode/issues/198#issuecomment-308524696= I did not double check his analysis. To me this looks like some race problem where the automatic encoding detection is applied after the cookie and undoes it. Maybe some semaphore is missing, or something like that. Vincent. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D In GNU Emacs 25.2.50.1 (i686-pc-mingw32) of 2017-06-14 built on AIGLEROYAL Repository revision: da62c1532e479bbac4ce242ee1d170df9c435591 Windowing system distributor 'Microsoft Corp.', version 10.0.14393 Configured using: 'configure --prefix=3Dc:/Nos_Programmes/GNU/Emacs --without-jpeg --without-tiff --without-gif --without-png 'CFLAGS=3D -Og -g3 -L C:/Programmes/installation/emacs-install/libXpm-3.5.8/src' 'CPPFLAGS=3D -DFOR_MSW=3D1 -I C:/Programmes/installation/emacs-install/libXpm-3.5.8/include -I C:/Programmes/installation/emacs-install/libXpm-3.5.8/src -L C:/Programmes/installation/emacs-install/libXpm-3.5.8/src'' Configured features: XPM SOUND NOTIFY ACL TOOLKIT_SCROLL_BARS Important settings: value of $LANG: FRA locale-coding-system: cp1252 Major mode: Dired by name Minor modes in effect: diff-auto-refine-mode: t TeX-PDF-mode: t shell-dirtrack-mode: t recentf-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Recent messages: Mark set [2 times] Mark saved where search started Quit scroll-up-command: End of buffer Mark set find-dired *Find* finished. dired-get-file-for-visit: No file on this line [2 times] Mark set Quit Making completion list... Load-path shadows: c:/Programmes/installation/cedet-install/cedet-git/lisp/speedbar/loaddefs h= ides c:/Nos_Programmes/GNU/Emacs/share/emacs/25.2.50/lisp/loaddefs c:/Programmes/installation/cedet-install/cedet-git/lisp/speedbar/loaddefs h= ides c:/Programmes/installation/cedet-install/cedet-git/lisp/cedet/loaddefs= Features: (shadow emacsbug find-dired calc-yank calc-mode calccomp calc-alg calc-vec calc-aent calc-menu cal-move whitespace perl-mode log-edit pcvs-util eieio-opt speedbar sb-image ezimage dframe vc-bzr vc-src vc-sccs vc-svn vc-rcs vc-dir ewoc add-log org-element org-rmail org-mhe org-irc org-info org-gnus org-docview doc-view subr-x jka-compr image-mode org-bibtex bibtex org-bbdb org-w3m org org-macro org-footnote org-pcomplete org-list org-faces org-entities org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint ob-core ob-eval org-compat org-macs org-loaddefs find-func cal-menu calendar cal-loaddefs tex-info texinfo vc vc-dispatcher ediff-vers thingatpt rect visual-basic-mode sh-script smie executable make-mode misearch multi-isearch ediff-merg ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff vc-git diff-mode reftex-dcr reftex reftex-vars preview prv-emacs noutline outline pcmpl-unix latexenc tex-bar latex easy-mmode tex-style toolbar-x font-latex plain-tex tex-buf tex advice tex-mode compile shell pcomplete comint ansi-color ring bbdb-print info mailalias smtpmail sort ispell vc-cvs hl-line balance eieio-compat calc-forms dired-aux mail-extr bbdb-message sendmail gnus-async qp gnus-ml cursor-sensor nndraft nnmh nnfolder bbdb-gnus bbdb-mua bbdb-com crm network-stream nsm auth-source eieio eieio-core starttls gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig mailcap nntp gnus-cache gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range message dired-x dired format-spec rfc822 mml mml-sec password-cache epg mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus gnus-ems nnheader gnus-util mail-utils mm-util help-fns mail-prsvr edmacro kmacro skeleton calc-misc calc-arith calc-ext calc calc-loaddefs calc-macs tex-mik preview-latex tex-site auto-loads bbdb bbdb-site timezone bbdb-loaddefs template w32utils cl-seq cl-macs cl recentf tree-widget wid-edit load-path-to-cedet-svn finder-inf package epg-config seq byte-opt gv bytecomp byte-compile cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote w32notify w32 multi-tty make-network-process emacs) Memory information: ((conses 8 899957 158092) (symbols 32 53590 0) (miscs 32 2257 2796) (strings 16 133750 20600) (string-bytes 1 5975277) (vectors 8 55330) (vector-slots 4 1716681 54830) (floats 8 651 494) (intervals 28 72632 8079) (buffers 516 78)) --- 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