From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?Ik1hcnRpbiBHLiBTa2rDpnZlbGFuZCI=?= Subject: Re: [babel] tangle creates different filename than it used to Date: Mon, 01 Mar 2010 12:03:00 +0100 Message-ID: <4B8B9EE4.9070305@ifi.uio.no> References: <4B87F9C6.5050103@ifi.uio.no> <87hbp3i79u.fsf@stats.ox.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nm3MX-0001Js-7N for emacs-orgmode@gnu.org; Mon, 01 Mar 2010 06:00:33 -0500 Received: from [140.186.70.92] (port=41962 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nm3MW-0001JC-9o for emacs-orgmode@gnu.org; Mon, 01 Mar 2010 06:00:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nm3MT-00079d-Tq for emacs-orgmode@gnu.org; Mon, 01 Mar 2010 06:00:32 -0500 Received: from mail-out2.uio.no ([129.240.10.58]:43650) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nm3MT-00079G-Ks for emacs-orgmode@gnu.org; Mon, 01 Mar 2010 06:00:29 -0500 In-Reply-To: <87hbp3i79u.fsf@stats.ox.ac.uk> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Dan Davison Cc: emacs-orgmode Dan Davison wrote: > "Martin G. Skjæveland" writes: >> Hi, >> >> running tangle with the following values >> >> #+begin_src xml :tangle test.rdf >> ... >> #+end_src >> >> used to create a file called test.rdf. However, after a fresh git pull >> today this now tangles to the file test.rdf.xml, which is not what I >> want. > > I understand. I wonder if babel should simply assume that the user has > entered a file name with the correct extension when :tangle is something > other than "yes". I would prefer such a solution. Why? The generic answer is that I would like to name my files myself, and, less generally---as we see in this case, the extension of a file does not always tell the language used to produce the file, e.g., rdf files may be written in xml or in n3, which is not xml. I would like to specify different editing modes for the same file extension. >> I think I could add rdf as a language babel would understand but >> interpret as xml with something like >> >> (add-to-list 'org-babel-tangle-langs '("rdf" "xml" nil t)) > > To tell it to use extension .rdf for rdf blocks would be > > (add-to-list 'org-babel-tangle-langs '("rdf" "rdf" nil t)) > > and you'll also need > > (org-babel-add-interpreter "rdf") > >> and rewrite the block to >> >> #+begin_src rdf :tangle test >> ... >> #+end_src >> >> , but then it complains that there is no rdf-mode. How can I best >> solve this? > > To tell org to use sgml-mode for rdf: > > (add-to-list 'org-src-lang-modes '("rdf" . sgml)) Thanks! This works just fine. Martin