Re: [O] [babel] create tikz pictures in an floating LaTeX environment
Darlan Cavalcante Moreira writes: > It would be nice if org had a begin_tikz block. This block could either > create a PDF file or include the tikz code directly in the latex file when > exporting to latex (or PDF), and create an SVG file when when exporting to > HTML. Of course this block should accept all the usual image options, such > as caption and width. A simple search for "org LaTeX block" would get you to this Worg tutorial: http://orgmode.org/worg/org-tutorials/org-latex-export.html where you will find an intro to the contributed org-special-blocks.el, which almost does what you want already. I don't think it takes option arguments, but you can always define a new environment in your LaTeX setup that is already set up correctly. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Factory and User Sound Singles for Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
[O] Idea: insert "current sort order" property
What I'm imagining is a command executed on a headline to insert a property into each of its children "fixing" the current order; something like ":sorted:01", ":sorted:02" etc. Ideally there would be a prompt for the property key (or part of it) so that there could be more than one such property for a particular headline, but with the option to simplify the usage and consistency by having just one property key as a default and no prompt. One of my uses of org-mode is to list songs (Lieder) that I am currently working on, and I mark them up with special todo states and tags relating to my workflow - e.g. findscore, translate, memorise etc. I've also been known to add properties such as 1st line text (if different from title), poet, and pagenumber. While I'm dealing with a list of repertoire (there's a lot of bitty admin involved!) I've found it useful to sort alphabetically, by TODO state and by these properties, but I'd like to be able to retain the order in which the songs will be performed. I know I could manually add such a property to each headline myself but I'd really love to be able to quickly "fix" the order of my sorted headings by automating a ":sorted:" property. Another use I can imagine for this is when juggling an outline, one could "fix" an order that reads well, and then play around with it to see how it might flow better, knowing that it would be easy to return to the last preferred sort-order - like a rollback. During the last few weeks I would have made use of this not only when working on songs, but also when designing song programmes and writing my resumé. If a sorted headline got moved to a new parent its sort-order might be a duplicate one of its siblings, but I don't really see that as a problem - the user knows it's "only text" after all. I don't know whether it might be desired to similarly fix the sort-order of 1st level headlines; perhaps the command could act per current file, with a < to narrow down to the current tree. I'm also not sure how to deal with larger numbers - 01-99 seems like a good default but could one have an option for 001-999? I also wonder about adding the property to more than one level at a time, but might that be a bit much in terms of affecting performance? Does anyone else see this as potentially useful? Gez GNU Emacs 23.3.1 and org-version 7.7
[O] Question on ical2org script
Hi, I am maintaining my calendar in gcal and org. I have been switching back and forth between Eric's awk script and a python script posted on this list recently. The later contains some bugs. However, I experience two issues with Eric's script. * Repeated events For repeated events only the first occurrence seems to translated. Here is an example: ┏━━━ ┃ BEGIN:VEVENT ┃ DTSTART;TZID=Europe/London:20111012T15 ┃ DTEND;TZID=Europe/London:20111012T17 ┃ RRULE:FREQ=WEEKLY;COUNT=9;BYDAY=WE ┃ DTSTAMP:20111008T014417Z ┃ UID:dihhjpn9hrnct6fj00epk9b...@google.com ┃ CREATED:20111007T222923Z ┃ DESCRIPTION: ┃ LAST-MODIFIED:20111007T222923Z ┃ LOCATION: ┃ SEQUENCE:0 ┃ STATUS:CONFIRMED ┃ SUMMARY:Micro Class ┃ TRANSP:OPAQUE ┃ END:VEVENT ┗━━━ Note line 4. It reads that the event should be repeated weekly nine times. It does not seem to be repeated in the org-file generated by ical2org. Does other experience this as well? * All day events. For me all day events spans two days and are further given a time. Here is an example: ┏━━━ ┃ BEGIN:VEVENT ┃ DTSTART;VALUE=DATE:20111012 ┃ DTEND;VALUE=DATE:20111013 ┃ UID:5oshl25lnn7da5mmog9bbem...@google.com ┃ CREATED:20111007T214920Z ┃ DESCRIPTION: ┃ LAST-MODIFIED:20111007T214920Z ┃ LOCATION: ┃ SEQUENCE:0 ┃ STATUS:CONFIRMED ┃ SUMMARY:exam\, math ┃ TRANSP:TRANSPARENT ┃ END:VEVENT ┗━━━ Which is translated to * exam, math <2011-10-12 Wed 00:00>--<2011-10-13 Thu 00:00> I don't know why Google writes time as ┏━━━ ┃ DTSTART;VALUE=DATE:20111012 ┃ DTEND;VALUE=DATE:20111013 ┗━━━ but the event is on 20111012 only and it might be more correct to translate it to * exam, math <2011-10-12 Wed> which would (correctly) be interpreted as an all-day event in org-agenda. Does anyone else experience this all-day issue? Thanks, Rasmus -- Sent from my Emacs
Re: [O] org-export-blocks, HTML, problem.
Although you are talking about special blocks, it's worth pointing out that the following exports with incorrect nesting. To make it nest properly you have to add newlines. I did not follow the previous thread, so this might be irrelevant. === #+html: this is a paragraph. and another. #+html: third.
[O] org-export-blocks, HTML, problem.
I am trying to define a custom block for export to HTML with org-export-blocks, but I'm getting confused by the way tags are inserted. I've whittled my org-export-blocks-format-blah function down to the form (defun huh/org-export-blocks-format-blah (body &rest headers) ;; One of the two trivial bodies shown below ) Both of my versions of the test function ignore the block body and write a hard-wired placeholder instead. The placeholder is sandwiched between a preamble and a postamble. In one test function the preamble and post amble are written as HTML, in the other as plain text. Odd things happen when I export *two* consecutive blocks with the HTML version. The implementations of the two test functions and their corresponding results are shown below. == | == body of format function | body of format function == | == (concat | (concat "\n#+HTML: . . . . BEFORE . . . .\n" | "\n. . . . BEFORE . . . .\n" "body of block goes here"| "body of block goes here" "\n#+HTML: . . . . AFTER . . . .") | "\n . . . . AFTER . . . .") | | == == | output output | == == | | My heading My heading| | | | . . . . BEFORE . . . . | . . . . BEFORE . . . . body of block goes here | . . . . AFTER . . . . | body of block goes here | . . . . AFTER . . . . | . . . . BEFORE . . . . | . . . . BEFORE . . . . body of block goes here | body of block goes here . . . . AFTER . . . . | . . . . AFTER . . . . | == | == In the plain version, the all of preamble-body-postamble text is enclosed in ... , once for each exported block. In the HTML version, only one ... pair appears, enclosing everything except the first preamble. (As my real preamble should contain an opening tag which is closed in the postamble, the presence of an unmatched between the two causes trouble.) Can you shed any light on what is going on? Thanks. (I am using org-mode version 7.7)
Re: [O] [babel] create tikz pictures in an floating LaTeX environment
On Fri, 07 Oct 2011 18:26:15 -0300, Darlan Cavalcante Moreira wrote: > It would be nice if org had a begin_tikz block. This block could either > create a PDF file or include the tikz code directly in the latex file when > exporting to latex (or PDF), and create an SVG file when when exporting to > HTML. Of course this block should accept all the usual image options, such > as caption and width. > > This is just a feature request from a tikz lover. This would actually be useful for arbitrary latex code. I know in particular that I would love a similiar feature for using Paul Taylor's diagram.sty[fn:1], generetating inline latex, when compiling to PDF, and genertating an SVG when exporting to HTML. It would also be very nice not to have to name every block, just like the inline math doesn't need to be given a name, when using one of the image backends. Tom Footnotes: [fn:1] http://www.paultaylor.eu/diagrams/
Re: [O] [babel] create tikz pictures in an floating LaTeX environment
I have a (very) small personal wiki in org mode where I add stuff that I read/learn that deserve this work. I usually don't need to export it, but recently I was trying to export it to PDF and HTML and I had the same doubt with a block o tikz code. It would be nice if org had a begin_tikz block. This block could either create a PDF file or include the tikz code directly in the latex file when exporting to latex (or PDF), and create an SVG file when when exporting to HTML. Of course this block should accept all the usual image options, such as caption and width. This is just a feature request from a tikz lover. -- Darlan At Fri, 07 Oct 2011 09:14:20 -0600, Eric Schulte wrote: > > Nick Dokos writes: > > > Torsten Wagner wrote: > > > >> Hi all, > >> Hi Eric (hehehe because most likely you read it ;) ) > >> > >> I try for the first time to write an entire article in org-mode. > >> I do so, because with the tags :export: :noexport: I can easily keep > >> my personal notes and todos "hidden" and the final export will be just > >> what I want to publish. > >> Furthermore, I'm interested to do my data evaluation in python blocks > >> within the org-file itself, keeping all nicely together. > >> > >> At the moment I try to add a tikz picture to the manuscript. I > >> followed the example at > >> http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html > >> However, I have some problems. I can generate the picture by using the > >> following code. > >> > >> #+srcname: mypicture > >> #+begin_src latex :file fig/mypicture.pdf :packages '(("" "tikz")) > >> :border 1em :fit > >> \begin{tikzpicture}[line width=1pt,text centered, inner sep = 2] > >> \draw[fill=red!50] (0,0) rectangle ++(5,1); > >> \draw[fill=yellow!50] (1,1) rectangle ++(1,0.25); > >> \draw[fill=yellow!50] (3,1) rectangle ++(1,0.25); > >> \draw[fill=green!50] (0.75,1) rectangle ++(1.5,-0.4); > >> \draw[fill=green!50] (2.75,1) rectangle ++(1.5,-0.4); > >> \end{scope} > >> \end{tikzpicture} > >> #+end_src > >> > >> Now, I want to include this in a floating figure environment > >> This troubles me a bit. > >> I tried to make a second latex src block which includes the > >> environment and an \includegraphic pointing to the generated pdf file. > >> However, I always find a link of the filename in addtion. I guess this > >> is the result of the first (above) source code block. The pdf contains > >> a line similar like > >> [[file:fig/mypicture.pdf ]] > >> > > > > > > ``:results output silent'' should suppress that I think. > > > > Nick's solution should work well. Also, (if you're exporting to LaTeX) > couldn't you just combine the tikz picture and the wrapping figure > environment into a single begin_latex block? > > Best -- Eric > > > > > Nick > > > >> I switched over to use the org-mode way of including a figure and > >> replaced the latex second src code block by > >> > >> #+CAPTION:my great picture > >> #+LABEL: fig:my_picture > >> #+ATTR_LaTeX: > >> [[file:fig/mypicture.pdf]] > >> > >> This worked out too and was identically to the fist approach, however, > >> there was still the result line in the output. > >> I tried to add exports: none and volia the line was gone. However, > >> the source code block was not exported at all and hence the picture > >> not updated at all (it simply used the old generated pdf) > >> > >> I tried to be ueber-smart and replaced the static link > >> [[file:fig/mypicture.pdf]] > >> by > >> #+call: mypicture > >> in the hope it would be executed and result in > >> [[file:fig/mypicture.pdf]] > >> finally getting the same like with the static link. However, this did > >> not work out at all. No figure. > >> > >> Could someone help me to sort this out. Ideally, I would like to do a > >> rather logical combination and end up with the following: > >> > >> #+CAPTION:my great picture > >> #+LABEL: fig:my_picture > >> #+ATTR_LaTeX: > >> #+srcname: mypicture > >> #+begin_src latex :file fig/mypicture.pdf :packages '(("" "tikz")) > >> :border 1em :fit > >> \begin{tikzpicture}[line width=1pt,text centered, inner sep = 2] > >> \draw[fill=red!50] (0,0) rectangle ++(5,1); > >> \draw[fill=yellow!50] (1,1) rectangle ++(1,0.25); > >> \draw[fill=yellow!50] (3,1) rectangle ++(1,0.25); > >> \draw[fill=green!50] (0.75,1) rectangle ++(1.5,-0.4); > >> \draw[fill=green!50] (2.75,1) rectangle ++(1.5,-0.4); > >> \end{scope} > >> \end{tikzpicture} > >> #+end_src > >> > >> avoiding to call/type the filename/link over and over again. > >> > >> Thanks for helping > >> > >> Torsten > >> > > > > -- > Eric Schulte > http://cs.unm.edu/~eschulte/ >
[O] Org-mode bugs reported to Emacs
Hello Org-mode, There are some Org-mode bugs at http://debbugs.gnu.org/org-mode that were reported to Emacs. Maybe someone could take a look at them. Thanks.
Re: [O] Double Spacing Latex Output
No problem. For future reference, the `#+LATEX_CLASS_OPTIONS` really only apply options to the document class, for example to get something exported like \documentclass[10pt,twocolumn]{article} you would want to use the `#+LATEX_CLASS_OPTIONS` to add the "10pt" and "twocolumn" class options. Use a `#+LATEX_HEADER` for including packages or defining macros/variables in the preamble of your document. You can also change which packages are included by default for a given class by changing your `org-export-latex-classes` definition. See http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-6 and the following section. Chris On Oct 7, 2011, at 12:17 PM, aditya siram wrote: > Yes that worked! Thanks for the quick response! > -deech > > On Fri, Oct 7, 2011 at 2:12 PM, Chris Malone wrote: > Hi deech, > > Does including the package and using double space work? > > #+LATEX_HEADER: \usepackage{setspace} > #+LATEX_HEADER: \doublespacing > > If not, what does the exported `.tex` file look like? > > Chris > > On Oct 7, 2011, at 12:07 PM, aditya siram wrote: > > > Hi all, > > This is probably a really simple question but I'd like to double space my > > Latex output. I added #+LaTeX_CLASS_OPTIONS:[setspace, doublespace] to the > > header and I do have the setspace package, but the output is still > > single-spaced. Any ideas? > > > > Thanks! > > -deech > >
Re: [O] Double Spacing Latex Output
Yes that worked! Thanks for the quick response! -deech On Fri, Oct 7, 2011 at 2:12 PM, Chris Malone wrote: > Hi deech, > > Does including the package and using double space work? > > #+LATEX_HEADER: \usepackage{setspace} > #+LATEX_HEADER: \doublespacing > > If not, what does the exported `.tex` file look like? > > Chris > > On Oct 7, 2011, at 12:07 PM, aditya siram wrote: > > > Hi all, > > This is probably a really simple question but I'd like to double space my > Latex output. I added #+LaTeX_CLASS_OPTIONS:[setspace, doublespace] to the > header and I do have the setspace package, but the output is still > single-spaced. Any ideas? > > > > Thanks! > > -deech > >
Re: [O] Double Spacing Latex Output
Hi deech, Does including the package and using double space work? #+LATEX_HEADER: \usepackage{setspace} #+LATEX_HEADER: \doublespacing If not, what does the exported `.tex` file look like? Chris On Oct 7, 2011, at 12:07 PM, aditya siram wrote: > Hi all, > This is probably a really simple question but I'd like to double space my > Latex output. I added #+LaTeX_CLASS_OPTIONS:[setspace, doublespace] to the > header and I do have the setspace package, but the output is still > single-spaced. Any ideas? > > Thanks! > -deech
[O] Double Spacing Latex Output
Hi all, This is probably a really simple question but I'd like to double space my Latex output. I added #+LaTeX_CLASS_OPTIONS:[setspace, doublespace] to the header and I do have the setspace package, but the output is still single-spaced. Any ideas? Thanks! -deech
Re: [O] Bug: Error while exporting with LaTeX code block [7.7]
I updated to the latest development version of org-mode, and everything is fine now. Thanks. -- Truong On Fri, Oct 7, 2011 at 2:24 PM, Eric Schulte wrote: > Hi Truong, > > I just exported your example below to LaTeX w/o any problem. Could you > try updating to the latest version of Org-mode and let me know if the > problem persists? > > Thanks -- Eric > > Truong Nghiem writes: > > > 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. > > > > > > I created the following simple org file, with a code block in it: > > BEGIN > > This is a test. > > > > #+BEGIN_SRC latex :exports none > > \newcommand{\test}{Test} > > #+END_SRC > > END > > > > Then exported it to LaTeX and had an error (backtrace attached). The > > error always happened regardless of the value of :exports. > > > > Emacs : GNU Emacs 23.3.50.1 (i386-apple-darwin9.8.0, NS > > apple-appkit-949.54) > > of 2011-07-29 on braeburn.aquamacs.org - Aquamacs Distribution 2.3a > > Package: Org-mode version 7.7 > > > > current state: > > == > > (setq > > org-export-latex-after-initial-vars-hook > '(org-beamer-after-initial-vars) > > org-speed-command-hook '(org-speed-command-default-hook > > org-babel-speed-command-hook) > > org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent) > > org-babel-load-languages '((R) (ditaa . t) (dot . t) (emacs-lisp . t) > > (gnuplot . t) (haskell) (latex . t) (matlab . t) > > (ocaml) (python . t) (ruby) (screen) (sh . t) (sql) > > (sqlite)) > > org-completion-use-ido t > > org-metaup-hook '(org-babel-load-in-session-maybe) > > org-babel-tangle-lang-exts '(("python" . "py") ("latex" . "tex") > > ("emacs-lisp" . "el")) > > org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup) > > org-export-latex-format-toc-function > 'org-export-latex-format-toc-default > > org-support-shift-select t > > org-export-preprocess-hook '((lambda nil > >(org-set-local (quote org-complex-heading-regexp) > > "^\\(\\*+\\)[ > > > > ]+\\(?:\\(TODO\\|NEXT\\|STARTED\\|DONE\\|WAITING\\|CANCELLED\\|DEFERRED\\|PROJECT\\|FINISHED\\)\\>\\)?\\(?:[ > > ]*\\(\\[#.\\]\\)\\)?[ ]*\\(.*?\\)\\(?:[ > > ]+\\(:[[:alnum:]_@#%:]+:\\)\\)?[ ]*$") > >) > > ) > > org-tab-first-hook '(org-hide-block-toggle-maybe > > org-src-native-tab-command-maybe > > org-babel-hide-result-toggle-maybe) > > org-src-mode-hook '(org-src-babel-configure-edit-buffer > > 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-babel-pre-tangle-hook '(save-buffer) > > 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-mode-hook '((lambda nil > > (org-add-hook (quote change-major-mode-hook) > >(quote org-babel-show-result-all) (quote append) (quote > local)) > > ) > > (lambda nil > > (org-add-hook (quote change-major-mode-hook) > >(quote org-show-block-all) (quote append) (quote local)) > > ) > > #[nil "\300\301\302\303\304$\207" > >[org-add-hook change-major-mode-hook org-show-block-all append > > local] > >5] > > #[nil "\300\301\302\303\304$\207" > >[org-add-hook change-major-mode-hook org-babel-show-result-all > > append local] > >5] > > org-babel-result-hide-spec org-babel-hide-all-hashes > > (lambda nil (auto-fill-mode 1))) > > org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point > > org-babel-execute-safely-maybe) > > org-confirm-elisp-link-function 'yes-or-no-p > > org-refile-use-outline-path 'file > > org-export-interblocks '((lob org-babel-exp-lob-one-liners) > > (src org-babel-exp-inline-src-blocks)) > > org-enforce-todo-dependencies t > > org-agenda-skip-deadline-if-done t > > org-refile-allow-creating-parent-nodes 'confirm > > org-insert-mode-line-in-empty-file t > > org-occur-hook '(org-first-headline-recenter) > > org-export-preprocess-before-selecting-backend-code-hook > > '(org-beamer-select-beamer-code) > > org-agenda-todo-ignore-deadlines t > > org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc > >org-beamer-auto-fragile-frames > >org-
Re: [O] Bug: Error while exporting with LaTeX code block [7.7]
Hi Truong, I just exported your example below to LaTeX w/o any problem. Could you try updating to the latest version of Org-mode and let me know if the problem persists? Thanks -- Eric Truong Nghiem writes: > 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. > > > I created the following simple org file, with a code block in it: > BEGIN > This is a test. > > #+BEGIN_SRC latex :exports none > \newcommand{\test}{Test} > #+END_SRC > END > > Then exported it to LaTeX and had an error (backtrace attached). The > error always happened regardless of the value of :exports. > > Emacs : GNU Emacs 23.3.50.1 (i386-apple-darwin9.8.0, NS > apple-appkit-949.54) > of 2011-07-29 on braeburn.aquamacs.org - Aquamacs Distribution 2.3a > Package: Org-mode version 7.7 > > current state: > == > (setq > org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) > org-speed-command-hook '(org-speed-command-default-hook > org-babel-speed-command-hook) > org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent) > org-babel-load-languages '((R) (ditaa . t) (dot . t) (emacs-lisp . t) > (gnuplot . t) (haskell) (latex . t) (matlab . t) > (ocaml) (python . t) (ruby) (screen) (sh . t) (sql) > (sqlite)) > org-completion-use-ido t > org-metaup-hook '(org-babel-load-in-session-maybe) > org-babel-tangle-lang-exts '(("python" . "py") ("latex" . "tex") > ("emacs-lisp" . "el")) > org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup) > org-export-latex-format-toc-function 'org-export-latex-format-toc-default > org-support-shift-select t > org-export-preprocess-hook '((lambda nil >(org-set-local (quote org-complex-heading-regexp) > "^\\(\\*+\\)[ > > ]+\\(?:\\(TODO\\|NEXT\\|STARTED\\|DONE\\|WAITING\\|CANCELLED\\|DEFERRED\\|PROJECT\\|FINISHED\\)\\>\\)?\\(?:[ > ]*\\(\\[#.\\]\\)\\)?[ ]*\\(.*?\\)\\(?:[ > ]+\\(:[[:alnum:]_@#%:]+:\\)\\)?[ ]*$") >) > ) > org-tab-first-hook '(org-hide-block-toggle-maybe > org-src-native-tab-command-maybe > org-babel-hide-result-toggle-maybe) > org-src-mode-hook '(org-src-babel-configure-edit-buffer > 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-babel-pre-tangle-hook '(save-buffer) > 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-mode-hook '((lambda nil > (org-add-hook (quote change-major-mode-hook) >(quote org-babel-show-result-all) (quote append) (quote local)) > ) > (lambda nil > (org-add-hook (quote change-major-mode-hook) >(quote org-show-block-all) (quote append) (quote local)) > ) > #[nil "\300\301\302\303\304$\207" >[org-add-hook change-major-mode-hook org-show-block-all append > local] >5] > #[nil "\300\301\302\303\304$\207" >[org-add-hook change-major-mode-hook org-babel-show-result-all > append local] >5] > org-babel-result-hide-spec org-babel-hide-all-hashes > (lambda nil (auto-fill-mode 1))) > org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point > org-babel-execute-safely-maybe) > org-confirm-elisp-link-function 'yes-or-no-p > org-refile-use-outline-path 'file > org-export-interblocks '((lob org-babel-exp-lob-one-liners) > (src org-babel-exp-inline-src-blocks)) > org-enforce-todo-dependencies t > org-agenda-skip-deadline-if-done t > org-refile-allow-creating-parent-nodes 'confirm > org-insert-mode-line-in-empty-file t > org-occur-hook '(org-first-headline-recenter) > org-export-preprocess-before-selecting-backend-code-hook > '(org-beamer-select-beamer-code) > org-agenda-todo-ignore-deadlines t > 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-block nil) > (comment org-export-blocks-format-comment t) > (ditaa org-export-blocks-format-ditaa nil) > (dot org-export-blocks-format-dot nil)) > ) > -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] sbe with :file header arg?
Myles English writes: > Hello, > > I think I have one case of strange behaviour and one feature request, if it > isn't already possible. > > I would like to make one plot per row of a table. This is useful because the > contents of the row may be parameters in an R session, and a link to the > resulting plot can be put in the last cell of each row. > Hi Myles, I've just updated the sbe macro so that it is now possible to pass header arguments through to the called code block. Specifically, if the value immediately following the code block name in an sbe call is a string rather than a variable specification list it will be added to the code blocks header arguments. See the example below. #+source: test-sbe #+begin_src emacs-lisp :var x=0 :var y=0 (+ x y) #+end_src | 1 | 2 | :file eric.png | eric.png | #+TBLFM: @1$4='(sbe test-sbe $3 (x $1) (y $2)) | 1 | 2 | :file eric.png | 3 | #+TBLFM: @1$4='(sbe test-sbe (x $1) (y $2)) Hope this helps -- Eric > > The following source block makes a plot: > > #+source: plotTest > #+headers: :var A="A" :var B="B" :var C="C" > #+begin_src R :file nofile.png :results graphics :session b > plot( 1,1, ylab=A, xlab=B) > text(0.8,0.8,C) > #+end_src > #+results: plotTest > [[file:nofile.png]] > > and the source block may be called using this table: > > #+TBLNAME: testtbl > | "5" | "X" | "Y" | nofile.png | > | 7 | P | "Q" | nofile.png | > #+TBLFM: $4='(sbe plotTest (A $1)(B $2)(C $3)) > > executing that shows up the strange behaviour because the R interpreter > contains: > >> > png(filename="nofile.png") >> A <- "5" >> B <- "X" >> C <- "Y" >> plot( 1,1, ylab=A, xlab=B) >> text(0.8,0.8,C) >> dev.off() > null device > 1 >> > png(filename="nofile.png") >> A <- 7 >> B <- "/home/myles/org/org/nofile.png" <-- STRANGE, NO? >> C <- "Q" >> plot( 1,1, ylab=A, xlab=B) >> text(0.8,0.8,C) >> dev.off() > null device > 1 > > Now the feature request; would it be possible to pass a :file header > based on a value in the table, like this? > > #+TBLNAME:testtwo > | a.png | "G" | "E" | "F" | [[img/a.png]] | > #+TBLFM: $4='(sbe plotTest[:file img/$1] (A $2)(B $3)(C $4)) > > Thanks, > > Myles > -- Eric Schulte http://cs.unm.edu/~eschulte/
[O] sbe with :file header arg?
Hello, I think I have one case of strange behaviour and one feature request, if it isn't already possible. I would like to make one plot per row of a table. This is useful because the contents of the row may be parameters in an R session, and a link to the resulting plot can be put in the last cell of each row. The following source block makes a plot: #+source: plotTest #+headers: :var A="A" :var B="B" :var C="C" #+begin_src R :file nofile.png :results graphics :session b plot( 1,1, ylab=A, xlab=B) text(0.8,0.8,C) #+end_src #+results: plotTest [[file:nofile.png]] and the source block may be called using this table: #+TBLNAME: testtbl | "5" | "X" | "Y" | nofile.png | | 7 | P | "Q" | nofile.png | #+TBLFM: $4='(sbe plotTest (A $1)(B $2)(C $3)) executing that shows up the strange behaviour because the R interpreter contains: > > png(filename="nofile.png") > A <- "5" > B <- "X" > C <- "Y" > plot( 1,1, ylab=A, xlab=B) > text(0.8,0.8,C) > dev.off() null device 1 > > png(filename="nofile.png") > A <- 7 > B <- "/home/myles/org/org/nofile.png" <-- STRANGE, NO? > C <- "Q" > plot( 1,1, ylab=A, xlab=B) > text(0.8,0.8,C) > dev.off() null device 1 Now the feature request; would it be possible to pass a :file header based on a value in the table, like this? #+TBLNAME:testtwo | a.png | "G" | "E" | "F" | [[img/a.png]] | #+TBLFM: $4='(sbe plotTest[:file img/$1] (A $2)(B $3)(C $4)) Thanks, Myles
Re: [O] org-outline-completion-in-steps
On Fri, Oct 7, 2011 at 5:49 PM, Carsten Dominik wrote: > > (setq org-refile-targets '((nil :maxlevel . 3))) > > Do you have (setq org-refile-use-outline-path t) > > ??? > No, I was starting from emacs -q. I do now. And it works as expected. Thanks. -- Le
Re: [O] short timestamp in org-log-note-headings
Hi John Thank you for this patch, this is exactly what I have been looking for when I started to use logging. Because I did not realize how easy this is to implement I had it only on my list for someday/maybe... Michael On Fri, Oct 7, 2011 at 18:15, John J Foerch wrote: > Okay, here it is. This patch adds %d and %D, the capitalized form for > an active timestamp, corresponding to %t and %T. The reason I thought > of 'd' as the code is the mnemonic "date".
Re: [O] Patch for numbering continuation in source blocks.
Hi Niels, is the purpose of this patch to be able to insert an unnumbered code block between two numbered ones and to continue the numbering from the first in the third? - Carsten On 2.10.2011, at 12:40, Niels Giesen wrote: > NOTE: I have tried earlier to send this patch with git send-email, > but apparently failed; here's a new, inlined attempt. > > The documentation for numbering source code blocks says: > > #+begin_quote > If you use a `+n' switch, the numbering from the previous > numbered snippet will be continued in the current one. > #+end_quote > > But that is not exactly what happens; what happens is that the > numbering from the previous snippet will be continued in the current > one. That is, when the previous snippet is numbered its numbering will > continue, but if there is a previous numbered snippet A with, say, 14 > lines followed by an unnumbered snippet B followed by a numbered > snippet C, then the numbers for C will start at 1, regardless of the + > in the +n switch, whereas my reading of the documentation leads me to > think it ought to continue at 15, disregarding the presence any > unnumbered sections in between. > > Reason for me for the +n switch to comply with (my reading of) the > documentation is that I would like to document a long, line-numbered, > function but intersperse it with short code samples without line > numbering that explain parts of the long function. > > This patch of course may break existing org files where +n was > specified but -n intended. > > #+begin_src diff > From 4d34d5f2fe10a956d3359dfd40f19de25202df5f Mon Sep 17 00:00:00 2001 > From: Niels Giesen > Date: Fri, 16 Sep 2011 17:22:47 +0200 > Subject: [PATCH] Continue numbering from any previous numbered snippet with > +n, even when previous numbered snippet does not immediately precede it. > > ,* org-mode/lisp/org-exp.el (org-export-number-lines): > >Check whether number parameter (this is a numbered block!) is >non-nil as well as whether cont is nil (this numbered block should >*not* continue numbering where we left off before!) before resetting >the count to zero. > >From the docs: > > If you use a `+n' switch, the numbering from the previous > numbered snippet will be continued in the current one. > >With this change I believe the code complies with the docs. > --- > lisp/org-exp.el |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/lisp/org-exp.el b/lisp/org-exp.el > index 9884a31..12590e1 100644 > --- a/lisp/org-exp.el > +++ b/lisp/org-exp.el > @@ -2731,7 +2731,7 @@ INDENT was the original indentation of the block." > (defun org-export-number-lines (text &optional skip1 skip2 number cont > replace-labels label-format) > (setq skip1 (or skip1 0) skip2 (or skip2 0)) > - (if (not cont) (setq org-export-last-code-line-counter-value 0)) > + (if (and number (not cont)) (setq org-export-last-code-line-counter-value > 0)) > (with-temp-buffer > (insert text) > (goto-char (point-max)) > -- > 1.7.4.1 > > > #+end_src > > Regards, > niels > -- > http://pft.github.com >
Re: [O] short timestamp in org-log-note-headings
Carsten Dominik writes: > Sure, please make a patch! > > - Carsten > > On 7.10.2011, at 17:22, John J Foerch wrote: > >> Hello, >> >> I wonder if a format code could be added for org-log-note-headings that >> allows the insertion of a short timestamp (without clock time). The use >> case for this is that I log state changes of to-do items, but the >> precise time of the state change is usually more information than I want >> to record. >> >> Thank you >> >> -- >> John Foerch >> >> Okay, here it is. This patch adds %d and %D, the capitalized form for an active timestamp, corresponding to %t and %T. The reason I thought of 'd' as the code is the mnemonic "date". -- John Foerch >From 746ab08868ab88dc3d942bada9a21b21cc3e6de2 Mon Sep 17 00:00:00 2001 From: John Foerch Date: Fri, 7 Oct 2011 12:09:22 -0400 Subject: [PATCH] org-log-note-headings: format codes %d and %D Two new format codes support insertion of a short-format time stamp. %d for an inactive time stamp, and %D for an active one. --- lisp/org.el |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 4a11fc0..00cc7e0 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -2375,6 +2375,8 @@ context, and the cdr is the heading to be used. The heading may also be the empty string. %t in the heading will be replaced by a time stamp. %T will be an active time stamp instead the default inactive one +%d will be replaced by a short-format time stamp. +%D will be replaced by an active short-format time stamp. %s will be replaced by the new TODO state, in double quotes. %S will be replaced by the old TODO state, in double quotes. %u will be replaced by the user name. @@ -12174,6 +12176,12 @@ EXTRA is additional text that will be inserted into the notes buffer." (cons "%T" (format-time-string (org-time-stamp-format 'long nil) org-log-note-effective-time)) + (cons "%d" (format-time-string + (org-time-stamp-format nil 'inactive) + org-log-note-effective-time)) + (cons "%D" (format-time-string + (org-time-stamp-format nil nil) + org-log-note-effective-time)) (cons "%s" (if org-log-note-state (concat "\"" org-log-note-state "\"") "")) -- 1.7.6.3
Re: [O] feature suggestion: apply datetime prompt magic to selected region
Brian van den Broek wrote: > ... > Say I have a buffer with the following contents: > > <--> > Some text in a buffer with orgmode enabled. > > Blah blah, Tuesday at 3pm blah blah September 19, 2003, 14:00-15:00 blah blah > <--> > > As it is now, if I kill the text "Tuesday at 3pm", and with cursor > where I killed hit C-u C-c . to invoke org-time-stamp with prefix > argument, and then yank the just killed text into the resulting > prompt, and repeat for the text "Sept. ... 15:00", I get > > <--> > Some text in a buffer with orgmode enabled. > > Blah blah, <2011-10-11 Tue 15:00> blah blah <2003-09-19 Fri > 14:00-15:00> blah blah > <--> > > (the exact way the org-time-stamp command interprets the text is a > function of the date that it is run and of the value of > org-read-date-prefer-future, and possibly other variables, too.) > > What I was suggesting was it would be cool and a small time-saver if I > could select the text "Tuesday at 3pm" and hit C-u C-c . and have the > region replaced with the stamp <2011-10-11 Tue 15:00>, entirely > bypassing the kill and yank steps. (Achim correctly suggested that > what I want to do could be done with a keyboard macro. I still think > it would be neat.) So we are talking about saving two keystrokes: not worth it in my opinion for interactive use (unless you have a bunch of things to do, as you apparently did - macros or a wrapped org-time-stamp assigned to some key is probably the best solution for that). The reason why I don't think that anything more needs to be done in org, is that the major time waster here is *not* the two extra keystrokes: it's selecting the region(s) to cut/paste - I don't see any way to improve that. Nick
Re: [O] short timestamp in org-log-note-headings
Sure, please make a patch! - Carsten On 7.10.2011, at 17:22, John J Foerch wrote: > Hello, > > I wonder if a format code could be added for org-log-note-headings that > allows the insertion of a short timestamp (without clock time). The use > case for this is that I log state changes of to-do items, but the > precise time of the state change is usually more information than I want > to record. > > Thank you > > -- > John Foerch > >
[O] short timestamp in org-log-note-headings
Hello, I wonder if a format code could be added for org-log-note-headings that allows the insertion of a short timestamp (without clock time). The use case for this is that I log state changes of to-do items, but the precise time of the state change is usually more information than I want to record. Thank you -- John Foerch
Re: [O] [babel] create tikz pictures in an floating LaTeX environment
Nick Dokos writes: > Torsten Wagner wrote: > >> Hi all, >> Hi Eric (hehehe because most likely you read it ;) ) >> >> I try for the first time to write an entire article in org-mode. >> I do so, because with the tags :export: :noexport: I can easily keep >> my personal notes and todos "hidden" and the final export will be just >> what I want to publish. >> Furthermore, I'm interested to do my data evaluation in python blocks >> within the org-file itself, keeping all nicely together. >> >> At the moment I try to add a tikz picture to the manuscript. I >> followed the example at >> http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html >> However, I have some problems. I can generate the picture by using the >> following code. >> >> #+srcname: mypicture >> #+begin_src latex :file fig/mypicture.pdf :packages '(("" "tikz")) >> :border 1em :fit >> \begin{tikzpicture}[line width=1pt,text centered, inner sep = 2] >> \draw[fill=red!50] (0,0) rectangle ++(5,1); >> \draw[fill=yellow!50] (1,1) rectangle ++(1,0.25); >> \draw[fill=yellow!50] (3,1) rectangle ++(1,0.25); >> \draw[fill=green!50] (0.75,1) rectangle ++(1.5,-0.4); >> \draw[fill=green!50] (2.75,1) rectangle ++(1.5,-0.4); >> \end{scope} >> \end{tikzpicture} >> #+end_src >> >> Now, I want to include this in a floating figure environment >> This troubles me a bit. >> I tried to make a second latex src block which includes the >> environment and an \includegraphic pointing to the generated pdf file. >> However, I always find a link of the filename in addtion. I guess this >> is the result of the first (above) source code block. The pdf contains >> a line similar like >> [[file:fig/mypicture.pdf ]] >> > > > ``:results output silent'' should suppress that I think. > Nick's solution should work well. Also, (if you're exporting to LaTeX) couldn't you just combine the tikz picture and the wrapping figure environment into a single begin_latex block? Best -- Eric > > Nick > >> I switched over to use the org-mode way of including a figure and >> replaced the latex second src code block by >> >> #+CAPTION:my great picture >> #+LABEL: fig:my_picture >> #+ATTR_LaTeX: >> [[file:fig/mypicture.pdf]] >> >> This worked out too and was identically to the fist approach, however, >> there was still the result line in the output. >> I tried to add exports: none and volia the line was gone. However, >> the source code block was not exported at all and hence the picture >> not updated at all (it simply used the old generated pdf) >> >> I tried to be ueber-smart and replaced the static link >> [[file:fig/mypicture.pdf]] >> by >> #+call: mypicture >> in the hope it would be executed and result in >> [[file:fig/mypicture.pdf]] >> finally getting the same like with the static link. However, this did >> not work out at all. No figure. >> >> Could someone help me to sort this out. Ideally, I would like to do a >> rather logical combination and end up with the following: >> >> #+CAPTION:my great picture >> #+LABEL: fig:my_picture >> #+ATTR_LaTeX: >> #+srcname: mypicture >> #+begin_src latex :file fig/mypicture.pdf :packages '(("" "tikz")) >> :border 1em :fit >> \begin{tikzpicture}[line width=1pt,text centered, inner sep = 2] >> \draw[fill=red!50] (0,0) rectangle ++(5,1); >> \draw[fill=yellow!50] (1,1) rectangle ++(1,0.25); >> \draw[fill=yellow!50] (3,1) rectangle ++(1,0.25); >> \draw[fill=green!50] (0.75,1) rectangle ++(1.5,-0.4); >> \draw[fill=green!50] (2.75,1) rectangle ++(1.5,-0.4); >> \end{scope} >> \end{tikzpicture} >> #+end_src >> >> avoiding to call/type the filename/link over and over again. >> >> Thanks for helping >> >> Torsten >> > -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] lisp/ob-shen.el:37:1:Error: Cannot open load file: inf-shen
Hi Jeff, Thanks for reporting this error, I've just pushed up a fix. Best -- Eric Jeff Kowalczyk writes: > Just FYI, on git master @ 13b4f I'm seeing a Make error during byte > compilation > of lisp/ob-shen.el: > > emacs -batch -q -no-site-file -eval "(setq load-path (cons (expand-file-name > \"./lisp/\") (cons \"/usr/local/share/emacs/site-lisp\" load-path)))" -f > batch-byte-compile lisp/ob-shen.el > > In toplevel form: > lisp/ob-shen.el:37:1:Error: Cannot open load file: inf-shen > make: *** [lisp/ob-shen.elc] Error 1 > > Perhaps a support-data file that was missed during a git add? > > $ git log -- lisp/ob-shen.el > commit 53573d6e2809cba6c36040bb009d99b97c4808f3 > Author: Eric Schulte > Date: Thu Oct 6 19:54:22 2011 -0600 > > adding initial support for evaluation of shen code blocks > > > Thanks, > Jeff > > -- Eric Schulte http://cs.unm.edu/~eschulte/
[O] [patch][babel] Patch to fix regression (commit 53573d6)
Hi Patch to fix regression caused by commit 53573d6 (lisp/ob-shen.el causes isolated tests to fail). See http://martynjago.com:/ Best, Martyn >From 18e67dae6ac7c9ec8bfee9d53358e379b0e1ece1 Mon Sep 17 00:00:00 2001 From: Martyn Jago Date: Fri, 7 Oct 2011 15:37:02 +0100 Subject: [PATCH] Fix regression caused by commit 53573d6 * lisp/ob-shen.el: autoload `inf-shen' --- lisp/ob-shen.el |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lisp/ob-shen.el b/lisp/ob-shen.el index 123e39e..6131b8e 100644 --- a/lisp/ob-shen.el +++ b/lisp/ob-shen.el @@ -34,7 +34,7 @@ ;;; Code: (require 'ob) -(require 'inf-shen) +(autoload 'inf-shen "inf-shen.el") (defvar org-babel-default-header-args:shen '() "Default header arguments for shen code blocks.") -- 1.7.3.4 --- Org-mode version 7.7 (release_7.7.359.g18e67) GNU Emacs 24.0.50.1 (x86_64-apple-darwin, NS apple-appkit-1038.35) of 2011-08-21 on virtualmac.porkrind.org
Re: [O] feature suggestion: apply datetime prompt magic to selected region
On 7 October 2011 10:12, suvayu ali wrote: > Hi Brian, > > On Fri, Oct 7, 2011 at 12:38 AM, Brian van den Broek > wrote: >> It just seemed that since orgmode parse text yanked into the dt prompt, it >> would be in keeping with the general spirit of the mode to parse selected >> text, too. But, as I said, it isn't a big deal. > > I don't quite understand this, are you saying when I yank text into an > org buffer it converts any random time stamp like information into > proper org format timestamps? So if I were to kill the following text > from some buffer, > > some random time stamp 2011/10/07 > > and yank it into an org buffer, it will be converted to > > some random time stamp <2011-10-07> > > I have been using org for quite sometime, but I don't think there is > any such feature. And if there was, I would say that's too intrusive > to assume I want every time information to be stored as timestamps. Or > on the other hand, do you mean that the text doesn't change but the > text face does? I would think that is a fontlocking issue. > > If I am misunderstanding, could you please illustrate with a small example? Hi Suvayu and all, It is clear that I've not been clear. I'll explain and then let it go. :-) Say I have a buffer with the following contents: <--> Some text in a buffer with orgmode enabled. Blah blah, Tuesday at 3pm blah blah September 19, 2003, 14:00-15:00 blah blah <--> As it is now, if I kill the text "Tuesday at 3pm", and with cursor where I killed hit C-u C-c . to invoke org-time-stamp with prefix argument, and then yank the just killed text into the resulting prompt, and repeat for the text "Sept. ... 15:00", I get <--> Some text in a buffer with orgmode enabled. Blah blah, <2011-10-11 Tue 15:00> blah blah <2003-09-19 Fri 14:00-15:00> blah blah <--> (the exact way the org-time-stamp command interprets the text is a function of the date that it is run and of the value of org-read-date-prefer-future, and possibly other variables, too.) What I was suggesting was it would be cool and a small time-saver if I could select the text "Tuesday at 3pm" and hit C-u C-c . and have the region replaced with the stamp <2011-10-11 Tue 15:00>, entirely bypassing the kill and yank steps. (Achim correctly suggested that what I want to do could be done with a keyboard macro. I still think it would be neat.) The reason that I suggested it is that I'd tried it, half-expecting it to work. It seems to me that orgmode is pretty good at making my life easier and this is a (very small) way in which it could, but doesn't currently. Certainly, if I am killing text to yank into the datetime prompt, there is a high likelihood that what I really want to do is to replace that text with a timestamp that org derives from it. So, why not enable that in one swell foop? I hope that has made my suggestion clear. I'm sorry I was unclear earlier and thus created a bit of noise. Best, Brian vdB
Re: [O] [babel] create tikz pictures in an floating LaTeX environment
Torsten Wagner wrote: > Hi all, > Hi Eric (hehehe because most likely you read it ;) ) > > I try for the first time to write an entire article in org-mode. > I do so, because with the tags :export: :noexport: I can easily keep > my personal notes and todos "hidden" and the final export will be just > what I want to publish. > Furthermore, I'm interested to do my data evaluation in python blocks > within the org-file itself, keeping all nicely together. > > At the moment I try to add a tikz picture to the manuscript. I > followed the example at > http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html > However, I have some problems. I can generate the picture by using the > following code. > > #+srcname: mypicture > #+begin_src latex :file fig/mypicture.pdf :packages '(("" "tikz")) > :border 1em :fit > \begin{tikzpicture}[line width=1pt,text centered, inner sep = 2] > \draw[fill=red!50] (0,0) rectangle ++(5,1); > \draw[fill=yellow!50] (1,1) rectangle ++(1,0.25); > \draw[fill=yellow!50] (3,1) rectangle ++(1,0.25); > \draw[fill=green!50] (0.75,1) rectangle ++(1.5,-0.4); > \draw[fill=green!50] (2.75,1) rectangle ++(1.5,-0.4); > \end{scope} > \end{tikzpicture} > #+end_src > > Now, I want to include this in a floating figure environment > This troubles me a bit. > I tried to make a second latex src block which includes the > environment and an \includegraphic pointing to the generated pdf file. > However, I always find a link of the filename in addtion. I guess this > is the result of the first (above) source code block. The pdf contains > a line similar like > [[file:fig/mypicture.pdf ]] > ``:results output silent'' should suppress that I think. Nick > I switched over to use the org-mode way of including a figure and > replaced the latex second src code block by > > #+CAPTION:my great picture > #+LABEL: fig:my_picture > #+ATTR_LaTeX: > [[file:fig/mypicture.pdf]] > > This worked out too and was identically to the fist approach, however, > there was still the result line in the output. > I tried to add exports: none and volia the line was gone. However, > the source code block was not exported at all and hence the picture > not updated at all (it simply used the old generated pdf) > > I tried to be ueber-smart and replaced the static link > [[file:fig/mypicture.pdf]] > by > #+call: mypicture > in the hope it would be executed and result in > [[file:fig/mypicture.pdf]] > finally getting the same like with the static link. However, this did > not work out at all. No figure. > > Could someone help me to sort this out. Ideally, I would like to do a > rather logical combination and end up with the following: > > #+CAPTION:my great picture > #+LABEL: fig:my_picture > #+ATTR_LaTeX: > #+srcname: mypicture > #+begin_src latex :file fig/mypicture.pdf :packages '(("" "tikz")) > :border 1em :fit > \begin{tikzpicture}[line width=1pt,text centered, inner sep = 2] > \draw[fill=red!50] (0,0) rectangle ++(5,1); > \draw[fill=yellow!50] (1,1) rectangle ++(1,0.25); > \draw[fill=yellow!50] (3,1) rectangle ++(1,0.25); > \draw[fill=green!50] (0.75,1) rectangle ++(1.5,-0.4); > \draw[fill=green!50] (2.75,1) rectangle ++(1.5,-0.4); > \end{scope} > \end{tikzpicture} > #+end_src > > avoiding to call/type the filename/link over and over again. > > Thanks for helping > > Torsten >
[O] [babel] create tikz pictures in an floating LaTeX environment
Hi all, Hi Eric (hehehe because most likely you read it ;) ) I try for the first time to write an entire article in org-mode. I do so, because with the tags :export: :noexport: I can easily keep my personal notes and todos "hidden" and the final export will be just what I want to publish. Furthermore, I'm interested to do my data evaluation in python blocks within the org-file itself, keeping all nicely together. At the moment I try to add a tikz picture to the manuscript. I followed the example at http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html However, I have some problems. I can generate the picture by using the following code. #+srcname: mypicture #+begin_src latex :file fig/mypicture.pdf :packages '(("" "tikz")) :border 1em :fit \begin{tikzpicture}[line width=1pt,text centered, inner sep = 2] \draw[fill=red!50] (0,0) rectangle ++(5,1); \draw[fill=yellow!50] (1,1) rectangle ++(1,0.25); \draw[fill=yellow!50] (3,1) rectangle ++(1,0.25); \draw[fill=green!50] (0.75,1) rectangle ++(1.5,-0.4); \draw[fill=green!50] (2.75,1) rectangle ++(1.5,-0.4); \end{scope} \end{tikzpicture} #+end_src Now, I want to include this in a floating figure environment This troubles me a bit. I tried to make a second latex src block which includes the environment and an \includegraphic pointing to the generated pdf file. However, I always find a link of the filename in addtion. I guess this is the result of the first (above) source code block. The pdf contains a line similar like [[file:fig/mypicture.pdf ]] I switched over to use the org-mode way of including a figure and replaced the latex second src code block by #+CAPTION:my great picture #+LABEL: fig:my_picture #+ATTR_LaTeX: [[file:fig/mypicture.pdf]] This worked out too and was identically to the fist approach, however, there was still the result line in the output. I tried to add exports: none and volia the line was gone. However, the source code block was not exported at all and hence the picture not updated at all (it simply used the old generated pdf) I tried to be ueber-smart and replaced the static link [[file:fig/mypicture.pdf]] by #+call: mypicture in the hope it would be executed and result in [[file:fig/mypicture.pdf]] finally getting the same like with the static link. However, this did not work out at all. No figure. Could someone help me to sort this out. Ideally, I would like to do a rather logical combination and end up with the following: #+CAPTION:my great picture #+LABEL: fig:my_picture #+ATTR_LaTeX: #+srcname: mypicture #+begin_src latex :file fig/mypicture.pdf :packages '(("" "tikz")) :border 1em :fit \begin{tikzpicture}[line width=1pt,text centered, inner sep = 2] \draw[fill=red!50] (0,0) rectangle ++(5,1); \draw[fill=yellow!50] (1,1) rectangle ++(1,0.25); \draw[fill=yellow!50] (3,1) rectangle ++(1,0.25); \draw[fill=green!50] (0.75,1) rectangle ++(1.5,-0.4); \draw[fill=green!50] (2.75,1) rectangle ++(1.5,-0.4); \end{scope} \end{tikzpicture} #+end_src avoiding to call/type the filename/link over and over again. Thanks for helping Torsten
[O] lisp/ob-shen.el:37:1:Error: Cannot open load file: inf-shen
Just FYI, on git master @ 13b4f I'm seeing a Make error during byte compilation of lisp/ob-shen.el: emacs -batch -q -no-site-file -eval "(setq load-path (cons (expand-file-name \"./lisp/\") (cons \"/usr/local/share/emacs/site-lisp\" load-path)))" -f batch-byte-compile lisp/ob-shen.el In toplevel form: lisp/ob-shen.el:37:1:Error: Cannot open load file: inf-shen make: *** [lisp/ob-shen.elc] Error 1 Perhaps a support-data file that was missed during a git add? $ git log -- lisp/ob-shen.el commit 53573d6e2809cba6c36040bb009d99b97c4808f3 Author: Eric Schulte Date: Thu Oct 6 19:54:22 2011 -0600 adding initial support for evaluation of shen code blocks Thanks, Jeff
Re: [O] Registration for Worg commit access
Hi Jason Jason Dunsmore writes: > Martyn Jago writes: > >> Hi >> >> Would it be possible for someone to provide we with commit access to >> Worg? > > Hi Martyn, > > Here are the instructions for contributing to Worg: > http://orgmode.org/worg/worg-git.html#contribute-to-worg > > Did you email Matt? > > Regards, > Jason This is now sorted - may thanks Matt. Best, Martyn
Re: [O] Sorting Agenda By Priority
On Fri, Oct 7, 2011 at 12:26 PM, Bernt Hansen wrote: > Richard Parsons writes: > >> Hi all >> >> I want to sort the agenda file so that the tasks marked with >> priorities A, B and C are all at the top, with tasks marked with no >> priority underneath. >> >> I've tried reading the manual on this >> (http://orgmode.org/manual/Sorting-of-agenda-items.html#Sorting-of-agenda-items), >> but don't understand it. I'm guessing that I have to change the >> variable org-agenda-sorting-strategy somehow, but I'm not sure what >> to. >> >> Thanks for helping a new user! > Welcome to the org-mode community! Thank you very much. It's a great community and I continue to be very impressed. > What you describe should be the default behaviour. But items with no > priority default to B so you need to drop the default priority below the > items you normally set a priority for (ie D if A, B, and C are the only > priorities you use). Ah, so I was barking up the wrong tree. > See org-default-priority, org-lowest-priority > > ,[ example org file ] > | * TODO [#C] Priority C task > | * TODO [#B] Priority B task > | * TODO [#A] High priority task > | * TODO Some other task > | > | (setq org-default-priority ?D) > | (setq org-lowest-priority ?F) That worked perfectly. Thanks! Richard
Re: [O] Sorting Agenda By Priority
Richard Parsons writes: > Hi all > > I want to sort the agenda file so that the tasks marked with > priorities A, B and C are all at the top, with tasks marked with no > priority underneath. > > I've tried reading the manual on this > (http://orgmode.org/manual/Sorting-of-agenda-items.html#Sorting-of-agenda-items), > but don't understand it. I'm guessing that I have to change the > variable org-agenda-sorting-strategy somehow, but I'm not sure what > to. > > Thanks for helping a new user! Hi Richard, Welcome to the org-mode community! What you describe should be the default behaviour. But items with no priority default to B so you need to drop the default priority below the items you normally set a priority for (ie D if A, B, and C are the only priorities you use). See org-default-priority, org-lowest-priority ,[ example org file ] | * TODO [#C] Priority C task | * TODO [#B] Priority B task | * TODO [#A] High priority task | * TODO Some other task | | (setq org-default-priority ?D) | (setq org-lowest-priority ?F) | ` Result from M-x org-agenda < t , | -UUU:**--F1 foo.orgAll L8 (Org) | Global list of TODO items of type: ALL | Available with `N r': (0)ALL (1)TODO (2)DONE | foo:TODO [#A] High priority task | foo:TODO [#B] Priority B task | foo:TODO [#C] Priority C task | foo:TODO Some other task ` HTH, Bernt
[O] Sorting Agenda By Priority
Hi all I want to sort the agenda file so that the tasks marked with priorities A, B and C are all at the top, with tasks marked with no priority underneath. I've tried reading the manual on this (http://orgmode.org/manual/Sorting-of-agenda-items.html#Sorting-of-agenda-items), but don't understand it. I'm guessing that I have to change the variable org-agenda-sorting-strategy somehow, but I'm not sure what to. Thanks for helping a new user! Richard
Re: [O] org-outline-completion-in-steps
On Oct 7, 2011, at 11:25 AM, Le Wang wrote: > On Fri, Oct 7, 2011 at 5:15 PM, Carsten Dominik > wrote: > To get deeper, you need to customize `org-refile-targets'. > > What does "in-steps" mean here? I thought that I'd have to complete top > level, then complete the next level, etc, etc. > > I've evaled > > (setq org-refile-targets '((nil :maxlevel . 3))) > > Now the targets in the first 3 levels are available but all at once as bare > targets, is this expected? Do you have (setq org-refile-use-outline-path t) ??? - Carsten
Re: [O] org-outline-completion-in-steps
On Fri, Oct 7, 2011 at 5:15 PM, Carsten Dominik wrote: > To get deeper, you need to customize `org-refile-targets'. > What does "in-steps" mean here? I thought that I'd have to complete top level, then complete the next level, etc, etc. I've evaled (setq org-refile-targets '((nil :maxlevel . 3))) Now the targets in the first 3 levels are available but all at once as bare targets, is this expected? > - Carsten > > -- Le
Re: [O] org-outline-completion-in-steps
On Oct 7, 2011, at 11:06 AM, Le Wang wrote: > Hi all, > > So I've started Emacs 23.3 with -q option, and I've got an org document open. > How do I go about completing in steps? > > org-outline-path-complete-in-steps is a variable defined in `org.el'. > Its value is t > > Documentation: > Non-nil means, complete the outline path in hierarchical steps. > When Org-mode uses the refile interface to select an outline path > (see variable `org-refile-use-outline-path'), the completion of > the path can be done is a single go, or if can be done in steps down > the headline hierarchy. Going in steps is probably the best if you > do not use a special completion package like `ido' or `icicles'. > However, when using these packages, going in one step can be very > fast, while still showing the whole path to the entry. > > You can customize this variable. > > Maybe I'm missing something obvious, but it looks like I can only compete > against the top level, and when I press enter, it's selected. To get deeper, you need to customize `org-refile-targets'. - Carsten
Re: [O] Table formula not returning an error
Sebastien Vauban wrote: [...] > But I'm surprised I did not see any error reported. This is a feature of org-hh:mm-string-to-minutes: | Convert a string H:MM to a number of minutes. | If the string is just a number, interpret it as minutes. | In fact, the first hh:mm or number in the string will be taken, | there can be extra stuff in the string. ^^ | If no number is found, the return value is 0. It's arguable that this is the best choice, but it is one. Lawrence -- Lawrence Mitchell
[O] org-outline-completion-in-steps
Hi all, So I've started Emacs 23.3 with -q option, and I've got an org document open. How do I go about completing in steps? org-outline-path-complete-in-steps is a variable defined in `org.el'. Its value is t Documentation: Non-nil means, complete the outline path in hierarchical steps. When Org-mode uses the refile interface to select an outline path (see variable `org-refile-use-outline-path'), the completion of the path can be done is a single go, or if can be done in steps down the headline hierarchy. Going in steps is probably the best if you do not use a special completion package like `ido' or `icicles'. However, when using these packages, going in one step can be very fast, while still showing the whole path to the entry. You can customize this variable. Maybe I'm missing something obvious, but it looks like I can only compete against the top level, and when I press enter, it's selected. -- Le
[O] Custom agenda: tasks scheduled today or earlier and tags
Hi, I would like to make a custom agenda that 1) filters based on tags then 2) filters on TODO status then 3a) shows all un-scheduled tasks 3b) shows all tasks scheduled for today or earlier I am doing this to implement a kind of "tickler" file for GTD. Currently I have custom agenda that does 1) and 2): ("c" "Context Next Tasks" tags-todo ("@context1|@contex2") ((org-agenda-skip-function '(org-agenda-skip-entry-if 'nottodo '("NEXT"))) (org-agenda-sorting-strategy '(tag-up)) (org-agenda-overriding-header "Context Next Tasks") )) I tried defining a lambda around the org-agenda-skip-entry-if to combine logical conditions and also tried to figure out how to find out if the schedule date is today or earlier, but my rather weak elisp-foo let me down. Anyone done something similar? Thanks Neilen
Re: [O] feature suggestion: apply datetime prompt magic to selected region
Hi Brian, On Fri, Oct 7, 2011 at 12:38 AM, Brian van den Broek wrote: > It just seemed that since orgmode parse text yanked into the dt prompt, it > would be in keeping with the general spirit of the mode to parse selected > text, too. But, as I said, it isn't a big deal. I don't quite understand this, are you saying when I yank text into an org buffer it converts any random time stamp like information into proper org format timestamps? So if I were to kill the following text from some buffer, some random time stamp 2011/10/07 and yank it into an org buffer, it will be converted to some random time stamp <2011-10-07> I have been using org for quite sometime, but I don't think there is any such feature. And if there was, I would say that's too intrusive to assume I want every time information to be stored as timestamps. Or on the other hand, do you mean that the text doesn't change but the text face does? I would think that is a fontlocking issue. If I am misunderstanding, could you please illustrate with a small example? Thanks, -- Suvayu Open source is the future. It sets us free.
Re: [O] Merge Properties into Template
PS. Note that with the code example I sent, your templates can also access the special properties listed in section 7.2 of the manual, such as TODO, ALLTAGS, TIMESTAMP, DEADLINE etc.