emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: [PATCH (new version)][ox-latex.el] Allow AUTO argument to org-latex-guess-babel-language.
Date: Thu, 06 Jun 2013 11:36:56 +0200	[thread overview]
Message-ID: <87ehcf1sxz.fsf@pank.eu> (raw)
In-Reply-To: 87y5aollyh.fsf@gmail.com

Nicolas Goaziou <n.goaziou@gmail.com> writes:

>> It changes behavior for your setup in that you can define a LANGUAGE
>> that isn't a known abbreviation.
>
> While I think your patch is overall an improvement, I'm not convinced by
> this particular point. Indeed #+LANGUAGE: expects a language code as
> value, not just any string. This is important since latex backend is not
> the only one to use that keyword.

We can discard this, of course.  

> For example, imagine a user in need for german smart quotes. How do you
> explain to him than #+language: german will not work, but #+language: de
> will?

A combination of `org-latex-babel-language-alist' and 'look at the
output' and feeble explanations of translations :)

How do we explain that to use his favorite babel, perhaps his own
"germanme", is not available extending org-latex-babel-language-alist?
Of course, in this case it's just a matter of using a LATEX_HEADER, so
it's not worth arguing about, and I'm happy to remove it.

> I think special Babel needs can be handled elsewhere.

Was this related to the above?

> You need to punctuate your sentence.

OK.

>> +		       (remove "AUTO"
>
> You can use `delete' instead of `remove': no need to copy the list.

Thanks.

> There cannot be any "\n" in the value, so you can use "[ \t]+" instead.
> Also, you don't need the `replace-regexp-in-string' part:
>   (org-split-string (match-string 1 header) ",[ \t]*")

I didn't know it was a repexp, thanks!

> The problem with this implementation is that it will not put LANGUAGE at
> the same place AUTO was. IOW, there's no difference between:
>
>   #+LATEX_HEADER: \usepackage[AUTO,danish]{babel}
>
> and,
>
>   #+LATEX_HEADER: \usepackage[danish,AUTO]{babel}
>
> although it matters in LaTeX.

Sure that's wasn't part of the 'deal', but I can see how it would
matter, and it makes more sense in this way.

I'll see if I can fix these bugs.  Thanks for the feedback.

–Rasmus

-- 
Powered by magic pixies!

  parent reply	other threads:[~2013-06-06  9:37 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-31 22:33 [PATCH][ox-latex.el] Allow AUTO argument to org-latex-guess-babel-language Rasmus
2013-06-01  5:31 ` Achim Gratz
2013-06-01 13:59   ` Rasmus
2013-06-01 14:07     ` Rasmus
2013-06-03  7:44 ` Sebastien Vauban
2013-06-03 13:47   ` Rasmus
2013-06-03 14:08     ` Sebastien Vauban
2013-06-03 15:10       ` Rasmus
2013-06-04  6:45         ` Sebastien Vauban
2013-06-04  9:25           ` [PATCH (new version)][ox-latex.el] " Rasmus
2013-06-05 13:35             ` Nicolas Goaziou
2013-06-06  7:46               ` Sebastien Vauban
2013-06-06  9:28                 ` Rasmus
2013-06-06  9:36               ` Rasmus [this message]
2013-06-06 21:30               ` [PATCH (v3)][ox-latex.el] " Rasmus
2013-06-07 12:35                 ` Nicolas Goaziou
2013-06-07 13:16                   ` Rasmus
2013-06-07 13:25                     ` Nicolas Goaziou
2013-06-07 15:26                   ` Rasmus
2013-06-09  7:55                     ` Nicolas Goaziou
2013-06-11 23:12                       ` [PATCH (v5)][ox-latex.el] " Rasmus
2013-06-12 13:27                         ` Nicolas Goaziou
2013-06-12 14:32                           ` Rasmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ehcf1sxz.fsf@pank.eu \
    --to=rasmus@gmx.us \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).