From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Cubizolles Subject: Re: Using Buffer name in :include export property Date: Fri, 29 Aug 2014 12:34:37 +0200 Message-ID: <87k35rshxe.fsf@free.fr> References: <87y4u8s3c6.fsf@free.fr> <871ts0yzdq.fsf@alphaville.bos.redhat.com> <87k35reirs.fsf@free.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57581) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNJWW-0007El-LY for emacs-orgmode@gnu.org; Fri, 29 Aug 2014 06:35:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNJWP-0000QR-5h for emacs-orgmode@gnu.org; Fri, 29 Aug 2014 06:35:16 -0400 Received: from plane.gmane.org ([80.91.229.3]:37485) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNJWO-0000PB-HT for emacs-orgmode@gnu.org; Fri, 29 Aug 2014 06:35:09 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XNJWJ-0005wl-Nq for emacs-orgmode@gnu.org; Fri, 29 Aug 2014 12:35:03 +0200 Received: from gas45-3-82-244-252-119.fbx.proxad.net ([82.244.252.119]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 29 Aug 2014 12:35:03 +0200 Received: from j.cubizolles by gas45-3-82-244-252-119.fbx.proxad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 29 Aug 2014 12:35:03 +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: emacs-orgmode@gnu.org Julien Cubizolles writes: > Thanks for the pointer, it works: > > (defun jc-org-publish-project-options () > (setq org-publish-project-alist > `(("TeX" > :base-directory "./" > :publishing-directory "./" > :publishing-function org-beamer-publish-to-latex > :exclude ".*" > :latex-class "mpsi_beamer" > :include , (list (file-name-nondirectory buffer-file-name)) > ) > ( several other projects...) > ))) > > (add-hook 'org-mode-hook 'jc-org-publish-project-options) > (add-hook 'org-export-before-processing-hook 'jc-org-publish-project-options) Arg, it doesn't: org-export-before-processing-hook calls its functions with the backend as an argument, so I could do --8<---------------cut here---------------start------------->8--- (defun jc-org-publish-project-options (backend) --8<---------------cut here---------------end--------------->8--- but the call to jc-org-publish-project-options in org-mode-hook doesn't work anymore then... Julien.