* [babel] tangle creates different filename than it used to
@ 2010-02-26 16:41 "Martin G. Skjæveland"
2010-02-27 5:20 ` Dan Davison
0 siblings, 1 reply; 3+ messages in thread
From: "Martin G. Skjæveland" @ 2010-02-26 16:41 UTC (permalink / raw)
To: emacs-orgmode
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 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))
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?
Thanks!
Martin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [babel] tangle creates different filename than it used to
2010-02-26 16:41 [babel] tangle creates different filename than it used to "Martin G. Skjæveland"
@ 2010-02-27 5:20 ` Dan Davison
2010-03-01 11:03 ` "Martin G. Skjæveland"
0 siblings, 1 reply; 3+ messages in thread
From: Dan Davison @ 2010-02-27 5:20 UTC (permalink / raw)
To: Martin G. Skjæveland; +Cc: emacs-orgmode
"Martin G. Skjæveland" <martige@ifi.uio.no> 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 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))
Dan
>
> Thanks!
>
> Martin
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [babel] tangle creates different filename than it used to
2010-02-27 5:20 ` Dan Davison
@ 2010-03-01 11:03 ` "Martin G. Skjæveland"
0 siblings, 0 replies; 3+ messages in thread
From: "Martin G. Skjæveland" @ 2010-03-01 11:03 UTC (permalink / raw)
To: Dan Davison; +Cc: emacs-orgmode
Dan Davison wrote:
> "Martin G. Skjæveland" <martige@ifi.uio.no> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-03-01 11:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-26 16:41 [babel] tangle creates different filename than it used to "Martin G. Skjæveland"
2010-02-27 5:20 ` Dan Davison
2010-03-01 11:03 ` "Martin G. Skjæveland"
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).