From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH (v3)][ox-latex.el] Allow AUTO argument to org-latex-guess-babel-language. Date: Fri, 07 Jun 2013 14:35:43 +0200 Message-ID: <87r4gew128.fsf@gmail.com> References: <87sj12bwzj.fsf@pank.eu> <8661xvprju.fsf@somewhere.org> <87ehcj9uh7.fsf@pank.eu> <8638sz1e3b.fsf@somewhere.org> <87obbn8c36.fsf@pank.eu> <86wqqae5n4.fsf@somewhere.org> <87ppw26xe2.fsf_-_@pank.eu> <87y5aollyh.fsf@gmail.com> <87txlbylja.fsf_-_@pank.eu> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38952) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkvtO-0002Ay-FW for emacs-orgmode@gnu.org; Fri, 07 Jun 2013 08:35:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UkvtJ-0000T8-E8 for emacs-orgmode@gnu.org; Fri, 07 Jun 2013 08:35:42 -0400 Received: from mail-wg0-x22f.google.com ([2a00:1450:400c:c00::22f]:51655) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkvtJ-0000T2-96 for emacs-orgmode@gnu.org; Fri, 07 Jun 2013 08:35:37 -0400 Received: by mail-wg0-f47.google.com with SMTP id e11so3001376wgh.26 for ; Fri, 07 Jun 2013 05:35:36 -0700 (PDT) In-Reply-To: <87txlbylja.fsf_-_@pank.eu> (rasmus@gmx.us's message of "Thu, 06 Jun 2013 23:30:33 +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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rasmus Cc: emacs-orgmode@gnu.org Hello, Rasmus writes: > Nicolas Goaziou writes: > is the attached patch better? It is, thank you. Here is another round of comments. > + (replace-match (mapconcat 'identity > + (if language > + (cond ((member language options) > + (delete "AUTO") options) > + ((member "AUTO" options) > + (dotimes (n (length options) options) > + (if (equal "AUTO" (nth n options)) > + (setf (nth n options) language)))) > + (t (append options (list language)))) > + (delete "AUTO" options)) I suggest to use something like this instead: (mapconcat (lambda (option) (if (equal "AUTO" option) language option)) (cond ((member language options) (delete "AUTO" options)) ((member "AUTO" options) options) (t (append options (list language))))) > - nil nil header 1)))))) > + t nil header 1))))) Why do you need to use a non-nil FIXEDCASE argument here? Regards, -- Nicolas Goaziou