[O] Specifying ATTR_HTML class for source blocks
Hi all, I would like my source blocks to be exported to HTML as textareas with a class attribute -- so I can later use this in my javascript code. I can use ":textarea t" [1], but it seems that other attributes except width and height are ignored: #+ATTR_HTML: :textarea t :class testing #+BEGIN_SRC n3 My code #+END_SRC gives My code and, testing without ":textarea", #+ATTR_HTML: :class testing #+BEGIN_SRC n3 My code #+END_SRC gives My code Preferably, I want the following html: My code Is there a way to achieve this? Thanks, Martin [1] https://orgmode.org/manual/Text-areas-in-HTML-export.html
[Orgmode] [mobileorg-android] sync error, sdcard, index.org was not found
Hi, I just got myself a HTC Z, but I cannot get mobileorg to sync. The error message I get when pressing the sync button is: The file /sdcard/dropbox/org/index.org was not found. Here is what I did to get the error: - Installed Dropbox from Android Market. (Downloaded org-files to /sdcard/dropbox/org/. This I have checked with a file manager.) - Installed MobileOrg from Android Market. (Version 0.4.7, it says.) - Setup MobileOrg: - Synchronization Mode: SDCard - Full local path to your index.org file: /sdcard/dropbox/org/index.org - Storage Mode: sdcard - Go back to MobileOrg menu, press Sync, and get the error. Originally I had no index.org file (should I have had one?) so I created one. I'm guessing that that this might be the problem? It says on [1] that index.org will be created, but it is not clear if this also goes for local system setup (and not WebDAV). My index.org file looks like this: --cut * [[work.org][work]] * [[home.org][home]] --cut The instructions on mobileorg-android's page [2] are not completely clear. Have I done all the necessary preparations? Thanks! Martin [1] https://github.com/matburt/mobileorg-android/wiki/SetupNotes [2] https://github.com/matburt/mobileorg-android/wiki/ ___ 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
Re: [Orgmode] table, moving cells
On 29/09/10 17:58, Carsten Dominik wrote: Hi Martin, On Sep 25, 2010, at 6:02 PM, Martin G. Skjæveland wrote: Hi, is there a quick way for moving a cell about in a table? I enjoy swapping the order of rows and columns in a table using Meta + [arrow], but I have not found a ways of doing the same for a single cell. Is it possible? Example, with the cursor on '2' in the following table | A | B | C | | 1 | 2 | 3 | | x | y | z | and pressing [move cell left] would give me | A | B | C | | 2 | 1 | 3 | | x | y | z | Thanks! Hi Carsten I fail to see the use case for this. I have come across two use cases lately where I have been missing this feature: 1) in a timetable, swapping a cell or two, e.g., the title of a talk and the speaker, with next week's values; and 2) making a seating plan for a social event. In the latter, moving people about quick and easy is nice. Yes, this can be useful sometimes, and you can use `C-c C-x C-w' and `C-c C-x C-y' to cut and paste individual fields or even rectangular regions. Ok, thanks, I did not know about these. But for pushing a cell value to a neighboring cell, I don't see a frequent use that would call for a special command beyond what I listed above. Do you? I agree that it is not a frequent operation. For the seating plan, I ended up with lots of post-it notes on a wall, which worked just fine! :) Thanks again! 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
Re: [Orgmode] table, moving cells
On 26/09/10 00:24, Nick Dokos wrote: Charles C. Berry wrote: is there a quick way for moving a cell about in a table? I enjoy swapping the order of rows and columns in a table using Meta + [arrow], but I have not found a ways of doing the same for a single cell. Is it possible? Example, with the cursor on '2' in the following table | A | B | C | | 1 | 2 | 3 | | x | y | z | >>> and pressing [move cell left] would give me >>> >>> | A | B | C | >>> | 2 | 1 | 3 | >>> | x | y | z | Try M-t > [This is probably obvious, but just in case...] M-t transposes words: it doesn't know anything about table cells, ... Yes, I agree. To make it clear, I would in addition to [move cell left], also like to have [move cell right], [move cell up], [move cell down]. 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
[Orgmode] table, moving cells
Hi, is there a quick way for moving a cell about in a table? I enjoy swapping the order of rows and columns in a table using Meta + [arrow], but I have not found a ways of doing the same for a single cell. Is it possible? Example, with the cursor on '2' in the following table | A | B | C | | 1 | 2 | 3 | | x | y | z | and pressing [move cell left] would give me | A | B | C | | 2 | 1 | 3 | | x | y | z | 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
Re: [Orgmode] [babel] tangle creates different filename than it used to
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 ___ 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
[Orgmode] [babel] tangle creates different filename than it used to
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 ___ 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
[Orgmode] [babel] bug exporting code blocks to html
Hi, when I export ---start * test #+begin_src xml -n -r -l "" #+end_src Line no. [[(imp)]] is important! ---end to html I get (copying from my browser) ---start 1 test 1: 2: 3: Line no. nil is important! ---end I would like "" in line 2 of the block to be removed from output and the last line to read "Line no. 2 is important!". 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
[Orgmode] [babel] bug, exporting scrname source blocks html
Hi, when I export the following to html -start * test #+srcname: test1 #+begin_src n3 -n subject predicate object #+end_src #+begin_src n3 -n subject predicate object #+end_src -end the two source blocks are exported as (spacing removed) -start A test1 &equiv 1: 2: subject predicate object B 1: subject predicate object -end which in a browser looks like -start A test1 ≡ 1: 2: subject predicate object B 1: subject predicate object -end In my opinion it should be exported to look like this -start A 1: subject predicate object B 1: subject predicate object -end Thanks! Martin Emacs : GNU Emacs 23.1.50.1 (i486-pc-linux-gnu, GTK+ Version 2.18.0) of 2009-09-27 on palmer, modified by Debian Package: Org-mode version 6.34trans (release_6.34c.40.g2cd16.dirty) current state: == (setq org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-metaup-hook '(org-babel-load-in-session-maybe) org-after-todo-state-change-hook '(org-clock-out-if-current) org-babel-interpreters '("makefile" "tex" "n3" "xml" "java" "python" "dot" "css" "sh" "emacs-lisp") org-export-latex-format-toc-function 'org-export-latex-format-toc-default org-export-preprocess-hook '(org-export-blocks-preprocess) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-hide-block-toggle-maybe) org-src-mode-hook '(org-src-mode-configure-edit-buffer) org-confirm-shell-link-function 'yes-or-no-p org-src-preserve-indentation t org-export-first-hook '(org-beamer-initialize-open-trackers) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-export-latex-classes '(("article" "\\documentclass[11pt]{article}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}")) ("book" "\\documentclass[11pt]{book}" ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ) org-publish-project-alist '(("vortex" :base-directory "~/exercises/" :publishing-directory "~/exercises/" :base-extension "org" :publishing-function org-publish-org-to-html :preamble "${resource:breadcrumb}.breadcrumb {font-size:80%;}" :skip-before-1st-heading nil) ) org-export-preprocess-before-normalizing-links-hook '(org-remove-file-link-modifiers) org-use-speed-commands t org-mode-hook '((lambda nil (org-add-hook (quote change-major-mode-hook) (quote org-babel-show-result-all) (quote append) (quote local)) ) org-babel-result-hide-spec org-babel-hide-all-hashes #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5] ) org-ctrl-c-ctrl-c-hook '(org-babel-lob-execute-maybe org-babel-hash-at-point org-babel-execute-src-block-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-export-interblocks '((lob org-babel-exp-lob-one-liners) (src org-babel-exp-inline-src-blocks)) org-occur-hook '(org-first-headline-recenter) org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code) org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc org-beamer-auto-fragile-frames org-beamer-place-default-actions-for-lists) org-metadown-hook '(org-babel-pop-to-session-maybe) org-export-blocks '((src org-babel-exp-src-blocks nil) (comment org-export-blocks-format-comment t) (ditaa org-export-blocks-format-ditaa nil) (dot org-export-blocks-format-dot nil)) ) ___ Emacs-orgmode mailing list Please use `Reply
[Orgmode] headline numbering in html export
Hi, I thought I'd share some stuff I'm quite happy with so that others can enjoy it if it is good, and so that I can stop using or improve it if it is not so good! :) I am writing a set of exercises for a course and publishing a chapter once a week in both pdf and html. I like having the exercises for week 2 start the headline numbering with 2 (and so on), so for the latex export I set the section counter to the appropriate value, in this example (week 2): #+LATEX_HEADER: \setcounter{section}{1} For the html export I could not find a similar easy setting, but then I found that css2 has introduced counters: http://www.w3.org/TR/CSS2/generate.html#counters So by adding the css stylesheet below, I can start my numbering for html in a similar fashion as for pdf export: #+STYLE: h1{counter-reset:section 1;} Thanks! Martin The stylesheet: #+begin_src css :tangle exercises.css /* Do not display numbering entered by org-mode, but use css2 counters instead. */ .section-number-2, .section-number-3, .section-number-4, .section-number-5 { display: none; } h2 { counter-reset:subsection; } h2:before { counter-increment:section; content:counter(section); } h2.footnotes:before { content:""; } h3 { counter-reset:subsubsection; } h3:before { counter-increment:subsection; content:counter(section) "." counter(subsection) " "; } h4:before { counter-increment:subsubsection; content:counter(section) "." counter(subsection) "." counter(subsubsection) " "; } #+end_src ___ 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
[Orgmode] [babel] tangle and Makefile
Hi, I have two questions regarding org-babel-tangle and Makefile. Running org-babel-tangle on the following file --start * test #+begin_src makefile :tangle Makefile test: echo "hello" #+end_src --end writes a file 'Makefile.' (with a period). Is it possible to have it write to a file named 'Makefile' (without a period)? When I use this makefile $make -f Makefile. test I get Makefile.:4: *** missing separator (did you mean TAB instead of 8 spaces?). Stop. even though I used TAB and not space when editing the Makefile code. How can I avoid TABs being converted to space? Thanks! Martin Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org-mode mailing list. Emacs : GNU Emacs 23.1.50.1 (i486-pc-linux-gnu, GTK+ Version 2.18.0) of 2009-09-27 on palmer, modified by Debian Package: Org-mode version 6.34trans (release_6.34c.16.ga2cf.dirty) current state: == (setq org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-metaup-hook '(org-babel-load-in-session-maybe) org-after-todo-state-change-hook '(org-clock-out-if-current) org-babel-interpreters '("makefile" "tex" "n3" "xml" "java" "python" "dot" "sh" "emacs-lisp") org-export-latex-format-toc-function 'org-export-latex-format-toc-default org-export-preprocess-hook '(org-export-blocks-preprocess) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-hide-block-toggle-maybe) org-src-mode-hook '(org-src-mode-configure-edit-buffer) org-confirm-shell-link-function 'yes-or-no-p org-export-first-hook '(org-beamer-initialize-open-trackers) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-export-latex-classes '(("article" "\\documentclass[11pt]{article}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}")) ("book" "\\documentclass[11pt]{book}" ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ) org-export-preprocess-before-normalizing-links-hook '(org-remove-file-link-modifiers) org-use-speed-commands t org-mode-hook '((lambda nil (org-add-hook (quote change-major-mode-hook) (quote org-babel-show-result-all) (quote append) (quote local)) ) org-babel-result-hide-spec org-babel-hide-all-hashes #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5] ) org-ctrl-c-ctrl-c-hook '(org-babel-lob-execute-maybe org-babel-hash-at-point org-babel-execute-src-block-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-export-interblocks '((lob org-babel-exp-lob-one-liners) (src org-babel-exp-inline-src-blocks)) org-occur-hook '(org-first-headline-recenter) org-from-is-user-regexp "\\" org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code) org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc org-beamer-auto-fragile-frames org-beamer-place-default-actions-for-lists) org-metadown-hook '(org-babel-pop-to-session-maybe) org-export-blocks '((src org-babel-exp-src-blocks nil) (comment org-export-blocks-format-comment t) (ditaa org-export-blocks-format-ditaa nil) (dot org-export-blocks-format-dot nil)) ) ___ 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
Re: [Orgmode] Re: changing \href to \myhref in LaTex export
Sébastien Vauban wrote: Hi Martin, "Martin G. Skjæveland" wrote: Sébastien Vauban wrote: "Martin G. Skjæveland" wrote: is it possible to change how hyperlinks are exported to LaTex without going into to org-latex.el, but setting by a variable or similar in my .emacs file? I would like to export hyperlinks in Latex as \myhref (or something else) instead of \href, so that I can redefine \myhref using \href, like this \usepackage{ifthen} \newcommand{\myhref}[2]{ \ifthenelse{\equal{#1}{#2}} {\href{#1}{#2}} {\href{#1}{#2}\footnote{\url{#1}}} } and thus include the URLs of the links as footnotes. Not answering clearly your question, but an alternative (that works) is to redefine \href either in your private class (if you use one) or in your TeX file. In the latter case, put the `renewcommand' in your Org source, so that it gets exported every time. Example (with a `newcommand' here): --8<---cut here---start->8--- #+LaTeX_HEADER: \newcommand{\figtext}[2]{\begin{tikzpicture} \draw (-#1/2,-#1/2) rectangle (#1/2,#1/2); \node[text width=#1] at (0,0) {\color{blue}\scriptsize{#2}}; \end{tikzpicture}} --8<---cut here---end--->8--- I think, for this case, this offers more flexibility and allows you to get what you want. yes, this looks like the flexibility I'm after, but my problem with your solution is that by using \renewcommand I would be defining a recursive command, which does not work. (I should have mentioned that in my first email, sorry.) This is the reason for renaming the \href command in the export, so I can define my own href command using the standard href. Nope! You can do that by simply renaming the old version first. In your case: --8<---cut here---start->8--- \let\o...@href=\href \renewcommand\href[2]{% \ifthenelse{\equal{#1}{#2}} {\o...@href{#1}{#2}} {\o...@href{#1}{#2}\footnote{\url{#1}}} }% href \href{http://www.mygooglest.com/}{Test} \href{http://www.mygooglest.com/}{http://www.mygooglest.com/} --8<---cut here---end--->8--- Thanks, what works perfect! Initially, it did not work, but moving the above code directly below \usepackage{hyperref} solved my problems. 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
[Orgmode] [babel] error running source code? [6.34trans (release_6.34c.6.gcae0.dirty)]
Hi, I pulled a fresh copy of org-mode this morning and got an error I did not have before the pull. When I export the following to pdf --begin * test #+begin_src java -n :exports none :tangle test.java private void abcdefghi throws IOException #+end_src #+begin_src sh :results output :exports results javac -cp "lib/jena/lib/*:lib/pellet/lib/*" test.java #+end_src --end the error Invalid search bound (wrong side of point) occurs. The backtrace is attached. Note that I do not get the error when reducing the string "abcdefghi" to "abcdefgh". If I export the document without loading babel, I get no errors. Let me know if I should do some git bisecting. Thanks! Martin Emacs : GNU Emacs 23.1.50.1 (i486-pc-linux-gnu, GTK+ Version 2.18.0) of 2009-09-27 on palmer, modified by Debian Package: Org-mode version 6.34trans (release_6.34c.6.gcae0.dirty) current state: == (setq org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-metaup-hook '(org-babel-load-in-session-maybe) org-after-todo-state-change-hook '(org-clock-out-if-current) org-babel-interpreters '("tex" "n3" "xml" "java" "python" "dot" "sh" "emacs-lisp") org-export-latex-format-toc-function 'org-export-latex-format-toc-default org-export-preprocess-hook '((lambda nil (org-set-local (quote org-complex-heading-regexp) "^\\(\\*+\\)[ ]+\\(?:\\(TODO\\|DONE\\)\\>\\)?\\(?:[ ]*\\(\\[#.\\]\\)\\)?[ ]*\\(.*?\\)\\(?:[ ]+\\(:[[:alnum:]_@:]+:\\)\\)?[ ]*$") ) org-export-blocks-preprocess) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-hide-block-toggle-maybe) org-src-mode-hook '(org-src-mode-configure-edit-buffer) org-confirm-shell-link-function 'yes-or-no-p org-export-first-hook '(org-beamer-initialize-open-trackers) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-export-preprocess-before-normalizing-links-hook '(org-remove-file-link-modifiers) org-export-latex-hyperref-format "\\myhref{%s}{%s}" org-use-speed-commands t org-mode-hook '((lambda nil (org-add-hook (quote change-major-mode-hook) (quote org-show-block-all) (quote append) (quote local)) ) (lambda nil (org-add-hook (quote change-major-mode-hook) (quote org-babel-show-result-all) (quote append) (quote local)) ) org-babel-result-hide-spec org-babel-hide-all-hashes #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5] ) org-ctrl-c-ctrl-c-hook '(org-babel-lob-execute-maybe org-babel-hash-at-point org-babel-execute-src-block-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-export-interblocks '((lob org-babel-exp-lob-one-liners) (src org-babel-exp-inline-src-blocks)) org-occur-hook '(org-first-headline-recenter) org-from-is-user-regexp "\\" org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code) org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc org-beamer-auto-fragile-frames org-beamer-place-default-actions-for-lists) org-metadown-hook '(org-babel-pop-to-session-maybe) org-export-blocks '((src org-babel-exp-src-blocks nil) (comment org-export-blocks-format-comment t) (ditaa org-export-blocks-format-ditaa nil) (dot org-export-blocks-format-dot nil)) ) Debugger entered--Lisp error: (error "Invalid search bound (wrong side of point)") re-search-backward("^[ ]*#\\+begin_src[ ]+\\(tex\\|n3\\|xml\\|java\\|python\\|dot\\|sh\\|emacs-lisp\\)[ ]*\\([^\":\n]*\"[^\"\n*]*\"[^\":\n]*\\|[^\":\n]*\\)\\([^\n]*\\)\n\\([^ ]+?\\)#\\+end_src" 123 t) (and (re-search-backward org-babel-src-block-regexp progress-marker t) (setq progress-marker (match-end 0)) (org-babel-exp-do-export (org-babel-get-src-block-info) (quote block))) (or (and (re-search-backward org-babel-src-block-regexp progress-marker t) (setq progress-marker ...) (org-babel-exp-do-export ... ...)) (save-excursion (forward-line 0) (and ... ... ...)) (and (re-search-backward org-block-regexp progress-marker t) (setq progress-marker ...) (match-string 0)) (error "Unmatched block [bug in `org-babel-exp-src-blocks'].")) org-babel-exp-src-blocks(#("javac
Re: [Orgmode] Re: changing \href to \myhref in LaTex export
Carsten Dominik wrote: Hi Martin, OK, please pull and then use the variable `org-export-latex-hyperref-format'. Hi Carsten, setting (setq org-export-latex-hyperref-format "\\myhref{%s}{%s}") works like a charm. 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
Re: [Orgmode] Re: changing \href to \myhref in LaTex export
Sébastien Vauban wrote: Hi Martin, "Martin G. Skjæveland" wrote: is it possible to change how hyperlinks are exported to LaTex without going into to org-latex.el, but setting by a variable or similar in my .emacs file? I would like to export hyperlinks in Latex as \myhref (or something else) instead of \href, so that I can redefine \myhref using \href, like this \usepackage{ifthen} \newcommand{\myhref}[2]{ \ifthenelse{\equal{#1}{#2}} {\href{#1}{#2}} {\href{#1}{#2}\footnote{\url{#1}}} } and thus include the URLs of the links as footnotes. Not answering clearly your question, but an alternative (that works) is to redefine \href either in your private class (if you use one) or in your TeX file. In the latter case, put the `renewcommand' in your Org source, so that it gets exported every time. Example (with a `newcommand' here): --8<---cut here---start->8--- #+LaTeX_HEADER: \newcommand{\figtext}[2]{\begin{tikzpicture} \draw (-#1/2,-#1/2) rectangle (#1/2,#1/2); \node[text width=#1] at (0,0) {\color{blue}\scriptsize{#2}}; \end{tikzpicture}} --8<---cut here---end--->8--- I think, for this case, this offers more flexibility and allows you to get what you want. Hi Seb, yes, this looks like the flexibility I'm after, but my problem with your solution is that by using \renewcommand I would be defining a recursive command, which does not work. (I should have mentioned that in my first email, sorry.) This is the reason for renaming the \href command in the export, so I can define my own href command using the standard href. The reason I want to do this in the first place is to make URLs available when the latex pdf is printed. 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
[Orgmode] changing \href to \myhref in LaTex export
Hi, is it possible to change how hyperlinks are exported to LaTex without going into to org-latex.el, but setting by a variable or similar in my .emacs file? I would like to export hyperlinks in Latex as \myhref (or something else) instead of \href, so that I can redefine \myhref using \href, like this \usepackage{ifthen} \newcommand{\myhref}[2]{ \ifthenelse{\equal{#1}{#2}} {\href{#1}{#2}} {\href{#1}{#2}\footnote{\url{#1}}} } and thus include the URLs of the links as footnotes. (I thought I could set this with a parameter of the hyperref package in LaTex, but I have not found a way.) 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
Re: [Orgmode] bug in source code referencing?
Sure! This is the first time I have used (and heard of) git bisect, so I hope this is correct. Here is the "answer" from the bisect operation, below is the 'git bisect log' output. Martin f444c8cd679dc488b1016074f1eb25c7c1b6f1af is first bad commit commit f444c8cd679dc488b1016074f1eb25c7c1b6f1af Author: Carsten Dominik Date: Wed Dec 16 19:36:56 2009 +0100 Export: Do not check for protectedness at the end of a line :04 04 173536d8b0725a0a50373c20c15a27bf0e5e2649 1213cc80e934d100803a7dae0afdb7dc7026b2ee M lisp $ git bisect log git bisect start # bad: [bb949518d29e26f5dea88d7284d7fa61b2a31f96] tweak to source-name LaTeX export git bisect bad bb949518d29e26f5dea88d7284d7fa61b2a31f96 # good: [2b528343557b4ff08af8efb283f01b5d231a7fc4] Release 6.33 git bisect good 2b528343557b4ff08af8efb283f01b5d231a7fc4 # good: [fe9ac47afc736091fd8538faf929c9fec05a66d3] Archiving: Fix bug when archiving all DONE children in odd-level file git bisect good fe9ac47afc736091fd8538faf929c9fec05a66d3 # bad: [1e32a42a780f8e0679f3bdfafd9b69f5b63601f3] Merge commit 'bernt/clock-in' git bisect bad 1e32a42a780f8e0679f3bdfafd9b69f5b63601f3 # bad: [567c753f8bae77d3c572da3851aa76b4c13c6fa4] LaTeX export: Only define a caption for longtable if there is one git bisect bad 567c753f8bae77d3c572da3851aa76b4c13c6fa4 # good: [cfb2550bbadde8669f586dcfda2fd928cbbd4f5a] New hooks for external support for allowed property values git bisect good cfb2550bbadde8669f586dcfda2fd928cbbd4f5a # good: [4d4d3ea74548f761fc58029e0a21769c317537e4] Incorporate fix from downstream Emacs git bisect good 4d4d3ea74548f761fc58029e0a21769c317537e4 # good: [093fe010171d27534f3056cf0dc8dec6ec8dd847] Cleanup empty lines in itemize environments git bisect good 093fe010171d27534f3056cf0dc8dec6ec8dd847 # bad: [f444c8cd679dc488b1016074f1eb25c7c1b6f1af] Export: Do not check for protectedness at the end of a line git bisect bad f444c8cd679dc488b1016074f1eb25c7c1b6f1af # good: [7062a884107fd8ab261fc098096a7d5918b40229] Match TODO keywords case-sensitively git bisect good 7062a884107fd8ab261fc098096a7d5918b40229 $ Carsten Dominik wrote: Hi Martin, could I ask you to use "git bisect" it identify the commit when this went wrong? That would be most helpful! Thanks - Carsten On Jan 14, 2010, at 12:01 PM, Martin G. Skjæveland wrote: Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org-mode mailing list. Hi, I pulled a fresh copy of org-mode this morning and noticed that references to source code line numbers no longer work as they used to. Instead of displaying the number of the line with the label, the label is displayed. Exporting the following example, retrieved from the online documentation (http://orgmode.org/manual/Literal-examples.html), -start #+BEGIN_SRC emacs-lisp -n -r (save-excursion (ref:sc) (goto-char (point-min)) (ref:jump) #+END_SRC In line [[(sc)]] we remember the current position. [[(jump)][Line (jump)]] jumps to point-min. -end gives me in latex export -start \begin{verbatim} 1: (save-excursion 2: (goto-char (point-min)) \end{verbatim} In line \hyperref[(sc)]{(sc)} we remember the current position. \hyperref[(jump)]{Line (jump)} jumps to point-min. -end Is this a bug or am I doing something wrong? Thanks! Martin Emacs : GNU Emacs 23.1.50.1 (i486-pc-linux-gnu, GTK+ Version 2.18.0) of 2009-09-27 on palmer, modified by Debian Package: Org-mode version 6.34a (release_6.34a.1.gbb94) current state: == (setq org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-after-todo-state-change-hook '(org-clock-out-if-current) org-export-latex-format-toc-function 'org-export-latex-format-toc-default org-export-preprocess-hook '(org-export-blocks-preprocess) org-tab-first-hook '(org-hide-block-toggle-maybe) org-src-mode-hook '(org-src-mode-configure-edit-buffer) org-confirm-shell-link-function 'yes-or-no-p org-export-first-hook '(org-beamer-initialize-open-trackers) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-export-preprocess-before-normalizing-links-hook '(org-remove-file-link-modifiers) org-use-speed-commands t org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all appe
[Orgmode] bug in source code referencing?
Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org-mode mailing list. Hi, I pulled a fresh copy of org-mode this morning and noticed that references to source code line numbers no longer work as they used to. Instead of displaying the number of the line with the label, the label is displayed. Exporting the following example, retrieved from the online documentation (http://orgmode.org/manual/Literal-examples.html), -start #+BEGIN_SRC emacs-lisp -n -r (save-excursion (ref:sc) (goto-char (point-min)) (ref:jump) #+END_SRC In line [[(sc)]] we remember the current position. [[(jump)][Line (jump)]] jumps to point-min. -end gives me in latex export -start \begin{verbatim} 1: (save-excursion 2: (goto-char (point-min)) \end{verbatim} In line \hyperref[(sc)]{(sc)} we remember the current position. \hyperref[(jump)]{Line (jump)} jumps to point-min. -end Is this a bug or am I doing something wrong? Thanks! Martin Emacs : GNU Emacs 23.1.50.1 (i486-pc-linux-gnu, GTK+ Version 2.18.0) of 2009-09-27 on palmer, modified by Debian Package: Org-mode version 6.34a (release_6.34a.1.gbb94) current state: == (setq org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-after-todo-state-change-hook '(org-clock-out-if-current) org-export-latex-format-toc-function 'org-export-latex-format-toc-default org-export-preprocess-hook '(org-export-blocks-preprocess) org-tab-first-hook '(org-hide-block-toggle-maybe) org-src-mode-hook '(org-src-mode-configure-edit-buffer) org-confirm-shell-link-function 'yes-or-no-p org-export-first-hook '(org-beamer-initialize-open-trackers) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-export-preprocess-before-normalizing-links-hook '(org-remove-file-link-modifiers) org-use-speed-commands t org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5] ) org-confirm-elisp-link-function 'yes-or-no-p org-occur-hook '(org-first-headline-recenter) org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code) org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc org-beamer-auto-fragile-frames org-beamer-place-default-actions-for-lists) ) ___ 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
[Orgmode] [babel] problems with :exports results [6.33trans (release_6.33c.7.g69b46)]
Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org-mode mailing list. Hi, I pulled a fresh version of org-mode today and have some problems including source block results in my export. When I export the file -start * testing 123 ** 1 #+begin_src sh echo "test 1" #+end_src ** 2 #+begin_src sh :results output echo "test 2" #+end_src ** 3 #+begin_src sh :exports results echo "test 3" #+end_src ** 4 #+begin_src sh :results output :exports results echo "test 4" #+end_src ** 5 #+begin_src sh :results output :exports both echo "test 5" #+end_src -end it gives me -start 1 testing 123 ~~ 1.1 1 == echo "test 1" 1.2 2 == echo "test 2" test 2 1.3 3 == 1.4 4 == 1.5 5 == echo "test 5" -end The result is only exported in test no. 2. I have written my source blocks in the same format as test no. 4, which before the weekend gave me only the results of the source block execution in the export. A perhaps related issue is that when I try to export my working document I get the error Symbol's function definition is void: org-babel-execute:xml : Exporting to PDF... Exporting to LaTeX... (New file) org-babel-exp processing... [21 times] funcall: Symbol's function definition is void: org-babel-execute:xml I have added xml with (org-babel-add-interpreter "xml") (add-to-list 'org-babel-tangle-langs '("xml" "xml" nil t)) This error did not appear before the upgrade I did today. I hope this report is clear. Thanks! Martin Emacs : GNU Emacs 23.1.50.1 (i486-pc-linux-gnu, GTK+ Version 2.18.0) of 2009-09-27 on palmer, modified by Debian Package: Org-mode version 6.33trans (release_6.33c.7.g69b46) current state: == (setq org-metaup-hook '(org-babel-load-in-session-maybe) org-after-todo-state-change-hook '(org-clock-out-if-current) org-babel-interpreters '("n3" "xml" "java" "python" "dot" "sh" "emacs-lisp") org-export-preprocess-hook '(org-export-blocks-preprocess) org-tab-first-hook '(org-hide-block-toggle-maybe) org-src-mode-hook '(org-src-mode-configure-edit-buffer) org-confirm-shell-link-function 'yes-or-no-p org-agenda-before-write-hook '(org-agenda-add-entry-text) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5] ) org-ctrl-c-ctrl-c-hook '(org-babel-lob-execute-maybe org-babel-execute-src-block-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-export-interblocks '((lob org-babel-exp-lob-one-liners) (src org-babel-exp-inline-src-blocks)) org-occur-hook '(org-first-headline-recenter) org-from-is-user-regexp "\\" org-metadown-hook '(org-babel-pop-to-session-maybe) org-export-blocks '((src org-babel-exp-src-blocks nil) (comment org-export-blocks-format-comment t) (ditaa org-export-blocks-format-ditaa nil) (dot org-export-blocks-format-dot nil)) ) ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] [babel] problem removing label from src
Hi all, I use the -r -l option for source blocks to change the format of labels. This works in org-mode without org-babel, but this does not fully work with org-babel (and I really like org-babel, so that's a shame :) ) The following --start- #+begin_src xml -n -r -l "" #+end_src Line no. [[(imp)]] is important! --end- gives me 1: 2: 3: Line no. 2 is important! The label and reference works, but the label is not fully removed. is left behind. Thanks! Martin ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] problem including graphics
Hi all, I have a problem including dot generated graphics in my export. The code is #+begin_src dot :file ./test.pdf :cmdline -Tpdf digraph test { Hello -> World; }; #+end_src When I export to latex it turns into \hyperref[./test.pdf]{file:./test.pdf} However, then I tried this in a separate document (to make this small example) it works fine and exports to \includegraphics[width=10em]{./test.pdf} So now my question is why is the same code in different documents interpreted different? Both documents have the same #+OPTIONS settings. My working document is a large document, so perhaps there are other bits of my document that interfere, but they shouldn't, right? Thanks! Martin ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] What is output for org-babel?
Martin G. Skjæveland wrote: andrea Crotti wrote: I'm with org-mode 6.31a, I was trying to get output in the exported files but I never see the output. Writing "begin_src" in lowercase or uppercase makes a difference. I am not sure if this is a feature or a bug. Oh, forgot to mention: I can't make any of the snippets you sent work. Everything in the source blocks is exported as verbatim text, regardless of upper/lowercase, or :results output or not. Martin ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] What is output for org-babel?
andrea Crotti wrote: I'm with org-mode 6.31a, I was trying to get output in the exported files but I never see the output. Hi, not sure if this is related -- or helpful, but here goes! When I export the following file: start--- * lowercase #+begin_src python :exports results 2+2 #+end_src * uppercase #+BEGIN_SRC python :exports results 2+2 #+end_src end--- the results are (copied from pdf): start--- 1 lowercase 4 2 uppercase 2+2 end--- Writing "begin_src" in lowercase or uppercase makes a difference. I am not sure if this is a feature or a bug. Martin ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] verbatim bug?
Hi, Then I write some text some text ~<>~. because I want "<>" written as verbatim in my latex export, I get, in latex, \texttt{\textbackslash{}label\{some\_src\_block\_name\}some\_src\_block\_name}. which gives me the text \label{some_src_block_name}some_src_block_name in verbatim. I have also tried "=<>=" with the same results. What kind-of-works for me is some text some text : <> . which does not work without the dot (or a different character) on the end. I guessing this is a bug, or should I do some escaping of characters? Thanks! Martin ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] texttt inside verbatim
Hi all, when I import the file --8<---cut here---start->8--- - | grandmother | = | sim:Jackeline | | sim:Mona | - --8<---cut here---end->8--- using the command #+INCLUDE "grandmothers.txt" example and export to latex it turns into \begin{verbatim} - | grandmother | \texttt{===} | sim:Jackeline | | sim:Mona | - \end{verbatim} I would like to remove \texttt{ }. I have tried different export option settings, but I can't make it work. Is there a way? Thanks! Martin ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] [babel] trimming tangled code
Hi all, I'm using org-babel to tangle XML documents. That works fine (thanks to help from Eric S. on this list yesterday), except it adds(?) space in the beginning (and end) of the output document and front of the xml declaration thus making an invalid XML document. Is it possible to trim this space? My tangled file looks like: --8<---cut here---start->8--- --8<---cut here---end->8--- I would prefer: --8<---cut here---start->8--- --8<---cut here---end->8--- Thanks! Martin ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] org-babel-tangle xml text
Hi all, I am quite new to the wonderful world of org-mode and org-babel. Right now I am using org-mode to make exercises for a semantic web programming course. org-mode and its friends give me a efficient writing tool, a presentation tool, export for web, export for print and a literate programming tool. That's nice! But I have a question. I would like to include many code snippets written in RDF (XML/RDF, N3), which are languages not supported by org-babel [1], in my document, and I would like to use the "Edit the source code example at point in its native mode"-feature of org-mode and the tangle-feature of org-babel. Now I'm specifying the language as css (see below) since it is supported by org-babel and does not add any comments to output. This works for "tangling", but not for native editing. Is there a way I can add xml and n3 to the list of supported languages? These languages does not need interpretation, so I'm thinking it should be quite easy to add. I have fumblingly tried (add-to-list 'org-babel-tangle-langs '("xml")) and (add-to-list 'org-babel-tangle-langs '("css" "xml")) but it as no effect. Below is a sample of what I am currently using. Running org-babel-tangle gives me the correct foaf.rdf file. I would like to swap 'css' with 'xml' so that the code can be edited and understood as xml. #+SRCNAME: foaf-main #+BEGIN_SRC css :tangle foaf.rdf <> #+END_SRC #+SRCNAME: foaf-rel #+BEGIN_SRC css :tangle no #+END_SRC I hope this was clear -- and that someone can help. Thanks! Martin [1] http://orgmode.org/worg/org-contrib/babel/org-babel.php#reference-and-documentation ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode