From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Add new keyword :coding for #+include directive Date: Tue, 24 Apr 2018 23:59:57 +0200 Message-ID: <87zi1sl0yq.fsf@nicolasgoaziou.fr> References: <87tvsbx72g.fsf@killashandra.ballybran.fr> <87in8qyh3t.fsf@killashandra.ballybran.fr> <874lkakz58.fsf@nicolasgoaziou.fr> <87muy0b4kw.fsf@killashandra.ballybran.fr> <87in8lh3xk.fsf@killashandra.ballybran.fr> <87zi1uqkta.fsf@nicolasgoaziou.fr> <87in8hd7xe.fsf@killashandra.ballybran.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fB5yo-0002AR-UF for emacs-orgmode@gnu.org; Tue, 24 Apr 2018 18:00:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fB5yk-00045f-3Z for emacs-orgmode@gnu.org; Tue, 24 Apr 2018 18:00:07 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:54375) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fB5yj-00044z-UU for emacs-orgmode@gnu.org; Tue, 24 Apr 2018 18:00:02 -0400 In-Reply-To: <87in8hd7xe.fsf@killashandra.ballybran.fr> ("Pierre =?utf-8?Q?T=C3=A9choueyres=22's?= message of "Mon, 23 Apr 2018 21:44:29 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Pierre =?utf-8?Q?T=C3=A9choueyres?= Cc: org-mode Hello, pierre.techoueyres@free.fr (Pierre T=C3=A9choueyres) writes: > I think I've corrected all points. You'll find new versions attached. Thank you. > Would you mind consider to include the patch for the detection of > encoding with the #+include keyword in 9.2 release ? This patch is still missing some small parts for proper integration, namely documentation, and, if possible, a couple of tests. Besides, 9.2 branch is supposedly frozen. Granted, it doesn't seem too harmful, but is there any strong reason to integrate it in Org 9.2 (assuming documentation is ready)? > + (coding > + (intern (or (and (string-match > + ":coding[[:space:]]+\\_<\\(\\(?:\\sw\\|\\$\\|&\\|\\*\\|\\+\\|-= \\|_\\|<\\|>\\)+\\)\\_>" value) > + (prog1 (match-string 1 value) > + (setq value (replace-match "" nil nil value)))) > + (symbol-name coding-system-for-read)))) I suggested a refactoring that you didn't integrate: it seems wasteful to call `intern' on the return value of `symbol-name'. Besides, my suggestion about the regexp was wrong. We shouldn't make the syntax foolproof. I think ":coding +\\(\\S-+\\)" is enough actually. Sorry about sending you in the wrong track. Regards, --=20 Nicolas Goaziou