From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [patch, ox-latex] better hyperref and title options Date: Thu, 19 Feb 2015 10:24:59 +0100 Message-ID: <87pp96nthw.fsf@nicolasgoaziou.fr> References: <87bnl0ynd2.fsf@gmx.us> <87bnkyvfz2.fsf@nicolasgoaziou.fr> <87lhk0aqjd.fsf@pank.eu> <878ufzo3f2.fsf@nicolasgoaziou.fr> <874mqn765j.fsf@gmx.us> <87h9unl4cp.fsf@nicolasgoaziou.fr> <87mw4asncv.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57234) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YONKx-0003o6-S9 for emacs-orgmode@gnu.org; Thu, 19 Feb 2015 04:24:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YONKu-0003A5-LZ for emacs-orgmode@gnu.org; Thu, 19 Feb 2015 04:23:59 -0500 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:50041) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YONKu-00039q-FJ for emacs-orgmode@gnu.org; Thu, 19 Feb 2015 04:23:56 -0500 In-Reply-To: <87mw4asncv.fsf@gmx.us> (rasmus@gmx.us's message of "Thu, 19 Feb 2015 02:26:24 +0100") 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 Rasmus writes: > So irrespective of this, here's an updated patch that uses > secondary-string parsing. Should I add it to master before or after I get > done with this moving description and keywords? You can go ahead, after fixing some minor typos. Thanks. > * ox-latex.el (org-latex-format-spec): New function with format-specs. Typo in the name. > (org-latex-template): Use org-latex-format-spec. > (org-latex-hyperref-template): New defaults and use > org-latex-format-spec. > (org-latex-title-command): Use org-latex-format-spec. Ditto (x3). > +*** ~org-latex-hyperref-template~, ~org-latex-title-command~ formatting > +New formatting keys are supported. See ~org-latex-format-spec~. See docstrings for more information (no need to talk about `org-latex--format-spec'). > +(defun org-latex--format-spec (info) > + "Create a format-spec for e.g. `org-latex-hyperref-template'. > +Also used by `org-latex-title-command' "Create a format-spec for document meta-data. INFO is.." is enough IMO. > - (let ((title (org-export-data (plist-get info :title) info))) > + (let ((title (org-export-data (plist-get info :title) info)) > + (spec (when (org-some 'stringp (list org-latex-hyperref-template > + org-latex-title-command)) > + (org-latex--format-spec info)))) Nitpick: #'stringp Anyway, both `org-latex-hyperref-template' and `org-latex-title-command' are always strings, per defcustom type. So you can drop the `when' part: (spec (org-latex--format-spec info)) Regards,