emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [PATCH (v3)][ox-latex.el] Allow AUTO argument to org-latex-guess


From: Rasmus
Subject: Re: [O] [PATCH (v3)][ox-latex.el] Allow AUTO argument to org-latex-guess-babel-language.
Date: Fri, 07 Jun 2013 15:16:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Nicolas Goaziou <address@hidden> writes:

> Hello,
>
> Rasmus <address@hidden> writes:
>
>> Nicolas Goaziou <address@hidden> 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)))))

It looks more elegant.  I'll try to incorporate it and prepare a v4.

> Why do you need to use a non-nil FIXEDCASE argument here?

When I don't 

#+LANGUAGE: en
#+LATEX_HEADER: \usepackage[AUTO]{babel}

becomes 

\usepackage[ENGLISH]{babel}. . .

Why?  I don't know. . .  Fixedcase solves it.

-- 
Summon the Mothership!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]