From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Using Buffer name in :include export property Date: Thu, 28 Aug 2014 19:21:05 -0400 Message-ID: <871ts0yzdq.fsf@alphaville.bos.redhat.com> References: <87y4u8s3c6.fsf@free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51955) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XN90P-0006Qe-1M for emacs-orgmode@gnu.org; Thu, 28 Aug 2014 19:21:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XN90J-0003U2-PC for emacs-orgmode@gnu.org; Thu, 28 Aug 2014 19:21:24 -0400 Received: from plane.gmane.org ([80.91.229.3]:41032) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XN90J-0003Tt-IN for emacs-orgmode@gnu.org; Thu, 28 Aug 2014 19:21:19 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XN90I-0001iK-AK for emacs-orgmode@gnu.org; Fri, 29 Aug 2014 01:21:18 +0200 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 29 Aug 2014 01:21:18 +0200 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 29 Aug 2014 01:21:18 +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: > I'm using the following elisp source block in my org files to choose the > publication options. > > (setq org-publish-project-alist > '(("TeX" > :base-directory "./" > :publishing-directory "./" > :publishing-function org-beamer-publish-to-latex > :exclude ".*" > :latex-class "mpsi_beamer" > :include ("test.org")) > )) > > I'd like to define it once and for all in my emacs > configuration files but I'd need to replace the > > :include ("test.org") > > line with the result of (buffer-name). Is it possible ? > Do you mean buffer-file-name? When you publish a project, it does not matter what your current buffer is. So why would you want to include the random file that you just happen to be visiting? And what if the buffer is not associated with a file at all (so buffer-file-name returns nil)? Can you explain what exactly you are trying to do? The usual method of splicing in a variable into a list is with backquote - see e.g. http://thread.gmane.org/gmane.emacs.orgmode/9583/focus=9603 but I don't think that would work here in any case. -- Nick