Re: [O] cleaning all the #+results from an org document
On Thu, Jul 28, 2011 at 8:59 AM, Stephen Eglen s.j.eg...@damtp.cam.ac.uk wrote: Thanks Torsten, you've expressed it elegantly! a) send it to someone without the results (to let him create his own) b) archive them without having possible huge amount of lines of results which can be reproduced any time by executing the block again. c) to delete all the old results and start fresh +1 for c. I often work with R objects that are simply too large to store in org tables, so I use babel caching + session + write / load R data files from disk. This works, but it becomes easy to get to an inconsistent state, and I would like to be able to delete the results blocks and run the whole thing fresh. Best, Ista I was mostly thinking about b (for putting into version control) and c, for giving to students to try out. Stephen -- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org
Re: [O] LaTeX Export Packages
Hi Scott, Untested, but I think you can use #+LATEX_HEADER: \hypersetup{colorlinks=true,urlcolor=blue,linkcolor=blue} Best, Ista On Fri, Jul 29, 2011 at 4:55 PM, Scott Randby sran...@gmail.com wrote: The package hyperref is one of the default packages listed in org-export-latex-default-packages-alist. I want to add some options to this package for some files but not for others. I have tried adding the following to my file: #+LATEX_HEADER: \usepackage[colorlinks=true,urlcolor=blue,linkcolor=blue]{hyperref} When I export, I get an error because hyperref appears twice in the TEX file. 1. I don't want to edit the exported LaTeX file to add the hyperref options. 2. I don't want to customize org-export-latex-default-packages-alist to include the options for hyperref because I don't always want those options. 3. I don't want to delete hyperref from org-export-latex-default-packages-alist because I might forget to add it in some file that will be exported to LaTeX. 4. I'd rather not customize my .emacs because the options I want for hyperref vary from file to file. I would like some way to add options in an org-mode file to the packages that appear in org-export-latex-default-packages-alist. Maybe something similar to #+LaTeX_CLASS_OPTIONS: will be possible. But this doesn't look easy to me. Should I learn how to do publishing? Scott Randby -- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org
Re: [O] Closing brace with LaTeX export
Hi, Probably the best thing to do is update to the latest version of org-mode, in which this works even with line breaks. best, Ista On Wed, Aug 17, 2011 at 6:40 PM, Dr. Adrian Wrigley m...@adrianwrigley.com wrote: Hi people! I've just started using Org mode (6.33x). A fabulous tool. But I have a problem exporting TeX such as this: SAMPLE I want to emphasise \emph{these three words} only. --END- when this is exported, the closing brace is erroneously escaped with a backslash \. It works fine without the spaces in the \emph section. The closest discussion on the topic is here: https://lists.gnu.org/archive/html/emacs-orgmode/2009-04/msg00427.html but unlike Scot, I find even keeping the text on one line doesn't work. I would like to pass multi-line arguments, with spaces in braces. I don't think it works to put use a #+BEGIN_LaTeX block for every argument, since that seems to confuse things and is very verbose. What's the best way of doing this? Thanks for your time! -- Dr. Adrian Wrigley. -- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org
Re: [O] Problem with shift-up
On Fri, Aug 19, 2011 at 11:10 AM, Peter Frings peter.fri...@agfa.com wrote: Hi gang, sorry to bother you all again, but my transition to the new emacs is now taking days and I’m getting really frustrated. I’m trying to find out why shift-arrow on a date/time stamp no longer works with my brand new and shiny set-up. Emacs 23, org-mode 7.7. When running a minimal set-up (as described on the worg-FAQ), the shift-arrows keys work as expected: they change the date and time values in org’s timestamps. When loading the starter-kit from Kieran Healy [1], things are not so smooth. I’ve been disabling all possible packages, trying to isolate the culprit, but to no avail. I searched the web and this mailing list, and found someone else with the same problem [2], but alas, no conclusive answer. In both cases, 'shift-select-mode’ is t. With the minimal set-up, S-up is bound to this (using C-h k): S-up runs the command org-shiftup, which is an interactive compiled Lisp function in `org.el’. With the starter-kit, it’s: up (translated from S-up) runs the command previous-line, which is an interactive compiled Lisp function in `simple.el’. (windmove-default-keybindings) is called in starter-kit-keybindings.org, and this does take of the shift + direction keys. The 'Helpful packages' section of starter-kit-org.org also looks suspicious. Best, Ista What the heck is ‘translating’ this key binding? How can I find the guilty one so I can do very cruel things to it? Pointers very much appreciated! Peter. [1] http://kjhealy.github.com/emacs-starter-kit/ [2] http://comments.gmane.org/gmane.emacs.orgmode/34329 -- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org
Re: [O] Latex image placement (...again. H vs. h!)
On Sun, Aug 21, 2011 at 10:00 AM, John Hendy jw.he...@gmail.com wrote: On Sun, Aug 21, 2011 at 1:28 AM, Stefan Nobis stefan...@snobis.de wrote: John Hendy jw.he...@gmail.com writes: Was just rediscovering how to properly get floats to drop in where I want them in LaTeX export (right where I say vs. where LaTeX thinks is convenient). Another way to tackle this problem may be to just not use floats. As the name suggests, these construct is meant to let things float. :) If you want a figure or table to be placed at exactly the point where you place it, why are you using a float environment? Most people answer at this point, because they want the captions and all examples with captions use the float environment. Thats because with captions and in the general case it makes sense to let LaTeX find the right place for these things. Huh. I didn't realize the captions triggered something than just using [[./path/to/image]] with attr_latex options passed. I just duplicated the same section and removed all captions as well as placement=[H] options and they exported right where I would have wanted them. That's interesting -- learned something new! If you want exact, controlled placements and also a caption, have a look at the package 'caption' (version 3.1, author Axel Sommerfeldt). Then you can get rid of floats and don't have to bother with obscure placement rules. :) I'll definitely take a look at that. I may also just use descriptive intros prior to each picture, as that would do the same as a caption, I suppose. It's just weird to me that sometimes the floats don't drop until a later section, in which case I think that's definitely *too* late. Sure, if they dump at the end of Section 1.1, fine -- that's where they are discussed. But now they're showing up in 1.2? The placeins package offers a solution to this problem. Best, Ista Thanks, John -- Until the next mail..., Stefan. -- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org
[O] latex command for org-preview-latex-fragment
Hello all, I'm having troubel getting org-preview-latex-fragment to work when using minted for exported code highlighting. Checking the log files in /tmp/orgtexlog I find that tex fails with the error message Package minted Error: You must invoke LaTeX with the -shell-escape flag. OK, that's helpful, except that I can't figure out where/how to change the tex command called by org-preview-latex-fragment. Is this configurable in org-mode settings? Or does it depend on some option in the auctex or preview packages? Thanks for any help, Ista
[O] caching and code execution on export
Hi all, I'm giving org-babel another go after a recent retreat back to Sweave. I'm having problems with code being executed on export, even when :cache yes is in force. Please see the following example. Also, a quick question that I can't seem to find the answer to: what is the difference between #+source name and #+srcname name? Thanks! Ista = 8 = example starts here = 8 = #+BABEL: :session *R* * Org-babel cache test ** Instructions 1. Start emacs in quiet mode (to rule out personal setting changing the results). 2. Evaluate the buffer and save it. 3. Evaluate it again. 4. Now export (e.g., to html) the buffer. ** Setup *** load ess #+source start-ess #+begin_src emacs-lisp :results silent :exports none (require 'ess-site) #+end_src *** Setup bable for R #+source setup-r-babel #+begin_src emacs-lisp :results silent :exports none (org-babel-do-load-languages 'org-babel-load-languages '((R . t))) #+end_src ** Test *** First R code block #+source: obtest #+begin_src R :cache yes x - rnorm(10) Sys.sleep(5) #+end_src *** Second R code block #+source obtest2 #+begin_src R :cache yes y - 10 Sys.sleep(5) #+end_src ** What happens Cached code blocks are not re-exectued in step 3, as intented. However, they are exectued in step 4. After much pain I found that setting org-export-babel-evaluate to nil fixed the problem. But a) I don't think this is the intended behavior, and b) if it is I think it should be changed. I've seen the discussion at http://comments.gmane.org/gmane.emacs.orgmode/40685 which seems to indicate that this should not be happening. ** Version Info GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) of 2011-04-11 Org-mode version 7.4 (same thing on 7.5 from ELPA) = 8 = example ends here = 8 = -- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org
Re: [O] caching and code execution on export
Fantastic, the latest git version now works as expected. Thank you! On Fri, Jul 1, 2011 at 3:57 PM, Eric Schulte schulte.e...@gmail.com wrote: Ista Zahn iz...@psych.rochester.edu writes: Hi all, I'm giving org-babel another go after a recent retreat back to Sweave. I'm having problems with code being executed on export, even when :cache yes is in force. Please see the following example. Thanks for pointing this out. There were some export-specific header arguments included in the cache calculation. I've just pushed up a fix which fixes this issue. Please let me know if you notice any further problems. Also, a quick question that I can't seem to find the answer to: what is the difference between #+source name and #+srcname name? No difference, I believe that #+function name is another valid alias. Thanks -- Eric -- Eric Schulte http://cs.unm.edu/~eschulte/ -- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org
[O] Portability
Hi all, Over the past couple of days I've been happily tweaking my org-mode settings. At one point something happened that gave me great pause. I forgot to load a function that adds an APA style LaTeX export (using apa6e.cls) to my org-export-latex-classes Alist. So of course when I tried to export using that class it did not work. This made me realize that my .org document depended on my .emacs file for export! This strikes me as a very bad thing because if I want others to be able to use my .org document I have to distribute (at least the relevant parts of) my .emacs along with it. So all this got me thinking that perhaps setting up lots of complicated org-mode related stuff in my .emacs is a bad idea, and that perhaps I should use a template to do the setup in each .org file. Please share any tips or suggestions you have related to this. What do you do? How well does it work? What suggestions do you have for someone just starting out with org-mode? Thanks! -- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org
Re: [O] Org-babel: can evaluation confirmation be disabled (e.g., set to always yes)?
It's under Miscellaneous in the manual. See the description of org-confirm-babel-evaluate at http://orgmode.org/manual/Code-evaluation-security.html#Code-evaluation-security Best, Ista On Thu, Jul 7, 2011 at 12:38 PM, Torsten Anders torsten.and...@beds.ac.uk wrote: Dear Babel developers, As you know, whenever I hit C-c C-c in a code block, I get the following question. Evaluate this LANGUAGE code block on your system? (y or n) In the case of nested calls (using noweb) there can even be many queries like that before some code is actually executed. Can this be disabled by setting it to yes by default? I don't do any coding in my blocks that could in any ways adversely affect my system... I could not find anything related in the documentation, apologies if I missed it. Best, Torsten -- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org
Re: [O] Enabling another language in org-babel
I just hacked up a rudimentary ob-stata.el by replacing julia with stata in ob-julia.el by G. Jay Kerns (and making a few other minor tweaks). Only :results output works (no graphics, no :results value). In short it's in pretty rough shape, but it does work for some basic things. Perhaps someone with better emacs-lisp can polish it up. The code is available at https://gist.github.com/izahn/5745dcf6dd07a6b05084 Best, Ista On Tue, Jun 24, 2014 at 8:05 AM, Rainer M Krug rai...@krugs.de wrote: Eric Schulte schulte.e...@gmail.com writes: Brendan Halpin brendan.hal...@ul.ie writes: Does there exist any documentation on extending org-babel to another language? Hi Brendan, There is a template [1] which may be filled out to add support for a new language. More generally simply defining a function named `org-babel-execute:foo' will cause babel to try to execute foo code blocks using that function. See the template for existing `org-babel-execute:*' functions. Relatedly, is anyone working on adding Stata coverage to org-babel? I'm not but who knows. If you do add support for Stata please consider contributing it to Org-mode (see [2]). stata should be not to difficult to add, as ESS supports stata and I would guess that most functions would be the same (or very similar) Cheers, Rainer Best, Eric Regards, Brendan Footnotes: [1] http://orgmode.org/w/worg.git/blob/HEAD:/org-contrib/babel/ob-template.el [2] http://orgmode.org/worg/org-contribute.html -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D):+49 - (0)3 21 21 25 22 44 email: rai...@krugs.de Skype: RMkrug PGP: 0x0F52F982
Re: [O] org-ref in action
John, This is simply amazing. I think this covers basically every item on my org-mode reference handling wish list. It's really great, thank you! Will this be on Melpa soon? -Ista On Tue, Jun 24, 2014 at 2:45 PM, John Kitchin jkitc...@andrew.cmu.edu wrote: Hello everyone, org-ref has basically stabilized. You can get the latest code at https://github.com/jkitchin/jmax/blob/master/org-ref.org. I made a little screen capture video here to show you what it does: https://www.youtube.com/watch?v=JyvpSVl4_dg Try it out, if it looks interesting, and let me know if you find any bugs! Thanks, -- --- John Kitchin
Re: [O] Enabling another language in org-babel
Hi Bastien, I don't know if this is ready for contrib yet (though I don't object if you think it is). I'm not sure what quality standards exist for contrib, but this is really quick and dirty; it would be nice to at least implement graphics support. On the other hand its better than nothing, so maybe it does make sense to add it to contrib. Also I'm not sure what the development process is once things go in contrib (sorry for my ignorance!). Does contrib live in the same code repository as the rest of org, or are things in contrib developed separately and pulled in later? In short feel free to add it to contrib if you want, but be aware that it is in pretty rough shape. Best, Ista On Wed, Jun 25, 2014 at 4:33 AM, Bastien b...@gnu.org wrote: Hi Ista, Ista Zahn istaz...@gmail.com writes: The code is available at https://gist.github.com/izahn/5745dcf6dd07a6b05084 Looks good -- would you like to add it to the contrib/ directory in Org's repository? As for the original question, I think it would be a nice addition, let's put it somewhere on our collective TODO list :) -- Bastien
Re: [O] Babel-R vs. ESS
Hi Shiyuan, On Wed, Jun 25, 2014 at 3:08 AM, Shiyuan gshy2...@gmail.com wrote: Hi all, I am learning R and use Emacs to work with R. I googled around and I found two options: ESS and Org-R/Org-Babel. Org-Babel and ESS are not really alternatives; in fact the complement each other nicely. Org gives you a lightweight markup language, and a way to embed source code blocks. You can edit/evaluate/test R source code blocks using ESS. Babel speaks multiple languages( Any languages?-if we write some sort of parser, which I assume is not terribly difficult under Babel?). But if R is the primary language I would use, which option (Babel-R vs ESS) is more advisable? I do want a nice integration of graphics/source code into a paper/slides. Basically if you're using R in emacs you want to be using ESS. You can also use org-mode to easily create reports, slides, etc. with embedded R code. Best, Ista Any suggestions/options are appreciated. Shiyuan
Re: [O] org-ref in action
Yes, totally off topic for this thread, please start a new one. On Fri, Jun 27, 2014 at 12:27 AM, Xebar Saram zelt...@gmail.com wrote: Hi all off topic a bit again. im an academic (asst. prof) in Epidemiology and have been using org-mode for about a year now. i love using org but im really not very technical at all. it has always been a dream for me to ditch word and move over to Latex and even better orgmode to write my scientific publications, writing my CV etc. The problem is i cant really find a good for dummies guide on how to really get started. again im really not technical so i always give up really fast on this. Do you guys think i should give it a shot (again not very technical :)) and if so what would be the steps/guides to follow? perhaps start by drafting a CV since thats perhaps easier? kind regards Z. On Thu, Jun 26, 2014 at 9:44 PM, Matt Lundin m...@imapmail.org wrote: Alan Schmitt alan.schm...@polytechnique.org writes: On 2014-06-26 16:39, Matt Lundin m...@imapmail.org writes: By contrast, ox-bibtex.el runs citations through bibtex2html, which is pretty much limited to the old-fashioned bibtex formats. What would be required for bibtex2html to take biblatex input? I thought the backend format was similar or the same (as you can tell, I know nothing of biblatex). I don't think this is possible without some major hacking/conversion/filtering. Biblatex has many more entry types and fields than bibtex. I've found that most of the older bibtex utils (bibtools, bibtex2html) choke on my biblatex files. Even if biblatex2html did read biblatex data, its output, I believe, is limited to bibtex styles, which cannot handle more complex formats. Many scientific journals require bibtex formats. But many humanities disciplines have more complicated bibliographical requirements that bibtex cannot handle. Best, Matt
Re: [O] Evaluating inline source blocks on export issue
On Thu, Jul 24, 2014 at 6:14 AM, Andreas Leha andreas.l...@med.uni-goettingen.de wrote: Nick Dokos ndo...@gmail.com writes: Grant Rettke g...@wisdomandwonder.com writes: Thanks for looking Thomas and Nick. When I set this and export , | (setq org-export-babel-evaluate t) ` I get the expected result of , | Here is a `16', stuck in the middle of some prose. ` But when I do this and export , | (setq org-export-babel-evaluate 'inline-only) ` I get this output which is not what I expected , | Here is a , stuck in the middle of some prose. ` I thought that I was enabling inline code block execution correctly and making the inline call correctly. How does it look should it be doing what I had wanted? I don't think you can: the `type' (see below) of the inline code is not `inline' as one might think at first, but `lob', presumably because call_foo is defined in the library-of-babel. The relevant code is in ob-exp.el:org-babel-exp-results: , | ... | (when (and (or (eq org-export-babel-evaluate t) | (and (eq type 'inline) | (eq org-export-babel-evaluate 'inline-only))) | (not (and hash (equal hash (org-babel-current-result-hash) | ... ` Then I would like to turn this into a feature request: Enable inline-block-specific settings. I'm not sure if this solves your problem, but --8---cut here---start-8--- #+name: squareFun #+begin_src emacs-lisp :exports none (defun square (it) (* it it)) #+end_src #+RESULTS: squareFun : square Here is a src_emacs-lisp{(square 10)}, from an inline source block. --8---cut here---end---8--- does work with org-export-babel-evaluate set to 'inline-only. You do have to evaluate the squareFun block before exporting. Best, Ista This does not only hold for the evaluation, but also for default header arguments. Different settings for inline code are quite useful. I do have to specify [:results raw] on the block-to-block basis quite a lot and would benefit a lot from global inline-specific settings. As always, point me to the way to do it, if (quite likely) this is possible already. Regards, Andreas
Re: [O] Enabling another language in org-babel
Hi all, Please find code attached that implements stata support in org-babel. The attached ob-stata.el is a modified version of ob-julia.el. It currently supports evaluation of stata code from babel code blocks with ':results output' (and this has been set as the default). Neither ':results value' nor ':results graphics' work. I suspect that ':results value' doen't make sense for stata, in which case all the value-specific stuff should be removed. I would like to eventually get ':results graphics' working, but have not yet implemented it. If there are no objections I would like to add this to contrib. Best, Ista On Mon, Jul 28, 2014 at 9:20 AM, Bastien b...@gnu.org wrote: Hi Ista, Ista Zahn istaz...@gmail.com writes: I don't know if this is ready for contrib yet (though I don't object if you think it is). I'm not sure what quality standards exist for contrib, but this is really quick and dirty; it would be nice to at least implement graphics support. On the other hand its better than nothing, so maybe it does make sense to add it to contrib. Yes, it makes sense to add it to contrib, it will help others step up and improve the code if needed. Also I'm not sure what the development process is once things go in contrib (sorry for my ignorance!). Does contrib live in the same code repository as the rest of org, or are things in contrib developed separately and pulled in later? contrib/ lives in the same Git repository than the rest of Org (which is arguably a problem). So everything is developed at the same place. Once you send me your public key, I'll grant you write access to the repository and you can push commits. In short feel free to add it to contrib if you want, but be aware that it is in pretty rough shape. Please provide a separate commit on the list for this piece of code, so that we can review it and commit it. And if you want to get push access, please send me your public key. Thanks! -- Bastien ;;; ob-stata.el --- org-babel functions for stata code evaluation ;; Copyright (C) 2014 Ista Zahn ;; Author: Ista Zahn, based on ob-julia.el by G. Jay Kerns, and ob-R.el ;; by Eric Schulte and Dan Davison ;; This file is not part of GNU Emacs. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 3, or (at your option) ;; any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; The file provides Org-Babel support for evaluating stata code. ;; It is basically result of find-and-replace stata for julia ;; in ob-julia.el by G. Jay Kerns. Only :results output works: the ;; header args must include :results output (this is the default). ;; Note that I'm not sure ':results value' makes sense or is useful ;; but I have left all the value-processing stuff inherited from ;; ob-julia and ob-R. ':results graphics' would be nice, but I have ;; not tried to implement it. ;;; Requirements: ;; Stata and ESS are required. ;;; Code: (require 'ob) (eval-when-compile (require 'cl)) (declare-function orgtbl-to-csv org-table (table params)) (declare-function stata ext:ess-stata (optional start-args)) (declare-function inferior-ess-send-input ext:ess-inf ()) (declare-function ess-make-buffer-current ext:ess-inf ()) (declare-function ess-eval-buffer ext:ess-inf (vis)) (declare-function org-number-sequence org-compat (from optional to inc)) (declare-function org-remove-if-not org (predicate seq)) (defconst org-babel-header-args:stata '((width . :any) (horizontal . :any) (results . ((file list vector table scalar verbatim) (raw org html latex code pp wrap) (replace silent append prepend) ;; NOTE: not sure 'value' makes sense in stata ;; we may want to remove it from the list (output value graphics stata-specific header arguments.) (add-to-list 'org-babel-tangle-lang-exts '(stata . do)) ;; only ':results output' currently works, so make that the default (defvar org-babel-default-header-args:stata '((:results . output))) (defcustom org-babel-stata-command inferior-STA-program-name Name of command to use for executing stata code. :group 'org-babel :version 24.4 :package-version '(Org . 8.0) :type 'string) (defvar ess-local-process-name) ; dynamically scoped (defun org-babel-edit-prep:stata (info) (let ((session (cdr (assoc :session (nth 2 info) (when
Re: [O] Enabling another language in org-babel
I've made the suggested changes, with the exception of the part of Emacs bit, as this should go in contrib not core. I asked Bastien privately about getting access to the git repository, but will ask here as well: When I run 'git clone orgm...@orgmode.org:org-mode.git' I get a response saying Permission denied (publickey). fatal: Could not read from remote repository Does that mean my key wasn't properly added, or did I miss some required set-up? Best, Ista On Tue, Jul 29, 2014 at 10:36 AM, Bastien b...@gnu.org wrote: Hi Ista, some comments on the code below. Ista Zahn istaz...@gmail.com writes: ;; Copyright (C) 2014 Ista Zahn ;; Author: Ista Zahn, based on ob-julia.el by G. Jay Kerns, and ob-R.el ;; by Eric Schulte and Dan Davison You need to reformat this -- see files with multiple authors in Org or in Emacs. ;; This file is not part of GNU Emacs. We plan to add this to Org's core, so this will be part of Emacs. ;; Stata and ESS are required. Maybe add some links for the requirements. (defcustom org-babel-stata-command inferior-STA-program-name Name of command to use for executing stata code. :group 'org-babel :version 24.4 :package-version '(Org . 8.0) ^^^ This needs to be 8.3 ;; The following was a very complicated write object command ;; The replacement needs to add error catching ;(defvar org-babel-stata-write-object-command {function(object,transfer.file){object;invisible(if(inherits(try({tfile-tempfile();write.table(object,file=tfile,sep=\\\t\,na=\nil\,row.names=%s,col.names=%s,quote=FALSE);file.rename(tfile,transfer.file)},silent=TRUE),\try-error\)){if(!file.exists(transfer.file))file.create(transfer.file)})}}(object=%s,transfer.file=\%s\)) Maybe simply remove this, or make it more readable. Thanks in advance for this contribution! -- Bastien ;;; ob-stata.el --- org-babel functions for stata code evaluation ;; Copyright (C) 2014 Ista Zahn ;; Author: Ista Zahn istaz...@gmail.com ;; G. Jay Kerns ;; Eric Schulte ;; Dan Davison ;; This file is not part of GNU Emacs. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 3, or (at your option) ;; any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; The file provides Org-Babel support for evaluating stata code. ;; It is basically result of find-and-replace stata for julia ;; in ob-julia.el by G. Jay Kerns. Only :results output works: the ;; header args must include :results output (this is the default). ;; Note that I'm not sure ':results value' makes sense or is useful ;; but I have left all the value-processing stuff inherited from ;; ob-julia and ob-R. ':results graphics' would be nice, but I have ;; not tried to implement it. ;; --Ista, 07/30/2014 ;;; Requirements: ;; Stata: http://stata.com ;; ESS: http://ess.r-project.org ;;; Code: (require 'ob) (eval-when-compile (require 'cl)) (declare-function orgtbl-to-csv org-table (table params)) (declare-function stata ext:ess-stata (optional start-args)) (declare-function inferior-ess-send-input ext:ess-inf ()) (declare-function ess-make-buffer-current ext:ess-inf ()) (declare-function ess-eval-buffer ext:ess-inf (vis)) (declare-function org-number-sequence org-compat (from optional to inc)) (declare-function org-remove-if-not org (predicate seq)) (defconst org-babel-header-args:stata '((width . :any) (horizontal . :any) (results . ((file list vector table scalar verbatim) (raw org html latex code pp wrap) (replace silent append prepend) ;; NOTE: not sure 'value' makes sense in stata ;; we may want to remove it from the list (output value graphics stata-specific header arguments.) (add-to-list 'org-babel-tangle-lang-exts '(stata . do)) ;; only ':results output' currently works, so make that the default (defvar org-babel-default-header-args:stata '((:results . output))) (defcustom org-babel-stata-command inferior-STA-program-name Name of command to use for executing stata code. :group 'org-babel :version 24.4 :package-version '(Org . 8.3) :type 'string) (defvar ess-local-process-name) ; dynamically scoped (defun org-babel-edit-prep:stata (info) (let ((session (cdr (assoc :session (nth 2 info) (when (and session (string-match ^\\*\\(.+?\\)\\*$ session)) (save
[O] [PATCH] ob-stata.el: new file for stata code evaluation
Here is a patch (against master) adding babel support for evaluating stata code. As discussed in a previous thread[1] there is a lot of work that should be done to clean it up and make it more useful. It does work for basic code evaluation, so I'm submitting it here in the hope that others find it useful. Best, Ista [1] https://lists.gnu.org/archive/html/emacs-orgmode/2014-06/msg00862.html From 24d957b8fc3eb207158e94cdec1a362ba2e79ff0 Mon Sep 17 00:00:00 2001 From: Ista Zahn istaz...@gmail.com Date: Wed, 30 Jul 2014 17:07:16 -0400 Subject: [PATCH] ob-stata.el: new file for stata code evaluation * contrib/lisp/ob-stata.el: New file based on ob-julia.el. * contrib/README: Document addition of new file. ob-stata.el provides basic support for evaluating Stata code. --- contrib/README | 1 + contrib/lisp/ob-stata.el | 313 +++ 2 files changed, 314 insertions(+) create mode 100644 contrib/lisp/ob-stata.el diff --git a/contrib/README b/contrib/README index 2a67b65..e92da14 100644 --- a/contrib/README +++ b/contrib/README @@ -80,6 +80,7 @@ ob-fomus.el --- Org-babel functions for fomus evaluation ob-julia.el --- Org-babel functions for julia evaluation ob-mathomatic.el --- Org-babel functions for mathomatic evaluation ob-oz.el --- Org-babel functions for Oz evaluation +ob-stata.el --- Org-babel functions for Stata evaluation ob-tcl.el --- Org-babel functions for tcl evaluation External libraries diff --git a/contrib/lisp/ob-stata.el b/contrib/lisp/ob-stata.el new file mode 100644 index 000..8a70754 --- /dev/null +++ b/contrib/lisp/ob-stata.el @@ -0,0 +1,313 @@ +;;; ob-stata.el --- org-babel functions for stata code evaluation + +;; Copyright (C) 2014 Ista Zahn +;; Author: Ista Zahn istaz...@gmail.com +;; G. Jay Kerns +;; Eric Schulte +;; Dan Davison + + +;; This file is not part of GNU Emacs. + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. +;; +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; The file provides Org-Babel support for evaluating stata code. +;; It is basically result of find-and-replace stata for julia +;; in ob-julia.el by G. Jay Kerns. Only :results output works: the +;; header args must include :results output (this is the default). +;; Note that I'm not sure ':results value' makes sense or is useful +;; but I have left all the value-processing stuff inherited from +;; ob-julia and ob-R. ':results graphics' would be nice, but I have +;; not tried to implement it. +;; --Ista, 07/30/2014 + +;;; Requirements: +;; Stata: http://stata.com +;; ESS: http://ess.r-project.org + +;;; Code: +(require 'ob) +(eval-when-compile (require 'cl)) + +(declare-function orgtbl-to-csv org-table (table params)) +(declare-function stata ext:ess-stata (optional start-args)) +(declare-function inferior-ess-send-input ext:ess-inf ()) +(declare-function ess-make-buffer-current ext:ess-inf ()) +(declare-function ess-eval-buffer ext:ess-inf (vis)) +(declare-function org-number-sequence org-compat (from optional to inc)) +(declare-function org-remove-if-not org (predicate seq)) + +(defconst org-babel-header-args:stata + '((width . :any) +(horizontal . :any) +(results . ((file list vector table scalar verbatim) + (raw org html latex code pp wrap) + (replace silent append prepend) +;; NOTE: not sure 'value' makes sense in stata +;; we may want to remove it from the list + (output value graphics + stata-specific header arguments.) + +(add-to-list 'org-babel-tangle-lang-exts '(stata . do)) + +;; only ':results output' currently works, so make that the default +(defvar org-babel-default-header-args:stata '((:results . output))) + +(defcustom org-babel-stata-command inferior-STA-program-name + Name of command to use for executing stata code. + :group 'org-babel + :version 24.4 + :package-version '(Org . 8.3) + :type 'string) + +(defvar ess-local-process-name) ; dynamically scoped +(defun org-babel-edit-prep:stata (info) + (let ((session (cdr (assoc :session (nth 2 info) +(when (and session (string-match ^\\*\\(.+?\\)\\*$ session)) + (save-match-data (org-babel-stata-initiate-session session nil) + +(defun org-babel-expand
Re: [O] Enabling another language in org-babel
On Thu, Jul 31, 2014 at 6:52 AM, Bastien b...@gnu.org wrote: Hi Ista, Ista Zahn istaz...@gmail.com writes: I asked Bastien privately about getting access to the git repository, but will ask here as well: When I run 'git clone orgm...@orgmode.org:org-mode.git' I get a response saying Permission denied (publickey). fatal: Could not read from remote repository This should be fixed now, let me know, Yes working now, thank you! -- Bastien
Re: [O] How to disable block evaluation results being wrapped with a single character like =?
I'm somewhat confused by the wrapped in = part, but I think you are looking for 'C-h v org-babel-min-lines-for-block-output'. Best, Ista On Sun, Aug 3, 2014 at 3:03 PM, Grant Rettke g...@wisdomandwonder.com wrote: Hi, Sometimes block evaluation results are wrapped with a single character like =. When exporting to latex, the results block is lost. How may one force block evaluation always to be wrapped properly for export to latex? org 8.2.7a Kind regards, Grant Rettke | ACM, ASA, FSF, IEEE, SIAM g...@wisdomandwonder.com | http://www.wisdomandwonder.com/ “Wisdom begins in wonder.” --Socrates ((λ (x) (x x)) (λ (x) (x x))) “Life has become immeasurably better since I have been forced to stop taking it seriously.” --Thompson
Re: [O] How to disable block evaluation results being wrapped with a single character like =?
Hi Grant, I cannot reproduce. Here is what I see: #+BEGIN_SRC emacs-lisp (setq org-babel-min-lines-for-block-output 10) (print 1) #+END_SRC #+RESULTS: : 1 #+BEGIN_SRC emacs-lisp (setq org-babel-min-lines-for-block-output 0) (print 1) #+END_SRC #+RESULTS: #+begin_example 1 #+end_example Perhaps try with emacs -q and see what you get. Best, Ista On Mon, Aug 4, 2014 at 1:23 PM, Grant Rettke g...@wisdomandwonder.com wrote: That is what I was thinking. I had set it to 0. What happened is that instead of a block showing up, the results were delimited with a prepended '=' instead of a ':'. Unfortunately I forgot how this occurred, as I manually wrapped the result with a block instead, so org was happy to use that instead. Grant Rettke | ACM, ASA, FSF, IEEE, SIAM g...@wisdomandwonder.com | http://www.wisdomandwonder.com/ “Wisdom begins in wonder.” --Socrates ((λ (x) (x x)) (λ (x) (x x))) “Life has become immeasurably better since I have been forced to stop taking it seriously.” --Thompson On Sun, Aug 3, 2014 at 7:24 PM, Ista Zahn istaz...@gmail.com wrote: I'm somewhat confused by the wrapped in = part, but I think you are looking for 'C-h v org-babel-min-lines-for-block-output'. Best, Ista On Sun, Aug 3, 2014 at 3:03 PM, Grant Rettke g...@wisdomandwonder.com wrote: Hi, Sometimes block evaluation results are wrapped with a single character like =. When exporting to latex, the results block is lost. How may one force block evaluation always to be wrapped properly for export to latex? org 8.2.7a Kind regards, Grant Rettke | ACM, ASA, FSF, IEEE, SIAM g...@wisdomandwonder.com | http://www.wisdomandwonder.com/ “Wisdom begins in wonder.” --Socrates ((λ (x) (x x)) (λ (x) (x x))) “Life has become immeasurably better since I have been forced to stop taking it seriously.” --Thompson
Re: [O] R code block produces only partial output
On Sat, Aug 23, 2014 at 2:35 PM, Thomas S. Dye t...@tsdye.com wrote: Aaron Ecay aarone...@gmail.com writes: Well, I think that it’s going to be difficult to make babel a better literate programming solution for R if we restrict ourselves not to use the state-of-the-art R package for low-level literate programming support. Org is full of features which one needs to install other software to use, and I’m comfortable with the idea that babel’s R support should require the evaluate package. However, it’s difficult to argue this point of view when no one has spoken up about their own requirements, and a spirit of conservatism in the face of vague imagined difficulties persists. As a regular user of babel, including ob-R, I do want to see it mature into a state-of-the-art, productive literate programming environment. I've followed babel development for a long time and my sense is that responsible experimentation is the norm, backed up by the ability to revert commits that end up causing undue headaches. If Aaron's good work on ob-R raises howls of protest from users with restrictive IT managers, or the evaluate package somehow becomes a pariah, then at some point ob-R would have to drop the evaluate package requirement. If not, then the rest of us can enjoy the benefits of Aaron's labor (hopefully on master and not as a series of patches, which are a real pain for us non-programmer types to maintain). My $0.02. +1. R has considerable infrastructure to support litterarate programming, and it makes little sense to avoid using it because a) some hypothetical users will have difficulty installing the software or b) because other languages supported by babel lack similar functionality. We are currently missing out on some useful things available in other literate programming systems for R, such as the ability to easily return interleaved input and output, and I would really like to see R support in babel take advantage of existing R features to provide a first-class R literate programming environment. Best, Ista Tom -- Thomas S. Dye http://www.tsdye.com
Re: [O] default headers for source code blocks
Hi Subhan, I think the idea is that you should not set his on each individual block, but set global values. For example #+PROPERTY: header-args:sql :exports code :tangle yes :comments noweb Best, Ista On Tue, Sep 9, 2014 at 1:24 PM, Subhan Michael Tindall subh...@familycareinc.org wrote: My apologies if this is in TFM, but I can’t seem to find it after substantial digging. I’m using a lot of source code blocks lately. What I’d like is a way to specify a set of default headers to insert when a new block is created. Right now: C-c C-v d sql RET #+begin_src sql #+end_src What I want is this: C-c C-v d sql RET #+begin_src sql :exports code :tangle yes :comments noweb #+end_src Is there a configuration variable I can set for this? All I can find is refs to see source language documentation, but nothing that actually indicates if/how to manage it. Thanks, Subhan Michael Tindall Program Analyst – FamilyCare Health Plans 825 NE Multnomah St, Suite 1400; Portland OR 97232 Direct: 503-471-3127 Fax: 503-471-3177 Email: subh...@familycareinc.org This message is intended for the sole use of the individual and entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you.
Re: [O] specifying the coding language resulting from a a :results code source block
Can't you just do #+begin_src foo :wrap src bar hello world #+end_src ? Best, Ista On Thu, Sep 11, 2014 at 5:11 AM, Dror Atariah dror...@gmail.com wrote: Is there some change in the status of this issue? Can one now specify the language of the result? Cheers, Dror -- Mahalo Tom, It looks like that's what I'll be doing for the ruby block. That said, it would be great if the :results code argument would allow a language specification. Greg On Jun 27, 2012, at 10:22 AM, Thomas S. Dye wrote: Greg Tucker-Kellogg address@hidden writes: I have a Ruby block that creates some dot code. I'd like to be able to have the #+RESULTS block enclosed in a src block that starts #+BEGIN_SRC dot. Using :results value code generates the enclosing SRC block, but using the same language (Ruby) used to generate the code. Is there a way to specify the coding language of a generated #+RESULTS src block? Thanks, Greg Aloha Greg, This works for me with an emacs-lisp code block named harris-matrix that generates dot code. #+header: :var input=harris-matrix #+header: :file temp.pdf #+header: :cmdline -Tpdf #+header: :results output #+BEGIN_SRC dot $input #+END_SRC It's not quite what you were after, but it might help? All the best, Tom -- Thomas S. Dye http://www.tsdye.com
Re: [O] You don't like the HTML export; well, that could change!
Hi Fabrice, Very very nice, I enjoy it a lot. If you are accepting feature requests, the only thing I really miss is Next section link at the bottom. Best, Ista On Mon, Sep 15, 2014 at 2:58 PM, Fabrice Niessen fni-n...@pirilampo.org wrote: Hello, I'm announcing the release of Bigblow, a CSS + JS theme for the Org HTML exports. To use it in your own files, adding these lines should make it: --8---cut here---start-8--- #+HTML_HEAD: link rel=stylesheet type=text/css href=http://www.pirilampo.org/styles/bigblow/css/htmlize.css/ #+HTML_HEAD: link rel=stylesheet type=text/css href=http://www.pirilampo.org/styles/bigblow/css/bigblow.css/ #+HTML_HEAD: link rel=stylesheet type=text/css href=http://www.pirilampo.org/styles/bigblow/css/hideshow.css/ #+HTML_HEAD: script type=text/javascript src=http://www.pirilampo.org/styles/bigblow/js/jquery-1.11.0.min.js;/script #+HTML_HEAD: script type=text/javascript src=http://www.pirilampo.org/styles/bigblow/js/jquery-ui-1.10.2.min.js;/script #+HTML_HEAD: script type=text/javascript src=http://www.pirilampo.org/styles/bigblow/js/jquery.localscroll-min.js;/script #+HTML_HEAD: script type=text/javascript src=http://www.pirilampo.org/styles/bigblow/js/jquery.scrollTo-1.4.3.1-min.js;/script #+HTML_HEAD: script type=text/javascript src=http://www.pirilampo.org/styles/bigblow/js/jquery.zclip.min.js;/script #+HTML_HEAD: script type=text/javascript src=http://www.pirilampo.org/styles/bigblow/js/bigblow.js;/script #+HTML_HEAD: script type=text/javascript src=http://www.pirilampo.org/styles/bigblow/js/hideshow.js;/script --8---cut here---end---8--- If you clone my repo from GitHub [1], it can become as easy as adding just one line: --8---cut here---start-8--- #+SETUPFILE: path/to/Git/repo/setup/bigblow-pirilampo.setup --8---cut here---end---8--- (PS- It would be very nice if we could add http references here! Then, there would even be no need to copy the files locally...) Test it on your files, or look at the video I posted on YouTube to see what it looks like: https://www.youtube.com/watch?v=DnSGSiXYuOk Best regards, Fabrice PPS- I will still make some changes in a couple of days, like renaming the files so that they have a version number, but that I'll warn you when I'll get this done. [1] https://github.com/fniessen/org-html-themes -- Fabrice Niessen Leuven, Belgium http://www.pirilampo.org/
Re: [O] Tangling and Exporting an Unsupported Language.
Exporting and tangling don't require any language support. #+begin_src foobarbas :tangle foo.bar #+end_src is perfectly fine and will export and tangle just fine. Or did I misunderstand your question? Best, Ista On Mon, Sep 29, 2014 at 2:53 AM, Malcolm Purvis malc...@purvis.id.au wrote: All, I'm writing an org document which contains code examples of a language not supported by Babel (a local domain specific language). The language doesn't even have a supporting Emacs mode. I'm wondering what the best portable approach is to managing the code blocks. I'm particularly interested in exporting the document to LaTeX and tangling the code. I may need to share the document with others, so I'd prefer not to require a supporting elisp file if I can help it. Currently I'm using the org language, since it seems to be the most generic: #+begin_src org :tangle foo.bar #+end_src Is there a case for 'begin_src text' to handle arbitrary content? Malcolm -- Malcolm Purvis malc...@purvis.id.au
Re: [O] Tangling and Exporting an Unsupported Language.
On Wed, Oct 1, 2014 at 3:10 AM, Malcolm Purvis malc...@purvis.id.au wrote: Ista == Ista Zahn istaz...@gmail.com writes: Ista Exporting and tangling don't require any language support. Ista #+begin_src foobarbas :tangle foo.bar Ista +end_src Ista is perfectly fine and will export and tangle just fine. Or did I Ista misunderstand your question? Thanks, I wasn't aware that you could put an arbitrary string as the language. I also found that I had org-latex-listings set to t, which was making LaTeX error because it didn't know about the languages I was trying. I've now switched the using the minted LaTeX package, which supports 'text' as a language, and have started using that. Yes, I find minted much nicer that listings, the only drawback being that it has external dependencies. I guess you've already discovered that you can do (add-to-list 'org-export-latex-minted-langs '(foo bar)) where foo is the name of the language and bar is the pygments lexer that should be used to typeset it. Best, Ista Thanks for your help. Malcolm -- Malcolm Purvis malc...@purvis.id.au
Re: [O] [PATCH] WAS Re: Bug: problem w/ R code blocks [8.3beta (release_8.3beta-362-ga92789 at /usr/local/share/emacs/site-lisp/org/)]
On Oct 7, 2014 3:41 PM, Henrik Singmann henrik.singm...@psychologie.uni-freiburg.de wrote: Dear all, Sorry to resurrect this thread but I still have the issue discussed here. I get Error: could not find function .ess.eval when inside an R code block with :session *R* but not without :session *R*. More specifically, in the following .org file the first code block works but not the second one: --8---cut here---start-8--- #+begin_src R date() #+end_src #+RESULTS: : Tue Oct 07 19:31:21 2014 #+begin_src R :session *R* date() #+end_src #+RESULTS: --8---cut here---end---8--- Note that I use the latest Emacs on Windows (24.3.1, i386-mingw-nt6.1.7601) with the latest Org-mode (version 8.3beta, release_8.3beta-427-g942eb6) and the current development version of ESS (the same happens for ESS 14.09). Interestingly and as reported, it does not happen when downgrading to ESS 13.09 (but as this was handled as an org-mode problem so far I decided to keep it on this list). Furthermore, my .emacs file currently only consists of the following: --8---cut here---start-8--- (require 'org) (require 'ess-site) (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(inhibit-startup-screen t) ) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. ) (org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp . nil) (R . t))) (setq org-babel-R-command C:/Progra~1/R/R-3.1.1/bin/x64/rterm.exe --slave --no-save) --8---cut here---end---8--- The windows is Windows 7, 64 bit. Can anybody reproduce or solve? Yes, I can reproduce with emacs 24.3.1, org 8..2.3, and ess 14.09 on Archlinux, but only if I don't start the R session first. If I do 'M-x R' to manually start an R process it works fine, but if there is no R process already running I get 'Error: could not find function .ess.eval' Best, Ista Henrik Am 19.09.2014 um 00:45 schrieb Charles C. Berry: On Thu, 18 Sep 2014, Charles C. Berry wrote: On Thu, 18 Sep 2014, Cook, Malcolm wrote: Hi, Hmm, I spoke too soon the problem is only partially fixed by this patch... Trying to work with in org-mode with R code blocks attached to persistent sessions (i.e. adding ':session myRsession' to the code block header ) makes things start to break again, at least in my hands. Really? I have been working for hours using the :session header with no problems. What exactly breaks? Do you have an example? FWIW, this works when I move my cursor into the source block and C-c C-c. --8---cut here---start-8--- #+BEGIN_SRC R :session myRsession abc - 1 abc+1 #+END_SRC --8---cut here---end---8--- Producing --8---cut here---start-8--- #+RESULTS: : 2 --8---cut here---end---8--- which is what I expect. I use Org-mode version 8.3beta (release_8.3beta-366-gb2fca7. (updated a few hours back) Forget to mention: ess-version: 14.09 [git: 9c248f1a026b6990d0cd0cd326d82854d5cafb26] Chuck -- Dr. Henrik Singmann Albert-Ludwigs-Universität Freiburg, Germany http://www.psychologie.uni-freiburg.de/Members/singmann
Re: [O] posting guide?
+1 On Wed, Mar 13, 2013 at 3:13 PM, Jay Kerns gjkerns...@gmail.com wrote: The past few days have reminded me of something somebody famous once said [1]. I can already see work being done to protect the community for the future, yet I believe there is more we might do to be even stronger. I understand and appreciate Bastien's stated position regarding moderator controls [2], and in that particular case I think he did the right thing. At the same time, I do not possess his seemingly superhuman level of patience, temperance, and couth. Yes, I can add people to my SPAM filter (which I did, BTW), but that action protects only *me*. It does not protect the community. Further, my later blissful ignorance means I am unavailable to respond to future threats, so malicious individuals are left to run rampant and destroy everybody else still hanging around. Of course, if *everybody* agrees to divert to SPAM then we're all set. That's my point: I propose that we, as a community, come to some sort of consensus as to what un/acceptable behavior is and an accepted mechanism of response. One way to accomplish this is with a posting guide. I have some thoughts about this: 1. It should be written and maintained by the community. On Worg, for instance. 2. It should be minimal. Posting guides sometimes go overboard, to the extent that they can be (and sometimes are) used as a weapon. I do *not* propose that. If we insist on 1) then I trust the community to handle it with care. 3. It should contain things which help new users draft messages that are informative and targeted to whatever problem they're having, things they might not have known otherwise (things like M-x org-version, M-x toggle-debug-on-error, etc.). 4. I think we can all agree that messages like this [3] should not be tolerated, ever, under any circumstances. If a person resorts to ad hominem attacks of this sort (or similar) then (s)he should promptly be shown the door. Period. As far as I am concerned, that's pretty much the only thing I can't stomach, but maybe the larger community considers other subjects to be off-topic or unwelcome on the list. That would be for the community to decide. All the above is a long-winded way to say that every community has some /minimum/ standards and expectations of conduct, otherwise we're just a bunch of people standing around in the same (virtual) place. To date, these expectations have lived unspoken or scattered around in emails here or there. I propose that we come together in a community-driven way to define when it's time to say Welcome! and when it's time to say, Get lost. I understand that there are valid arguments against posting guides, not the least of which including what I said above in 2). Maybe this community doesn't want a posting guide. OK. But even in that case we've at least agreed that we don't want a posting guide and can get back to work. If we *do* decide that a minimal posting guide makes sense, then it wouldn't be of much use unless there are those among us willing to enforce it when individuals maliciously disregard the agreement of the community. I would probably have been one of those people had I known there was some consensus about what is OK and what isn't. Now is the time to decide. I have a mental first draft of things that could go in one, but there's no point moving forward if there isn't a general feeling that this would be something good to do. And, I'd like the Org old-timers to feel free to take the reins and run with it if they so choose. Cheers, -- Jay [1] http://www.quotes.net/quote/2101 [2] http://lists.gnu.org/archive/html/emacs-orgmode/2013-03/msg00449.html [3] http://lists.gnu.org/archive/html/emacs-orgmode/2013-03/msg00747.html -- G. Jay Kerns, Ph.D. Youngstown State University http://people.ysu.edu/~gkerns/
Re: [O] python sessions
On Wed, Mar 20, 2013 at 2:44 AM, Andreas Röhler andreas.roeh...@easy-emacs.de wrote: Am 20.03.2013 04:07, schrieb Nick Dokos: John Hendy jw.he...@gmail.com wrote: On Tue, Mar 19, 2013 at 4:40 PM, Gary Oberbrunner ga...@oberbrunner.com wrote: I must be failing to understand something. I'm running Emacs 24.3 on Windows, with latest trunk org-mode. I can't get python functions to persist across blocks in session mode. Here's my foo.org: === * My Document #+BEGIN_SRC python :exports results :results output :session def foo(x): return x+1 print hi #+END_SRC #+RESULTS: : hi #+BEGIN_SRC python :exports results :results output :session print foo(100) print bye #+END_SRC In session mode, shouldn't foo be defined in the second python block? When I export this, I get NameError: name 'foo' is not defined I may be doing something wrong, because if I name my python session, I never see a buffer of that name, and I expected to. Any help? -- Gary You should probably post your babel configuration from .emacs. This works for me (mostly). I'm using python 3.3 and so the print function has changed to requiring parentheses. I can switch to a buffer called *Python*, however, and =print(hi)= works fine. If I change to =print(foo(100))=, I get 101 in the #+RESULTS block. I don't - I get the same error as Gary. And looking at the code of org-babel-python-initiate-session-by-key, I don't understand how it's supposed to work: python-buffer is nil to begin with; the cond takes the first branch and starts a python session. When we come to (setq org-babel-python-buffers (cons (cons session python-buffer) (assq-delete-all session org-babel-python-buffers))) python-buffer is still nil, so we are cooked. Maybe python-buffer was set as a side-effect of run-python in earlier versions of emacs? If so, it does not seem to be the case now. Nick Org-mode version 8.0-pre (release_8.0-pre-144-g855dcf.dirty @ /home/nick/elisp/org-mode/lisp/) GNU Emacs 24.3.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.4) of 2012-12-29 on alphaville AFAIU :session is broken, because Python shell as opened by run-python or py-shell isn't used by ob-babel. Seems ob-babel sends it's code w/ an own shell command, thus opening a new python shell internally every time. Did :session ever work? Then I might be wrong with this comment. Not only did it work, it currently works for me. I seem to remember bad interaction with python modes other than the one shipped with emacs. In my .emacs I have ;; Python ;; there are several modes. Currently using https://github.com/fgallina/python.el ;; hopefully oneday a glorious default python mode will be shipped with emacs and we won't need this anymore. ;; (add-to-list 'load-path ~/.emacs.d/izahn) ;; (require 'python) ;; (setq ;; python-shell-interpreter ipython ;; python-shell-interpreter-args ;; python-shell-prompt-regexp In \\[[0-9]+\\]: ;; python-shell-prompt-output-regexp Out\\[[0-9]+\\]: ;; python-shell-completion-setup-code ;;from IPython.core.completerlib import module_completion ;; python-shell-completion-module-string-code ;;';'.join(module_completion('''%s'''))\n ;; python-shell-completion-string-code ;;';'.join(get_ipython().Completer.all_completions('''%s'''))\n) ;; (require 'python-mode) ;; ;; python auto completion (require 'ac-python) All the python-mode and ipython mode stuff is commented out partly because it did not play nice with org-mode. Using the default python mode works for me. So, for those of you who are finding that this is not working, what python mode are you using? Best, Ista Andreas
Re: [O] python sessions
On Wed, Mar 20, 2013 at 2:15 PM, Nick Dokos nicholas.do...@hp.com wrote: John Hendy jw.he...@gmail.com wrote: On Wed, Mar 20, 2013 at 12:25 PM, Nick Dokos nicholas.do...@hp.com wrote: Andreas Röhler andreas.roeh...@easy-emacs.de wrote: Seems `org-babel-execute':python doesn't get the session flag. Edebug: org-babel-execute:python org-babel-execute:python executing Python code block... [4 times] Result: ((:comments . #1=) (:shebang . #1#) (:cache . no) (:padline . #1#) (:noweb . no) (:tangle . no) (:exports . results) (:results . replace output) (:hlines . no) (:padnewline . yes) (:session) (:result-type . output) Sure it does: ^^ What it does with it is another matter however. Am I missing something? I was thinking the concern was over not having the session named properly, but might be wrong (Andreas could confirm). I guessed Andreas tried with an unnamed session (but I agree it would be best if he confirms): afaics, if I use a session name, it's passed correctly in the params argument of org-babel-execute:python as (:session . foo), but in the later processing, org-babel-python-buffers is not set correctly. I've not used python prior to this, but I use R almost daily in Org and if I do #+begin_src R :session R, I get a buffer actually named =R=. In this case, I expected the buffer name would be *PyFoo*. Checking if it was an issue with asterisks, I used =:session py= and still just get the default *Python* buffer created. Yes, I think it's ob-python's problem: but as I said before, I don't understand why it works for you (and Ista Zahn). I guess it depends on the definition of works. I don't get python buffers with the name of the :session variable. But I do get separate python buffers (.e.g., *Python*, *Python*2) for each session, and python blocks get executed in the right python process. To me that equals works, but if the issue is that the buffers don't get named with the value of :session then no, that doesn't work for me either. Best, Ista Nick
Re: [O] python sessions
On Wed, Mar 20, 2013 at 2:43 PM, Andreas Röhler andreas.roeh...@easy-emacs.de wrote: I guess it depends on the definition of works. I don't get python buffers with the name of the :session variable. Reads as it works only with named sessions, but fails with unnamed It fails to name the python process buffers. Everything else works as expected. Consider this example: 8-cut here8 #+BEGIN_SRC python :exports results :results output :session *foo* def foo(x): return(x+1) #+END_SRC #+RESULTS: #+BEGIN_SRC python :exports results :results output :session *bar* def bar(x): return(x+2) #+END_SRC #+RESULTS: #+BEGIN_SRC python :exports results :results output :session *foo* print(foo(100)) print(bar(100)) #+END_SRC #+RESULTS: : 101 : Traceback (most recent call last): : File stdin, line 1, in module : NameError: name 'bar' is not defined #+BEGIN_SRC python :exports results :results output :session *bar* print(foo(100)) print(bar(100)) #+END_SRC #+RESULTS: : Traceback (most recent call last): : File stdin, line 1, in module : NameError: name 'foo' is not defined : 102 8-cut here8 the foo function exists when I use :session foo (and not with :session bar), and the bar function exists when I uses :session bar (and not with :session foo). That equals works in my book. The only thing that doesn't work is that I have buffers . * tmp.org 1657 Org ~/Desktop/tmp.org * *Python*2332 Inferior Python: * *Python* 332 Inferior Python: instead of . * tmp.org 1657 Org ~/Desktop/tmp.org * *foo* 332 Inferior Python: * *bar* 332 Inferior Python: This is with GNU Emacs 24.2.1 and Org-mode version 8.0-pre (release_8.0-pre-54-gb5a853 Best, Ista But I do get separate python buffers (.e.g., *Python*, *Python*2) for each session, and python blocks get executed in the right python process. To me that equals works, but if the issue is that the buffers don't get named with the value of :session then no, that doesn't work for me either. Best, Ista Nick
Re: [O] python sessions
On Wed, Mar 20, 2013 at 3:53 PM, Andreas Röhler andreas.roeh...@easy-emacs.de wrote: Am 20.03.2013 20:42, schrieb Ista Zahn: On Wed, Mar 20, 2013 at 2:43 PM, Andreas Röhler andreas.roeh...@easy-emacs.de wrote: I guess it depends on the definition of works. I don't get python buffers with the name of the :session variable. Reads as it works only with named sessions, but fails with unnamed Oops, sorry I totally misread this before. I guess my last email didn't make much sense! It fails to name the python process buffers. May you try still an unnamed session as sent by OP? Unnamed sessions works as expected: #+BEGIN_SRC python :exports results :results output :session def foo(x): return(x+1) #+END_SRC #+RESULTS: #+BEGIN_SRC python :exports results :results output :session def bar(x): return(x+2) #+END_SRC #+RESULTS: #+BEGIN_SRC python :exports results :results output :session print(foo(100)) print(bar(100)) #+END_SRC #+RESULTS: : 101 : 102 Andreas
Re: [O] python sessions
On Wed, Mar 20, 2013 at 4:25 PM, Gary Oberbrunner ga...@oberbrunner.com wrote: Ista, what OS are you on? Maybe this (or part of it anyway) is only a Windows problem? Maybe -- I'm on Arch Linux. On Wed, Mar 20, 2013 at 4:12 PM, Ista Zahn istaz...@gmail.com wrote: On Wed, Mar 20, 2013 at 3:53 PM, Andreas Röhler andreas.roeh...@easy-emacs.de wrote: Am 20.03.2013 20:42, schrieb Ista Zahn: On Wed, Mar 20, 2013 at 2:43 PM, Andreas Röhler andreas.roeh...@easy-emacs.de wrote: I guess it depends on the definition of works. I don't get python buffers with the name of the :session variable. Reads as it works only with named sessions, but fails with unnamed Oops, sorry I totally misread this before. I guess my last email didn't make much sense! It fails to name the python process buffers. May you try still an unnamed session as sent by OP? Unnamed sessions works as expected: #+BEGIN_SRC python :exports results :results output :session def foo(x): return(x+1) #+END_SRC #+RESULTS: #+BEGIN_SRC python :exports results :results output :session def bar(x): return(x+2) #+END_SRC #+RESULTS: #+BEGIN_SRC python :exports results :results output :session print(foo(100)) print(bar(100)) #+END_SRC #+RESULTS: : 101 : 102 Andreas -- Gary
Re: [O] python sessions
On Mon, Mar 25, 2013 at 11:40 AM, Eric Schulte schulte.e...@gmail.com wrote: John Hendy jw.he...@gmail.com writes: On Sun, Mar 24, 2013 at 9:38 PM, Nick Dokos nicholas.do...@hp.com wrote: Eric Schulte schulte.e...@gmail.com wrote: From participating in evaluating code throughout the discussion and catching the comments throughout, I'd say yes, at least in terms of how other babel languages function. In other words =#+begin_src R :session foo= creates an R session named foo whereas doing the same with =python= instead of =R= does not yield a named session. From what others experienced, however, the functionality was working correctly (results were persistent across blocks and two differently names blocks created two different sessions), just not named correctly. See the cond form starting at line 169 in ob-python.el. Different session functionality is used based on the `org-babel-python-mode' variable, and on the version of Emacs in use (prior to 24.1 or not). The branch taken when `org-babel-python-mode' equals 'python is certainly broken, as it never saves the name of the newly created buffer, so session re-use and use of multiple named sessions probably works only when `org-babel-python-mode' equals 'python-mode. That's me: org-babel-python-mode's value is python, so it's no wonder it's broken given what Eric says. I'm on emacs 24.3.50 where there is python.el but no python-mode.el. I tried the cheap workaround of switching the value to python-mode, but that does a (require 'python-mode) somewhere, so that option is out as well. I'm on Emacs 24.3.1 and have no python-mode.el, either (only python.el). My setup is working correctly (again, with the caveat of not having named sessions). It sounds like we have the same setup, and the following un-named session example does not work for me. The first code block evaluates successfully, but it doesn't appear to be having any impact on the default session (e.g., in the *Python* buffer). Returns the value of x as expected. #+begin_src python :session x = 1 return x #+end_src #+RESULTS: : 1 #+begin_src python :session return x #+end_src #+RESULTS: The second code block /should/ have access to the x variable defined previous, but instead it throws an error because x is undefined. Currently I'd say session support for python is completely broken. As of this morning I've joined the it does not work crowd. Python sessions worked for me last week, but are now completely broken for me in the way Eric and others describe. Best, Ista -- Eric Schulte http://cs.unm.edu/~eschulte
Re: [O] python sessions
On Mon, Mar 25, 2013 at 1:41 PM, John Hendy jw.he...@gmail.com wrote: On Mon, Mar 25, 2013 at 12:27 PM, Andreas Röhler andreas.roeh...@easy-emacs.de wrote: Am 25.03.2013 17:43, schrieb Eric Schulte: John Hendy jw.he...@gmail.com writes: On Mon, Mar 25, 2013 at 11:01 AM, Ista Zahn istaz...@gmail.com wrote: On Mon, Mar 25, 2013 at 11:40 AM, Eric Schulte schulte.e...@gmail.com wrote: John Hendy jw.he...@gmail.com writes: On Sun, Mar 24, 2013 at 9:38 PM, Nick Dokos nicholas.do...@hp.com wrote: Eric Schulte schulte.e...@gmail.com wrote: From participating in evaluating code throughout the discussion and catching the comments throughout, I'd say yes, at least in terms of how other babel languages function. In other words =#+begin_src R :session foo= creates an R session named foo whereas doing the same with =python= instead of =R= does not yield a named session. From what others experienced, however, the functionality was working correctly (results were persistent across blocks and two differently names blocks created two different sessions), just not named correctly. See the cond form starting at line 169 in ob-python.el. Different session functionality is used based on the `org-babel-python-mode' variable, and on the version of Emacs in use (prior to 24.1 or not). The branch taken when `org-babel-python-mode' equals 'python is certainly broken, as it never saves the name of the newly created buffer, so session re-use and use of multiple named sessions probably works only when `org-babel-python-mode' equals 'python-mode. That's me: org-babel-python-mode's value is python, so it's no wonder it's broken given what Eric says. I'm on emacs 24.3.50 where there is python.el but no python-mode.el. I tried the cheap workaround of switching the value to python-mode, but that does a (require 'python-mode) somewhere, so that option is out as well. I'm on Emacs 24.3.1 and have no python-mode.el, either (only python.el). My setup is working correctly (again, with the caveat of not having named sessions). It sounds like we have the same setup, and the following un-named session example does not work for me. The first code block evaluates successfully, but it doesn't appear to be having any impact on the default session (e.g., in the *Python* buffer). Returns the value of x as expected. #+begin_src python :session x = 1 return x #+end_src #+RESULTS: : 1 #+begin_src python :session return x #+end_src #+RESULTS: The second code block /should/ have access to the x variable defined previous, but instead it throws an error because x is undefined. Currently I'd say session support for python is completely broken. As of this morning I've joined the it does not work crowd. Python sessions worked for me last week, but are now completely broken for me in the way Eric and others describe. Interesting... checked out back to that commit (eff59a15d76647ce8282626b9eb463dc3706d56e) and it still doesn't work. On a whim, I checked my pacman log (Arch's install system) and coincidentally on Mar 20 /after/ I wrote that post in which things work, I ran a system package update. $ grep -i emacs /var/log/pacman.log [2013-03-20 12:51] upgraded emacs (24.2-4 - 24.3-1) Using the Arch Rollback Machine, I downloaded Emacs 24.2.4 and downgraded (also required downgrading imageMagick from 6.8.3.10 - 6.8.2.3). Now it works again (refer to the reproducible example from the mailing list post): - http://www.mail-archive.com/emacs-orgmode@gnu.org/msg68238.html Eric, your example fails for me. I get: Yes, because my example only works in external (non session) execution with the current buggy code, where as your example works with session execution in the old working code. x = 1 return x File stdin, line 1 SyntaxError: 'return' outside function This works, hoever: #+begin_src python :session x = 1 x #+end_src #+RESULTS: : 1 #+begin_src python :session x #+end_src #+RESULTS: : 1 So, with emacs 24.2.4 and current Org-mode (pulled just now) and clean make, *both* named and un-named sessions work for me on Arch Linux. Aha! Thanks for sleuthing this out. So the problem lies in changes to the python.el distributed with Emacs. I don't suppose we can ask whoever made these changes to python.el to fix the breakage they've caused in Org-mode? Thanks, Please give me some time still to investigate. Still doubt it's python.el But if yes, probably will be able to tell more. Possibly, but know that for me it works with one Emacs version and not another, both using the same git version of Org and same minimal config/setup/test file. Perhaps those affected here should post their Emacs versions? Worked for me last week with emacs 24.2.1 and org 8.0-pre (release_8.0-pre-54-gb5a853. Not working now with emacs 24.3.1 and org 8.0-pre
Re: [O] Examples of orgmode+beamer presentations?
I'm not clear on whether you are looking for templates or examples, but if the later, maybe my slides at http://projects.iq.harvard.edu/rtc/event/introduction-r will be of some interest. Scroll down to the bottom and download the .zip file. The rintro.pdf is the beamer export of the rintro.org file. HTH, Ista On Mon, Apr 15, 2013 at 11:18 AM, Angel de Vicente ang...@iac.es wrote: Hi, I'm trying to find examples of presentations made with orgmode and beamer. Ideally I would like to see sample presentations first (in PDF), so that I can get one that looks as close to what I would need, and then I would like to get the source code for it. Are there any good templates out there? (Something similar to http://draketo.de/light/english/politics-and-free-software/recipes-presentations-beamer-latex-using-emacs-org-mode, but hopefully with more options). Is there anything out there? Thanks, -- Ángel de Vicente http://angel-de-vicente.blogspot.com/
Re: [O] [RFC] BibELTeX: native bibtex support in org-mode
On Wed, Jun 12, 2013 at 6:48 AM, Rüdiger Sonderfeld ruedi...@c-plusplus.de wrote: Rasmus rasmus at gmx.us writes: Rüdiger Sonderfeld ruediger at c-plusplus.de writes: I've started writing BibELTeX as an alternative to =ox-bibtex.el=. https://github.com/ruediger/bibeltex Would you consider providing a test file showing off its features? I added a file test/example.org. Put bibeltex.el somewhere in your load-path and require it. This should be enough to make it work (use unload-feature to remove it again). You can then export the document to any format you like. Good test case is using org-mode export (ox-org.el). Thank you for this, I've been waiting for this capability a long time. I look forward to giving it a more through test! Best, Ista I'm skeptical but probably it is 'cause I've misunderstood something! Someone put a lot of thought into writing e.g. biblatex or odt-bibliographies. Surely(?) we would want to leverage upon those and only have org-support insofar as serving some backend-specific parser enough information to do its work? Certainly. BibELTeX is designed to do this. For LaTeX export it just generates the corresponding LaTeX instructions (can be adopted even for biblatex). But except for LaTeX there doesn't seem to be a real support for bibliography. It can be simulated for html using bibtex2html (ox-bibtex.el). But even that is not compatible with biber/biblatex. That's the reason behind BibELTeX. Regards
[O] ox-bibtex in contrib?
Hi all, I have org-plus-contrib installed using elpa from http://orgmode.org/elpa/, but this doesn't seem to include ox-bibtex.el. Should it? Or does this need to be installed separately? Thanks, Ista
Re: [O] BUG?: BABEL - Release 8.2
I observe the same behavior with org installed from elpa/org-plus-contrib-20130916. Best, Ista On Sat, Sep 21, 2013 at 9:54 AM, Rainer M Krug rai...@krugs.de wrote: Just to reiterate - is this only me or others as well? I consider this as a serious problem, as it can result in loss of data. If it is only me, I have to dig deeper into my config. Cheers, Rainer Rainer M Krug rai...@krugs.de writes: Carsten Dominik carsten.domi...@gmail.com writes: Hi everyone, I have just released version 8.2 of Org mode. This is rather a minor release, mainly designed to do some stabilization and cleanup before the merge into Emacs. Bastien will do this next week (?). Just upgraded, to 8.2 and I found a bug: When starting to edit a code block via C-c ' everything works as expected and the code block is highlighted and an indirect buffer is opened. When I click into the highlighted block, I an send to the indirect buffer. This behavior changes, after saving with C-s, even when nothing has been edited: the area in the original org file looses its magic, and looks normal again and can also be edited! he indirect buffer stays functional and, upon close vie C-c ' saves the changes into the original buffer and overwrites changes done in this block. Can somebody please confirm? Rainer #secure method=pgpmime mode=sign -- Rainer M. Krug email: RMKrugatgmaildotcom
Re: [O] Problem with beamer export
Any chance the fix can be pushed out to http://orgmode.org/elpa/? Thanks, Ista On Mon, Oct 7, 2013 at 11:09 AM, Nicolas Goaziou n.goaz...@gmail.comwrote: Hello, Marvin Doyley marvin...@gmail.com writes: I just updated to Org 8.2.1 and for some reason when I export a frame I get \subsection{Title} rather than \begin{frame}{Title} \end{frame} Is this a bug or am I doing something wrong ? This is a bug I introduced recently. It should now be fixed. Thank you for reporting it. Regards, -- Nicolas Goaziou
Re: [O] Beamer export: one question and one bug
On Mon, Oct 28, 2013 at 10:13 AM, Nick Dokos ndo...@gmail.com wrote: Jarmo Hurri jarmo.hu...@syk.fi writes: Greetings again. 1. First the question: when I export the org file below as Beamer (C-c C-e l O), I get an empty outline. How do I fix this? Seems to work fine for me with the older version that I was running, but I upgraded to latest and I get the beamer presentation I expected. I think I posed my initial question in a way that begs for a misunderstanding. When I export the file as Beamer, I get a title page, two slides _and_ an empty outline. Maybe someone interpreted my initial question to mean that I get _only_ an empty outline. I would like for the titles of the slides to appear in the outline. How do I achieve this? (I know that I can get rid of the outline by setting toc:nil.) Ah, indeed I misunderstood. AFAIK, toc-entries are created by \section{...} and the beamer exporter does not add \section headers - there might be a way to do that but I don't know it. Set '#OPTIONS: H:2', then top level headlines become sections (and are listed in the table of contents) and second-level headlines become the frames. For example: #+TITLE: Beamer test #+OPTIONS: ':nil *:t -:t ::t :t H:2 \n:nil ^:t arch:headline #+OPTIONS: author:t c:nil creator:comment d:(not LOGBOOK) date:t e:t #+OPTIONS: email:nil f:t inline:t num:t p:nil pri:nil prop:nil stat:t #+OPTIONS: tags:t tasks:t tex:t timestamp:t toc:t todo:t |:t #+CREATOR: Emacs 24.2.1 (Org mode 8.2.1) #+DESCRIPTION: #+EXCLUDE_TAGS: noexport #+KEYWORDS: #+LANGUAGE: en #+SELECT_TAGS: export * This is the first section ** This is the first slide - with some fancy text * This is the second section ** And this is the second slide - with one commented item... # - ... containing a [[https://www.google.com/#q%3Dorg%2Bmode][link]] that will amaze the reader Best, Ista There also might be a beamer way of having frames add their title to the TOC without \section help, but again I don't know whether that's possible. Nick
Re: [O] Beamer export: one question and one bug
On Sun, Nov 3, 2013 at 5:06 AM, Jarmo Hurri jarmo.hu...@syk.fi wrote: Greetings. Set '#OPTIONS: H:2', then top level headlines become sections (and are listed in the table of contents) and second-level headlines become the frames. Yep, that will happen. However, the original idea was to get frame headlines into the table of contents. As far as I know this is a beamer design decision. The idea seems to be that if your presentation is short enough that the individual frame titles would fit in a table of contents then you don't actually need one; see the beamer user guide at http://ctan.mackichan.com/macros/latex/contrib/beamer/doc/beameruserguide.pdf. Best, Ista In order to achieve this I would have to have H:2 and repeat the frame title as follows: # #+TITLE: Beamer test #+OPTIONS: ':nil *:t -:t ::t :t H:2 \n:nil ^:t arch:headline #+OPTIONS: author:t c:nil creator:comment d:(not LOGBOOK) date:t e:t #+OPTIONS: email:nil f:t inline:t num:t p:nil pri:nil prop:nil stat:t #+OPTIONS: tags:t tasks:t tex:t timestamp:t toc:t todo:t |:t #+CREATOR: Emacs 24.2.1 (Org mode 8.2.1) #+DESCRIPTION: #+EXCLUDE_TAGS: noexport #+KEYWORDS: #+LANGUAGE: en #+SELECT_TAGS: export * This is the first slide ** This is the first slide - with some fancy text * And this is the second slide ** And this is the second slide - with one commented item... # The output is correct, but requires duplication of information, which is practically always a bad idea. Jarmo
[O] Exporting markdown specific string
Hi all, I'm trying to figure out how to export a line (say foo) only when exporting to markdown. For latex there is '#+LATEX: foo' and for html there is '#+HTML: foo' but neither '#+MD: foo' nor '#+MARKDOWN: foo' does the trick. Of course '#+HTML: foo' exports foo to markdown since the markdown exporter is derived from the html exporter. But I'd really like to include stuff in the markdown export that does not also get included in the html export. Suggestions? I'm using org-plus-contrib: Org-mode version 8.2.4 (8.2.4-18-g4ee7e6-elpaplus) installed using M-x install-packages. Thanks, Ista
Re: [O] Exporting markdown specific string
On Sat, Jan 4, 2014 at 1:40 PM, Charles Berry ccbe...@ucsd.edu wrote: Bastien bzg at gnu.org writes: Charles Berry ccberry at ucsd.edu writes: No it won't. ox-md.el does not define a transcoder for keyword and falls back to its parent: Thanks. I just added this transcoder to the master branch. Looking at org-md-export-block shouldn't it export HTML export blocks as well, since markdown allows literal html? Yes, and as far as I can tell it does. But as I explained in my original question I want certain text exported to markdown but not to html. Best, Ista HTH, Chuck
[O] Export each top level heading to separate file
Hi all, I'm looking for a way to export each top-level heading to a separate markdown file. Ideally I would like to have the exported files named according to the heading. For example I would like this org file --- * Section one Section one text * Section two ** Section two a Section two text * Section three Section three text --- To generate three files: --- Section one.md --- Section one text --- --- Section two.md--- ## Section two a Section two text --- --- Section three.md - # Section three Section three text --- I suspect that the publishing framework might support this, but I've thus far avoided it because it looks pretty complicated to set up. Before I dive in I'd like to know if the publishing framework is the correct place to look for this functionality or if there is an easier way to do it. Thanks, Ista
Re: [O] Export each top level heading to separate file
On Sat, Jan 4, 2014 at 6:41 PM, Alan L Tyree alanty...@gmail.com wrote: On 05/01/14 09:45, Charles Millar wrote: Ista and all, On 1/4/2014 5:29 PM, Ista Zahn wrote: Hi all, I'm looking for a way to export each top-level heading to a separate markdown file. Ideally I would like to have the exported files named according to the heading. For example I would like this org file --- * Section one Section one text * Section two ** Section two a Section two text * Section three Section three text --- To generate three files: --- Section one.md --- Section one text --- --- Section two.md--- ## Section two a Section two text --- --- Section three.md - # Section three Section three text --- I suspect that the publishing framework might support this, but I've thus far avoided it because it looks pretty complicated to set up. Before I dive in I'd like to know if the publishing framework is the correct place to look for this functionality or if there is an easier way to do it. I have a similar question regarding LaTeX export. How to export a heading (any heading, regardless of level) within a file to heading.tex instead of file.tex? So far the only solution I have cobbled together is to C-x C-f 'file.tex and then C-x C-w heading.tex . I then typeset heading.tex using TeXworks. Perhaps I should note that my exported heading is tagged so that the heading is ignored. Charlie Millar --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com Use properties to set the export file name -- example: :PROPERTIES: :EXPORT_TITLE: Internet banking fraud :EXPORT_FILE_NAME: internet-fraud :EXPORT_AUTHOR: Alan L Tyree :Citation: (2011) 22 JBFLP 214 :EXPORT_OPTIONS: num:nil toc:nil :END: Thanks, gets me half the way there. Setting properties as you described and exporting each sub-tree works properly. Now how can I do this for all the top-level headings in a file? Best, Ista If I understood your question properly. Cheers, Alan -- Alan L Tyreehttp://www2.austlii.edu.au/~alan Tel: 04 2748 6206 sip:typh...@iptel.org
Re: [O] Export each top level heading to separate file
On Sun, Jan 5, 2014 at 8:40 AM, John Kitchin jkitc...@andrew.cmu.edu wrote: Try this: (org-map-entries (lambda () (let ((level (nth 1 (org-heading-components))) (title (nth 4 (org-heading-components (if (= level 1) (org-entry-put (point) :EXPORT_FILE_NAME: title nil nil) It seems to do what you want. Dear John, Thank you thank you! Using your code as I template I managed to write a function that does what I wanted: (defun my-exp-headings-to-markdown () Export each top-level heading to markdown. (interactive) (org-map-entries (lambda () (let ((level (nth 1 (org-heading-components))) (title (nth 4 (org-heading-components (if (= level 1) (org-entry-put (point) EXPORT_FILE_NAME title)) (if (= level 1) (org-md-export-to-markdown nil 1 nil nil nil)) Note that I had to remove the : from the second argument to org-entry-put to get it working properly on my system. Not sure if that was a bug in your original example or not. Best, Ista John --- John Kitchin Associate Professor Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 http://kitchingroup.cheme.cmu.edu On Sat, Jan 4, 2014 at 7:36 PM, Ista Zahn istaz...@gmail.com wrote: On Sat, Jan 4, 2014 at 6:41 PM, Alan L Tyree alanty...@gmail.com wrote: On 05/01/14 09:45, Charles Millar wrote: Ista and all, On 1/4/2014 5:29 PM, Ista Zahn wrote: Hi all, I'm looking for a way to export each top-level heading to a separate markdown file. Ideally I would like to have the exported files named according to the heading. For example I would like this org file --- * Section one Section one text * Section two ** Section two a Section two text * Section three Section three text --- To generate three files: --- Section one.md --- Section one text --- --- Section two.md--- ## Section two a Section two text --- --- Section three.md - # Section three Section three text --- I suspect that the publishing framework might support this, but I've thus far avoided it because it looks pretty complicated to set up. Before I dive in I'd like to know if the publishing framework is the correct place to look for this functionality or if there is an easier way to do it. I have a similar question regarding LaTeX export. How to export a heading (any heading, regardless of level) within a file to heading.tex instead of file.tex? So far the only solution I have cobbled together is to C-x C-f 'file.tex and then C-x C-w heading.tex . I then typeset heading.tex using TeXworks. Perhaps I should note that my exported heading is tagged so that the heading is ignored. Charlie Millar --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com Use properties to set the export file name -- example: :PROPERTIES: :EXPORT_TITLE: Internet banking fraud :EXPORT_FILE_NAME: internet-fraud :EXPORT_AUTHOR: Alan L Tyree :Citation: (2011) 22 JBFLP 214 :EXPORT_OPTIONS: num:nil toc:nil :END: Thanks, gets me half the way there. Setting properties as you described and exporting each sub-tree works properly. Now how can I do this for all the top-level headings in a file? Best, Ista If I understood your question properly. Cheers, Alan -- Alan L Tyreehttp://www2.austlii.edu.au/~alan Tel: 04 2748 6206 sip:typh...@iptel.org
Re: [O] Export each top level heading to separate file
On Sun, Jan 5, 2014 at 4:56 PM, John Kitchin jkitc...@andrew.cmu.edu wrote: hmm.. I don't know if it was a bug, I ran the code on my system before sending it, and it worked for me ;) Your original code ran for me as well, but it inserted '::EXPORT_FILE_NAME::' where it should be just ':EXPORT_FILE_NAME:' I am glad you figured it out on your system. you could avoid the double if statements like this: (defun my-exp-headings-to-markdown () Export each top-level heading to markdown. (interactive) (org-map-entries (lambda () (let ((level (nth 1 (org-heading-components))) (title (nth 4 (org-heading-components (when (= level 1) (org-entry-put (point) EXPORT_FILE_NAME title) (org-md-export-to-markdown nil 1 nil) nil nil)) Great, thanks! Best, Ista The when macro is like an if macro, with no else body. John --- John Kitchin Associate Professor Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 http://kitchingroup.cheme.cmu.edu On Sun, Jan 5, 2014 at 2:49 PM, Ista Zahn istaz...@gmail.com wrote: On Sun, Jan 5, 2014 at 8:40 AM, John Kitchin jkitc...@andrew.cmu.edu wrote: Try this: (org-map-entries (lambda () (let ((level (nth 1 (org-heading-components))) (title (nth 4 (org-heading-components (if (= level 1) (org-entry-put (point) :EXPORT_FILE_NAME: title nil nil) It seems to do what you want. Dear John, Thank you thank you! Using your code as I template I managed to write a function that does what I wanted: (defun my-exp-headings-to-markdown () Export each top-level heading to markdown. (interactive) (org-map-entries (lambda () (let ((level (nth 1 (org-heading-components))) (title (nth 4 (org-heading-components (if (= level 1) (org-entry-put (point) EXPORT_FILE_NAME title)) (if (= level 1) (org-md-export-to-markdown nil 1 nil nil nil)) Note that I had to remove the : from the second argument to org-entry-put to get it working properly on my system. Not sure if that was a bug in your original example or not. Best, Ista John --- John Kitchin Associate Professor Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 http://kitchingroup.cheme.cmu.edu On Sat, Jan 4, 2014 at 7:36 PM, Ista Zahn istaz...@gmail.com wrote: On Sat, Jan 4, 2014 at 6:41 PM, Alan L Tyree alanty...@gmail.com wrote: On 05/01/14 09:45, Charles Millar wrote: Ista and all, On 1/4/2014 5:29 PM, Ista Zahn wrote: Hi all, I'm looking for a way to export each top-level heading to a separate markdown file. Ideally I would like to have the exported files named according to the heading. For example I would like this org file --- * Section one Section one text * Section two ** Section two a Section two text * Section three Section three text --- To generate three files: --- Section one.md --- Section one text --- --- Section two.md--- ## Section two a Section two text --- --- Section three.md - # Section three Section three text --- I suspect that the publishing framework might support this, but I've thus far avoided it because it looks pretty complicated to set up. Before I dive in I'd like to know if the publishing framework is the correct place to look for this functionality or if there is an easier way to do it. I have a similar question regarding LaTeX export. How to export a heading (any heading, regardless of level) within a file to heading.tex instead of file.tex? So far the only solution I have cobbled together is to C-x C-f 'file.tex and then C-x C-w heading.tex . I then typeset heading.tex using TeXworks. Perhaps I should note that my exported heading is tagged so that the heading is ignored. Charlie Millar --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com Use properties to set the export file name -- example: :PROPERTIES: :EXPORT_TITLE: Internet banking fraud :EXPORT_FILE_NAME: internet-fraud :EXPORT_AUTHOR: Alan L Tyree :Citation: (2011) 22 JBFLP 214 :EXPORT_OPTIONS: num:nil toc:nil :END: Thanks, gets me half the way there. Setting properties as you described and exporting each sub-tree works properly. Now how can I do this for all
Re: [O] No ODT export option
Hi Ken, ODT export isn't enabled by default. You can enable it by putting (require 'ox-odt) in your config file and restart emacs. Best, Ista On Fri, Jan 10, 2014 at 11:23 AM, Ken Mankoff mank...@gmail.com wrote: Hi, I'd like to export to ODT or even directly to DOC. But I notice I do not have an ODT export option. Can someone help me set this up? I'm running org-20140107/ from ELPA on OS X in the emacs 24.3 (emacsformacosx distribution from http://emacsformacosx.com/). In my ELPA folder I see: $ find . | grep -i odt ./org-20140107/etc/styles/OrgOdtContentTemplate.xml ./org-20140107/etc/styles/OrgOdtStyles.xml ./org-20140107/ox-odt.el ./org-20140107/ox-odt.elc But when I'm in emacs in org-mode and I do ESC-x apropos org-odt and examine org-odt-data-dir the content of that variable are /usr/share/emacs/etc/org which does not exist. Any help for ODT (and/or DOC) much appreciated. FYI I also have LibreOffice installed which is how I will view the ODT files, and/or do the DOC conversion if I can't get that straight from org. Thank you, Ken Mankoff
Re: [O] link interfering with brackets when abbreviated
Another user here, chiming in to support Nicolas's position. From my perspective orgmode is so vast and complicated that the number one thing we need (even from a user perspective) is predictability. I'd rather see minor conveniences removed in favor of a constancy and a logical interface. Best, Ista On Sun, Mar 2, 2014 at 4:16 PM, Gustav Wikström gustav.e...@gmail.com wrote: Hi, a user signing in. Although not involved in the development of this piece of software I'm taking the opportunity to chime in anyway. I'd like to give Nicolas Goaziou my support in this issue. It makes it much simpler to understand, use, develop and maintain the software if it is congruent. A well defined syntax, and tools that respect the rules of how to parse it, will IMO be of big importance moving forward. About the issue of two links on the same line.. From my perspective (for what it's worth); Trying to open a link when not being inside a link with the mark should give the same behaviour as trying to open a link when on a headline. It is not certain which link is intended to be opened, so why not give the user the options available instead of guessing? Set the scope to parse to the current paragraph, to make a difference from calling C-c C-o from the headline. That, to me, is the intuitive behaviour. About the issue of links in comments (My opinion, for what it's worth): It's a comment.. Expect it to behave as one. Worst case: copy the link and paste it in the browser. About the issue of links in properties: Wouldn't it be nice to allow this? Maybe a future functionality to consider? Best regards Gustav Wikström
Re: [O] Exporting LaTeX source blocks with HTML backend
Hi Xavier, I think #+begin_src latex :results drawer :exports results \begin{align*} x=x\\ y=y \end{align*} #+end_src will give both syntax highlighting (in the code block) as well as properly displayed equations in both latex and html export. Best, Ista On Mon, Mar 3, 2014 at 2:39 PM, Xavier Garrido xavier.garr...@gmail.com wrote: Hi Richard, Le 03/03/2014 20:24, Richard Lawrence a écrit : I am facing one issue when I am exporting from orgmode to html. I like to write LaTeX code within #+BEGIN_SRC latex ... #+END_SRC block mainly to take benefit/advantage of the syntax highlighting (debugging long LaTeX equations is simpler). The problem is that these code blocks are not exported at all by the html export backend whereas the LaTeX backend does. Of course, an easy solution will be to remove the #+BEGIN_SRC/#+END_SRC lines and both latex and html exporters will just do it right. But, as I said, syntax highlighting is really useful and I can't imagine living without it. I don't quite understand what you're looking for here. Are you wanting these blocks to be exported as source code? Or do you want them to be interpreted somehow? I would like to get them interpreted as raw LaTeX code in such way MathJax can reinterpret them as you said. Removing the BEGIN_SRC/END_SRC lines will just result in raw LaTeX code getting dumped into your HTML, and a browser won't know what to do with that (at least not without help...are you wanting MathJax to interpret it?). As a summary I would like to do the following #+BEGIN_SRC org * Test LaTeX block Syntax highlighting is always nice but the following block is not exported in html. An option will be to remove the #+BEGIN_SRC latex/#+END_SRC lines #+BEGIN_SRC latex \begin{align*} x=x\\ y=y \end{align*} #+END_SRC When I export this using the HTML exporter, the LaTeX code is wrapped in a div with class=org-src-container, and the actual code appears inside a pre tag. Is this the behavior you see? Is that not what you want? In my case, the code is not even wrapped into org-src-container class, it just does not appear at all. If you are instead looking to get something in your HTML output that looks like the result of compiling the LaTeX code, I am not exactly sure how to accomplish this, but it looks like there is some useful information in the section Math formatting in HTML export in the Org manual about either using MathJax or preprocessing LaTeX code into images with dvipng. Actually, I just want to get the LaTeX code translated into raw code. As I wrote, there is one solution, pretty easy to implement and may be used by most of the org users : write raw LaTeX inside org document and use MathJax for example, to interpret it in a convenient way. It is going to work for both exporter html and latex. The point here is that using raw LaTeX code makes me lose the syntax highlighting which is really useful for debugging long LaTeX equation. Cheers, Xavier Hope that helps, Richard (If possible, please encrypt your reply to me using my PGP key: Key ID: CF6FA646 Fingerprint: 9969 43E1 CF6F A646. See http://www.ocf.berkeley.edu/~rwl/encryption.html for more information.)
[O] Bug: New exporter fails with void-function org-clocking-buffer [7.9.2 (release_7.9.2-532-g2e8591)]
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. Here is what I did: 1. Update to latest git version 2. Start emacs with emacs -Q -l ~/test.el (test.el attached) 3. Create minimal org file, e.g., #+title: test * Heading 1 * Heading 2 4. Export with M-x org-export-dispatch t a What happened: fails with void-function org-clocking-buffer. What I expected: buffer is exported to text file. Emacs : GNU Emacs 24.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.6.1) of 2012-10-21 on eric Package: Org-mode version 7.9.2 (release_7.9.2-532-g2e8591 @ /home/izahn/.emacs.d/izahn/org-mode/lisp/) current state: == (setq org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code) org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-occur-hook '(org-first-headline-recenter) org-metaup-hook '(org-babel-load-in-session-maybe) org-export-preprocess-before-normalizing-links-hook '(org-remove-file-link-modifiers) org-confirm-shell-link-function 'yes-or-no-p 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-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-after-todo-state-change-hook '(org-clock-out-if-current) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-babel-pre-tangle-hook '(save-buffer) org-mode-hook '(#[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) org-export-with-tags t org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-hide-inline-tasks org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-export-latex-format-toc-function 'org-export-latex-format-toc-default org-export-first-hook '(org-beamer-initialize-open-trackers) org-export-with-drawers t org-confirm-elisp-link-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) ) test.el Description: Binary data
[O] Source block processing changes
Hi all, I've been silently suffering since the changes to source block processing announced at the end of September[1]. I had been using (abusing?) ':results org' to write results that would be processed as orgmode syntax and exported to both latex and html. For example, this #+name: tst #+begin_src R :results output org :exports results library(ascii) cat(* First ten\n) print(ascii(head(mtcars)), type=org) cat(\n* Last ten\n) print(ascii(tail(mtcars)), type=org) #+end_src used to give me heading First ten followed by a table nicely formatted in html or latex depending on the export target, followed by a heading Last ten, again followed by a nicely formatted table. Changing the data or the code in the block would update the contents. This was very convenient, and I relied heavily on this to generate reports. Now it seems that this very useful feature no longer exists, and try as I might I cannot find a way to duplicate it. Using ':results drawer' or ':results org' gives me verbatim export (i.e., * First ten is not converted to a headline, but displayed in highlighted syntax similar to the way it appears in the buffer. The only way I can get the headlines and tables to be exported properly is to set ':results raw', but then I get duplicate results every time I evaluate the R source block. I understand from the original announcement that #+begin org / #+end org blocks don't really make sense because these kind of blocks correspond to backends, and there is no org backend, but it was very useful. Is there any way to produce the old behavior in the current development version of org? If not, what are the chances of this very useful functionality being re-implemented? Thanks, Ista [1] http://lists.gnu.org/archive/html/emacs-orgmode/2012-09/msg01230.html
Re: [O] Source block processing changes
Thank you Nicolas for your quick response! On Mon, Nov 5, 2012 at 12:25 PM, Nicolas Goaziou n.goaz...@gmail.com wrote: Hello, Ista Zahn istaz...@gmail.com writes: The only way I can get the headlines and tables to be exported properly is to set ':results raw', but then I get duplicate results every time I evaluate the R source block. You can use :cache yes in order to avoid duplicating results. I gave up on using ':cache yes' a long time ago -- the problem is that results don't update when the input data changes, as I describe here: http://lists.gnu.org/archive/html/emacs-orgmode/2010-09/msg01152.html Is there any way to produce the old behavior in the current development version of org? Besides using :results raw? Yes, so that evaluating the result multiple times does not produce duplicate output, while re-evaluating if the input data changes. You may also generate a file containing your results and include it in the buffer. This does work, but has the drawback that I can't see the output in my main org buffer. This is one of the things that drew me away from Sweave/Knitr, i.e., I could see both the code and the results in the same buffer, without having to compile the document or switch to another buffer. If not, what are the chances of this very useful functionality being re-implemented? I'd like to avoid re-implementing this hack, if possible. But if it had to be done, I think it would require to treat specially begin_org blocks during export by replacing them with their contents just before parsing (i.e. just after included files have been expanded). Hence, #+begin_src org ,* Headline #+end_src would become * Headline just before parser kicks in. But, again, let's see first if no solution can be found without creating yet another special case. Yes, of course. Thanks again for considering my use-case! Best, Ista Regards, -- Nicolas Goaziou
Re: [O] Source block processing changes
On Tue, Nov 6, 2012 at 8:22 AM, Eric Schulte schulte.e...@gmail.com wrote: Ista Zahn istaz...@gmail.com writes: Hi all, I've been silently suffering since the changes to source block processing announced at the end of September[1]. I had been using (abusing?) ':results org' to write results that would be processed as orgmode syntax and exported to both latex and html. For example, this #+name: tst #+begin_src R :results output org :exports results library(ascii) cat(* First ten\n) print(ascii(head(mtcars)), type=org) cat(\n* Last ten\n) print(ascii(tail(mtcars)), type=org) #+end_src used to give me heading First ten followed by a table nicely formatted in html or latex depending on the export target, followed by a heading Last ten, again followed by a nicely formatted table. Changing the data or the code in the block would update the contents. This was very convenient, and I relied heavily on this to generate reports. Now it seems that this very useful feature no longer exists, and try as I might I cannot find a way to duplicate it. Using ':results drawer' or ':results org' gives me verbatim export This was a bug in :results drawer, which should *not* escape its results. I've just pushed up a fix for this so :results drawer should now be a drop-in replacement for your previous use-case of :results org (as was the original intent of this change). Thank you, all is working as desired now! One small niggle: the '::RESULTS:' and ':END:' strings are included in the exported html. Not sure if this is intentional, but it seems to me that they should be removed (or at lease given a class so we can hide them via css) Thanks again! Ista Best, -- Eric Schulte http://cs.unm.edu/~eschulte
Re: [O] Source block processing changes
On Tue, Nov 6, 2012 at 11:44 AM, Nicolas Goaziou n.goaz...@gmail.com wrote: Ista Zahn istaz...@gmail.com writes: Thank you, all is working as desired now! One small niggle: the '::RESULTS:' and ':END:' strings are included in the exported html. Not sure if this is intentional, but it seems to me that they should be removed (or at lease given a class so we can hide them via css) That's because you're inserting a headline within a drawer, which isn't valid Org syntax. You cannot use a drawer for your specific use-case. Well, it works at the moment (I can live with the extra ':RESULTS:' strings). So currently I _can_ use a drawer for my use case -- the question is whether this is likely to break in the future. Another question is what is and is not allowed in a drawer? Is this documented? Best, Ista Regards,
Re: [O] Source block processing changes
On Tue, Nov 6, 2012 at 12:16 PM, Nicolas Goaziou n.goaz...@gmail.com wrote: Ista Zahn istaz...@gmail.com writes: On Tue, Nov 6, 2012 at 11:44 AM, Nicolas Goaziou n.goaz...@gmail.com wrote: Ista Zahn istaz...@gmail.com writes: Thank you, all is working as desired now! One small niggle: the '::RESULTS:' and ':END:' strings are included in the exported html. Not sure if this is intentional, but it seems to me that they should be removed (or at lease given a class so we can hide them via css) That's because you're inserting a headline within a drawer, which isn't valid Org syntax. You cannot use a drawer for your specific use-case. Well, it works at the moment (I can live with the extra ':RESULTS:' strings). So currently I _can_ use a drawer for my use case -- the question is whether this is likely to break in the future. This is already broken. In Org syntax, :RESULTS: * Headline :END: means a paragraph containing :RESULTS: text, then an headline containing a section with a paragraph containing :END: text. In other words, headlines have precedence over drawers. Expecting Org to recognize a drawer here is like playing with fire. You cannot know when it will burn you. Another question is what is and is not allowed in a drawer? Is this documented? A drawer can contain anything but a headline and another drawer. OK, great. The ability to generate headlines from source blocks is not crucial, I'll change them to plain lists. I'm not talking about properties drawer which is special. This is not explicitly documented. Regards,
Re: [O] Source block processing changes
On Tue, Nov 6, 2012 at 8:22 AM, Eric Schulte schulte.e...@gmail.com wrote: Ista Zahn istaz...@gmail.com writes: Using ':results drawer' or ':results org' gives me verbatim export This was a bug in :results drawer, which should *not* escape its results. I've just pushed up a fix for this so :results drawer should now be a drop-in replacement for your previous use-case of :results org (as was the original intent of this change). I'm still getting escaped results with ':results drawer', unless I generate a headline, which Nicolas tells me is illegal. Can you take another look at this? Thanks! Ista Best, -- Eric Schulte http://cs.unm.edu/~eschulte
Re: [O] Source block processing changes
On Tue, Nov 6, 2012 at 12:48 PM, Ista Zahn istaz...@gmail.com wrote: On Tue, Nov 6, 2012 at 8:22 AM, Eric Schulte schulte.e...@gmail.com wrote: Ista Zahn istaz...@gmail.com writes: Using ':results drawer' or ':results org' gives me verbatim export This was a bug in :results drawer, which should *not* escape its results. I've just pushed up a fix for this so :results drawer should now be a drop-in replacement for your previous use-case of :results org (as was the original intent of this change). I'm still getting escaped results with ':results drawer', unless I generate a headline, which Nicolas tells me is illegal. Can you take another look at this? Clarification: ':results drawer' exports correctly using the new exporter (accessed through M-x org-export-dispatch). However, when exporting using the old exporter (C-c-e) the results drawer is escaped so that it is formatted as an example or source block. For example a buffer with this content #+name: setup #+begin_src emacs-lisp :results drawer :exports both (message hello world) #+end_src #+RESULTS: setup :RESULTS: hello world :END: exported to html with 'C-c-e h' gives me 'hello world' in a box with boarders and a gray rectangle. Exporting to html with 'M-x org-export-dispatch h h' gives me hello world as regular text. I guess this is the push I need to start using the new exporter! Best, Ista Thanks! Ista Best, -- Eric Schulte http://cs.unm.edu/~eschulte
[O] New exporter (org-e-odt) not creating content.xml
I can't seem to get the new odt exporter working on my Windows machine at work (it works fine on Linux at home). Specifically, when I call 'M-x export-dispatch o o' I get an odt archive with the following contents. M Filemode Length Date Time File - -- --- -- -rw-rw-rw-39 26-Nov-2012 17:31:16 mimetype drwxrwxrwx 0 26-Nov-2012 17:31:16 meta-inf/ -rw-rw-rw- 782 26-Nov-2012 17:31:16 meta.xml -rw-rw-rw- 66559 26-Nov-2012 17:31:16 styles.xml - -- --- -- 67380 4 files Comparing with the old exporter (i.e., 'C-e o') I find M Filemode Length Date Time File - -- --- - -rw-rw-rw-39 26-Nov-2012 17:31:00 mimetype -rw-rw-rw- 25556 26-Nov-2012 17:31:00 content.xml drwxrwxrwx 0 26-Nov-2012 17:31:00 meta-inf/ -rw-rw-rw- 573 26-Nov-2012 17:31:00 META-INF/manifest.xml -rw-rw-rw- 807 26-Nov-2012 17:31:00 meta.xml -rw-rw-rw- 67037 26-Nov-2012 17:31:00 styles.xml - -- --- - 94012 6 files So it seems that the new exporter is not creating content.xml, or META-INF/manifest.xml. Again this only happens on Windows. It is reproducible every time, and is reproducible starting with emacs -q and then loading only org and org-e-odt. Thanks for any suggestions, and please let me know what other information I can provide to make it easier for you to help me. Best, Ista
Re: [O] New exporter (org-e-odt) not creating content.xml
Hi all, On Tue, Nov 27, 2012 at 3:40 AM, Giovanni Ridolfi giovanni.rido...@yahoo.it wrote: Hi, Ista, Da: Ista Zahn istaz...@gmail.com Inviato: Lunedì 26 Novembre 2012 23:44 I can't seem to get the new odt exporter working on my Windows machine at work (it works fine on Linux at home). [...] So it seems that the new exporter is not creating content.xml, or META-INF/manifest.xml. Again this only happens on Windows. It is reproducible every time, and is reproducible starting with emacs -q and then loading only org and org-e-odt. Specifically, when I call 'M-x export-dispatch o o' I get an odt archive with the following contents. M Filemode Length Date Time File - -- --- -- -rw-rw-rw-39 26-Nov-2012 17:31:16 mimetype drwxrwxrwx 0 26-Nov-2012 17:31:16 meta-inf/ -rw-rw-rw- 782 26-Nov-2012 17:31:16 meta.xml -rw-rw-rw- 66559 26-Nov-2012 17:31:16 styles.xml - -- --- -- 67380 4 files Like Rainer I cannot reproduce. what is - your org-version ? 'M-org-version' produces Org-mode version N/A (N/A @ c:/Documents and Settings/IZAHN/.emacs.d/izahn/org-mode/lisp/) but this is orgmode from git, updated yesterday. - emacs version? GNU Emacs 24.2.1 (i386-mingw-nt5.1.2600) of 2012-08-28 on MARVIN - are you under cygwin ? I have cygwin installed, but emacs is the windows version from http://ftp.gnu.org/gnu/emacs/windows/ The OS is Windows XP professional with service pack 3. Here: Org-mode version 7.9.2 (d344fda @ GNU Emacs 24.2.1 (i386-mingw-nt6.1.7601) of 2012-08-29 on MARVIN Windows 7 with my .emacs: (require 'org) ... (require 'org-export) (require 'org-e-odt) I started emacs with emacs -q and evaluated the following lines with 'C-x-e': ;; Look recursively in .emacs.d for elisp files and packages (let ((default-directory ~/.emacs.d/)) (normal-top-level-add-to-load-path '(.)) (normal-top-level-add-subdirs-to-load-path)) ;; just to make sure... (mapc (lambda (path) (add-to-list 'load-path path)) '(~/.emacs.d/elpa/elnode-0.9.9 ~/.emacs.d/izahn/org-mode/lisp ~/.emacs.d/izahn/org-mode/contrib/lisp ~/.emacs.d/izahn/org-ehtml/src ~/.emacs.d/izahn/org-ehtml/test/lisp)) (require 'org) (require 'org-export) (require 'org-e-odt) I call with M-x export-dispatch 3 o o (3 is to select the subtree) I also tried selecting just the subtree, with the same results, i.e., no content.xml With this subtree: --- *** test test B /b/ *g* +Carsten+ test 2 hello --- *Message* buffer: Using vacuous schema Unknown LaTeX option. Forcing verbatim. Formatting LaTeX using verbatim Wrote c:/Users/. ./AppData/Local/Temp/odt-3456fvm/meta.xml Using schema c:/Users/. ./programs/emacs-o/org/etc/schema/od-schema-v1.2-cs01.rnc [2 times] Saving file c:/Users/. ./AppData/Local/Temp/odt-3456fvm/styles.xml... Wrote c:/Users/. ./AppData/Local/Temp/odt-3456fvm/styles.xml Wrote c:/Users/. ./AppData/Local/Temp/odt-3456fvm/mimetype Using vacuous schema Saving file c:/Users/. ./AppData/Local/Temp/odt-3456fvm/META-INF/manifest.xml... Wrote c:/Users/. ./AppData/Local/Temp/odt-3456fvm/META-INF/manifest.xml Saving file c:/Users/. ./AppData/Local/Temp/odt-3456fvm/content.xml... Wrote c:/Users/. ./AppData/Local/Temp/odt-3456fvm/content.xml (No changes need to be saved) Creating ODT file... Running c:/Users/. ./programs/zip/bin/zip -mX0 test.odt mimetype Running c:/Users/. ./programs/zip/bin/zip -rmTq test.odt . Created c:/Users/. ./AppData/Roaming/test.odt Parsing archive file...done. My *Messages* buffer shows Using vacuous schema OVERVIEW LaTeX to MathML converter not available. Formatting LaTeX using verbatim Wrote c:/DOCUME~1/IZAHN/LOCALS~1/Temp/odt-3688Mws/meta.xml Using schema ~/.emacs.d/izahn/org-mode/etc/schema/od-schema-v1.2-cs01.rnc [2 times] Saving file c:/Documents and Settings/IZAHN/Local Settings/Temp/odt-3688Mws/styles.xml... Wrote c:/Documents and Settings/IZAHN/Local Settings/Temp/odt-3688Mws/styles.xml Wrote c:/DOCUME~1/IZAHN/LOCALS~1/Temp/odt-3688Mws/mimetype Using vacuous schema Creating ODT file... Running zip -mX0 test.odt mimetype Running zip -rmTq test.odt . Created c:/Documents and Settings/IZAHN/Desktop/test.odt Parsing archive file...done. file test.odt: M Filemode Length Date Time File - -- --- - -rw-rw-rw-39 27-Nov-2012 09:23:16 mimetype -rw-rw-rw- 21823 27-Nov-2012 09:23:16 content.xml drwxrwxrwx 0 27-Nov-2012 09:23:16 meta-inf/ -rw-rw-rw- 573 27-Nov-2012 09:23:16 META-INF/manifest.xml -rw-rw-rw- 818 27-Nov-2012 09:23:16 meta.xml -rw-rw-rw- 66559 27-Nov-2012 09:23:16 styles.xml
Re: [O] New exporter (org-e-odt) not creating content.xml
Thank you, I'm currently working around this with ;; fix f'ed up windows temp directory (if (eq system-type 'windows-nt) (setq temporary-file-directory c:/tmp/) ) in my init.el, and odt export is now working as expected. Best, Ista On Tue, Nov 27, 2012 at 12:46 PM, Jambunathan K kjambunat...@gmail.com wrote: Jambunathan K kjambunat...@gmail.com writes: Ista Your suspicion is confirmed. If this is true, then either my understanding of `get-file-buffer' is incorrect or that `get-file-buffer' is buggy. Please let me know what I can do to help figure this out. I have filed a bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13013 Irrespective of what the Emacs maintainers feel about this issue, I will push a fix. (But fix will take couple of day's time to hit the repo.) To add to that As a temporary work around, you can also do M-x customize-variable RET temporary-file-directory RET and point in to some directory that doesn't have spaces or long names. With my (future) fix, the above customization may not be necessary. Jambunathan K.
Re: [O] New exporter (org-e-odt) not creating content.xml
On Wed, Nov 28, 2012 at 10:15 AM, Giovanni Ridolfi giovanni.rido...@yahoo.it wrote: Da: Ista Zahn istaz...@gmail.com Inviato: Martedì 27 Novembre 2012 15:55 I can't seem to get the new odt exporter working on my Windows machine at work (it works fine on Linux at home). [...] So it seems that the new exporter is not creating content.xml, or META-INF/manifest.xml. Again this only happens on Windows. It is reproducible every time, and is reproducible starting with emacs -q and then loading only org and org-e-odt. Specifically, when I call 'M-x export-dispatch o o' I get an odt archive with the following contents. M Filemode Length Date Time File - -- --- -- -rw-rw-rw-39 26-Nov-2012 17:31:16 mimetype drwxrwxrwx 0 26-Nov-2012 17:31:16 meta-inf/ -rw-rw-rw- 782 26-Nov-2012 17:31:16 meta.xml -rw-rw-rw- 66559 26-Nov-2012 17:31:16 styles.xml - -- --- -- 67380 4 files Like Rainer I cannot reproduce. what is - your org-version ? 'M-org-version' produces Org-mode version N/A (N/A @ c:/Documents and Settings/IZAHN/.emacs.d/izahn/org-mode/lisp/) but this is orgmode from git, updated yesterday. well I cannot trust you ;-) I think you did not configure/build org properly (Achim may confirm here). Please read the documentation (M-x org-info) Yes, I've read the documentation. and the worg page here: http://orgmode.org/worg/org-hacks.html Is that really necessary? I keep org updated using the instructions at http://orgmode.org/worg/org-faq.html#keeping-current-with-Org-mode-development. ad hoc code, quick hacks and workarounds does not sound like what I want... and please, configure org properly. The only thing I see that I missed is make autoloads, and indeed after running this I get a sensible org-version: Org-mode version 7.9.2 (release_7.9.2-638-g09cfdb @ /Users/izahn/.emacs.d/izahn/org-mode/lisp/) Then we can investigate if this behaviour is really a bug or is it due to misconfiguration. Fair enough. Unfortunately I'm not at my Windows machine today, so I can't test to see if 'make autoloads' changed anything. Best, Ista - emacs version? GNU Emacs 24.2.1 (i386-mingw-nt5.1.2600) of 2012-08-28 on MARVIN emacs is the windows version fromhttp://ftp.gnu.org/gnu/emacs/windows/ The OS is Windows XP professional with service pack 3. Here: Org-mode version 7.9.2 (d344fda @ GNU Emacs 24.2.1 (i386-mingw-nt6.1.7601) of 2012-08-29 on MARVIN Windows 7 Same as me. Please check your configuration/activation. I started emacs with emacs -q and evaluated the following lines with 'C-x-e': Is is not useful if you have not configured/activated org. cheers, Giovanni
Re: [O] OT, but not really: todays XKCD
On Tue, Feb 12, 2013 at 10:10 AM, Jambunathan K kjambunat...@gmail.com wrote: Bastien b...@altern.org writes: It's important for two reasons: to keep a nice atmosphere on the list, so that people feel comfortable asking stupid questions; and to let other developers focus on their work (while you try to help newbies with their problems). It would have been difficult for you to focus on the ODT exporter or to Nicolas to focus on the new export engine if I didn't put enough energy to maintain the whole beast. Last line is comical. It reminds me of name Dilbert, for reason I cannot fathom. The worth of managers is over-estimated, particularly when the estimation is done by managers themselves. I dislike this kind of negativity, so I've added you to my spam filter. Bye bye. -Ista
[O] org-export-babel-evaluate and :exports none
Hi, I upgraded to the latest git version yesterday, and am loving the new exporter. Congrats to all involved! However, when I set org-export-babel-evaluate to nil the new latex exporter (I have not tried the others) ignores :exports none source block header arguments. To reproduce: 1. start emacs with 'emacs -q' and visit a file named tmp.org with the following contents: start org example #+TITLE: Source block export test * Source block export #+name: test #+begin_src emacs-lisp :exports none :results silent :tangle no ;should not be exported but is (setq org-export-babel-evaluate nil) #+end_src /end org example 2. place the point inside the test block and press 'C-c-c' to evaluate it 3. export to latex file with 'C-e l l' the resulting tmp.tex incorrectly contains \begin{verbatim} ;should not be exported but is (setq org-export-babel-evaluate nil) \end{verbatim} If this is an error on my part please correct my examples! Otherwise please consider this a bug report. 'M-x org-version' reports Org-mode version 7.9.3e (7.9.3e-1107-g45442f @ /usr/share/emacs/site-lisp/org/) on my system, which I believe to be the latest. Best, Ista
Re: [O] org-export-babel-evaluate and :exports none
Hi all, Just checking to see if anyone was able to reproduce this or if I am the only one with this problem. Thanks, Ista On Sun, Feb 17, 2013 at 9:24 AM, Ista Zahn istaz...@gmail.com wrote: Hi, I upgraded to the latest git version yesterday, and am loving the new exporter. Congrats to all involved! However, when I set org-export-babel-evaluate to nil the new latex exporter (I have not tried the others) ignores :exports none source block header arguments. To reproduce: 1. start emacs with 'emacs -q' and visit a file named tmp.org with the following contents: start org example #+TITLE: Source block export test * Source block export #+name: test #+begin_src emacs-lisp :exports none :results silent :tangle no ;should not be exported but is (setq org-export-babel-evaluate nil) #+end_src /end org example 2. place the point inside the test block and press 'C-c-c' to evaluate it 3. export to latex file with 'C-e l l' the resulting tmp.tex incorrectly contains \begin{verbatim} ;should not be exported but is (setq org-export-babel-evaluate nil) \end{verbatim} If this is an error on my part please correct my examples! Otherwise please consider this a bug report. 'M-x org-version' reports Org-mode version 7.9.3e (7.9.3e-1107-g45442f @ /usr/share/emacs/site-lisp/org/) on my system, which I believe to be the latest. Best, Ista
Re: [O] org-export-babel-evaluate and :exports none
On Mon, Feb 18, 2013 at 1:59 PM, Jay Kerns gjkerns...@gmail.com wrote: Dear Ista, On Mon, Feb 18, 2013 at 1:22 PM, Ista Zahn istaz...@gmail.com wrote: Hi all, Just checking to see if anyone was able to reproduce this or if I am the only one with this problem. Thanks, Ista I just make update2'ed, followed your recipe, but my tmp.tex did not incorrectly have the exported source block. So, I guess I can't reproduce, unfortunately. Thanks for checking Jay. I just tried with make update2 (usually I use make update), with the same result as I got before (i.e., the code block is exported). Just to make sure -- you ran the test with emacs -q right? Anybody else try this? Thanks! Ista -- Jay Kerns
Re: [O] org-odt: command line options for soffice bug?
On Mon, Feb 18, 2013 at 3:49 PM, Vinh Nguyen vinhdi...@gmail.com wrote: On Sat, Feb 16, 2013 at 2:33 PM, Vinh Nguyen vinhdi...@gmail.com wrote: Hi, I was having issues exporting to a doc file with this in my init file: (setq org-export-odt-preferred-output-format doc) After some debugging, it appears my soffice command takes a single dash (-), not double dash (--) for command line arguments. When I change to soffice -headless -convert-to %f%x -outdir %d %i in org-odt.el, things seem to work. I am running org-mode 7.9.3e on Emacs 24.1.50.1 and LibreOffice 3.3.4 on Ubuntu 11.04. Not sure if this is specific to me or not, but it should be fixed in org-mode. Thanks! Just checked LibreOffice on my Mac OS X, and it uses two dashes for arguments. Weird that LibreOffice on Ubuntu uses one dash. Can anyone else confirm? I guess the emacs function should determine the current OS to decide whether to use single or double dash for command line arguments... LibreOffice 3.6 on archlinux uses double dash. -Ista -- Vinh
Re: [O] org-export-babel-evaluate and :exports none
On Mon, Feb 18, 2013 at 3:17 PM, Nicolas Goaziou n.goaz...@gmail.com wrote: Hello, Ista Zahn istaz...@gmail.com writes: Thanks for checking Jay. I just tried with make update2 (usually I use make update), with the same result as I got before (i.e., the code block is exported). Just to make sure -- you ran the test with emacs -q right? Anybody else try this? Thanks! Ista I confirm the problem. It is coming from 12d592b73223f3b0628e10f0f627447b1a312203. I reverted it. I confirm it is now working as expected. Thank you! -Ista Thanks you. Regards, -- Nicolas Goaziou
Re: [O] org-export-babel-evaluate and :exports none
On Fri, Feb 22, 2013 at 3:49 PM, Achim Gratz strom...@nexgo.de wrote: Nicolas Goaziou writes: I'm just starting over because that wasn't a correct solution. I'm not even sure about what bug this patch fixed. The bug was that Babel blocks were evaluated during export when org-export-babel-evaluate was explicitly set to nil (the default value is t). FWIW, I have not experienced this bug. I always set org-export-babel-evaluate to nil, and this has always had the desired effect of preventing babel evaluation on export. Best, Ista Anyway, it isn't org-export-babel-evaluate's job to tell when to evaluate a source code block. The documentation says that its job is exactly that, if the context is export. --8---cut here---start-8--- Documentation: Switch controlling code evaluation during export. When set to nil no code will be evaluated as part of the export process. --8---cut here---end---8--- It may be org-babel-exp-process-buffer's. You call org-export-execute-babel-code however, which doesn't check the above variable. BTW, the function org-export-execute-babel-code is called before it is being defined. Not sure why this doesn't give a warning. Why should it? It's not a macro, after all. Ah yes. To much C++ the last month. Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Factory and User Sound Singles for Waldorf Q+, Q and microQ: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
Re: [O] BUG org-babel-execute-src-block: No org-babel-execute function for python!
On Tue, Feb 26, 2013 at 10:42 AM, Andreas Röhler andreas.roeh...@easy-emacs.de wrote: Am 26.02.2013 14:49, schrieb Bastien: Hi Andreas, Andreas Röhler andreas.roeh...@easy-emacs.de writes: org-babel-execute-src-block: No org-babel-execute function for python! When evaluating the following block C-c C-c starting from emacs -Q You need (org-babel-do-load-languages 'org-babel-load-languages '((python . t))) See (info (Org)Languages) HTH, Bugs exists after loading that. What is the nature of the bugs? Please tell if you need more info. what is the result of 'M-x org-version'? Also, try this simple test and report the results: 1. start emaces with emacs -q 2. visit a new file with a .org extension, e.g., tmp.org 3. paste this in: 8cut here8 Place cursor in the code block below and press C-c C-c #+begin_src emacs-lisp :exports none (org-babel-do-load-languages 'org-babel-load-languages '((python . t))) #+end_src #+BEGIN_SRC python :results output a = 5 b = 16 print(a + b) #+END_SRC 8cut here8 4. place the cursor inside the first code block and press C-c C-c 5. place the cursor inside the second code block and press C-c C-c 6. let us know what happens Best, Ista Andreas
[O] Tangle only code block body
Hi all, Is there a way to tangle just the body of code blocks, without any header argurments? For example when I tangle this file # begin example # * test #+name: testplot #+begin_src R :results output graphics :file tmp.png :tangle tmp.R plot(1:10) #+end_src # end example # I get png(filename=tmp.png) plot(1:10) dev.off() but I want just plot(1:10) I've tried removing the %flag setting in org-babel-exp-code-template but it didn't seem to have any effect. Thanks for any pointers, Ista
[O] latex export R code syntax highlighting with minted
Hi all, I'm having trouble modifying the example at http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-12-3 to highlight R code blocks. The trouble seems to be that org-mode identifies R blocks using uppercase R, while pygments looks for lowercase r. For example, org exports \begin{minted}{R} 2+2 \end{minted} but pygments doesn't know how to highlight R. If I change to \begin{minted}{r} 2+2 \end{minted} (note the lower case r) then it works, but of course I don't want to have to perform a find-and-replace every time. Do you know how to either a) make org-mode identify R blocks with a lowercase r, or b) make pygments recognize uppercase R, or c) some other solution I've overlooked? Thanks! Ista
Re: [O] latex export R code syntax highlighting with minted
Ah, perfect! Thank you. On Fri, Mar 16, 2012 at 5:13 PM, Christophe Pouzat christophe.pou...@gmail.com wrote: (add-to-list 'org-export-latex-minted-langs '(R r))
Re: [O] HTML slides
On Thu, Apr 19, 2012 at 3:38 PM, Dov Grobgeld dov.grobg...@gmail.com wrote: There is also https://github.com/dov/org-slidy , which I wrote since I like to be able to scroll my slides which S5 does not allow. It would be even cooler to create a package for creating HTML5 slideshows straight from org-mode, e.g. like http://slides.html5rocks.com/#table-of-contents or Which already exists: https://gist.github.com/509761 -Ista http://imakewebthings.com/deck.js . Regards, Dov On Thu, Apr 19, 2012 at 10:13, BernardH gmane.emacs.orgm...@bernard-hugueney.org wrote: Hi, First and foremost, thank you for making such a great emacs mode ! Whatever I'm doing with orgmode (and I do as much as possible in orgmode !), it is always a joy. Recently, i've been switching to orgmode for my presentations. I'm a happy user of [[https://github.com/eschulte/org-S5][org-S5]] but I just stumbled upon [[https://github.com/relevance/org-html-slideshow][org-html-slideshow]]. I have the utmost respect for their respective authors (of org-S5 for obvious reasons, of org-html-slideshow for Clojure contributions) and now I have a hard time deciding which one to choose. Does anyone have experience with any / both of them ? How would you make the choice ? Thanks for any advice ! Best Regards, Bernard
[O] Bug: babel results: output wrong location [7.8.09]
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. What happens: When I set :results output to an R babel block that does not output anything, two equals signs are inserted at column one of the next non-empty line after the second evaluation. Reproducible example: Start with this simpel org file: -- begin org -- * Test babel block #+name: test1 #+begin_src R :results output x - 1 #+end_src * Next heading -- end org -- After placing the point inside the test1 block and pressing C-c C-c the buffer looks like this: -- begin org -- * Test babel block #+name: test1 #+begin_src R :results output x - 1 #+end_src #+RESULTS: test1 * Next heading -- end org -- So far so good. But when I press C-c C-c a second time, the buffer looks like this -- begin org -- * Test babel block #+name: test1 #+begin_src R :results output x - 1 #+end_src #+RESULTS: test1 ==* Next heading -- end org -- Now Next heading is no longer a heading (notice the == inserted at the beginning of the * Next heading line). What I expected to happen: The second evaulation of the code block should produce the same output as the first. The == text should not be inserted! Emacs : GNU Emacs 24.1.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.2.3) of 2012-04-15 on arch-desktop Package: Org-mode version 7.8.09 current state: == (setq org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code) org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-occur-hook '(org-first-headline-recenter) org-metaup-hook '(org-babel-load-in-session-maybe) org-export-preprocess-before-normalizing-links-hook '(org-remove-file-link-modifiers) org-confirm-shell-link-function 'yes-or-no-p 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-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-after-todo-state-change-hook '(org-clock-out-if-current) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-babel-pre-tangle-hook '(save-buffer) org-mode-hook '(#[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) org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) 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-format-toc-function 'org-export-latex-format-toc-default org-export-blocks '((src org-babel-exp-src-block nil) (export-comment org-export-blocks-format-comment t) (ditaa org-export-blocks-format-ditaa nil) (dot org-export-blocks-format-dot nil)) org-export-first-hook '(org-beamer-initialize-open-trackers) org-export-interblocks '((src org-babel-exp-non-block-elements)) org-babel-tangle-lang-exts '((python . py) (perl . pl) (latex . tex) (emacs-lisp . el)) org-confirm-elisp-link-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-babel-load-languages '((emacs-lisp . t) (sh . t) (R . t) (js . t) (latex . t) (octave . t) (ditaa . t) (org . t) (perl . t) (python . t) (matlab . t)) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) )
Re: [O] Bug: babel results: output wrong location [7.8.09]
Hi Eric, This is the second time I've reported a bug in org mode. Both times the bug has been fixed the same day. I don't know of any other software development project that even comes close to this. You guys are simply amazing. Thank you so much for all your work on org-mode. Best, Ista On Sat, Apr 28, 2012 at 6:07 PM, Eric Schulte eric.schu...@gmx.com wrote: Ista Zahn istaz...@gmail.com 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. What happens: When I set :results output to an R babel block that does not output anything, two equals signs are inserted at column one of the next non-empty line after the second evaluation. Reproducible example: Start with this simpel org file: -- begin org -- * Test babel block #+name: test1 #+begin_src R :results output x - 1 #+end_src * Next heading -- end org -- After placing the point inside the test1 block and pressing C-c C-c the buffer looks like this: -- begin org -- * Test babel block #+name: test1 #+begin_src R :results output x - 1 #+end_src #+RESULTS: test1 * Next heading -- end org -- So far so good. But when I press C-c C-c a second time, the buffer looks like this -- begin org -- * Test babel block #+name: test1 #+begin_src R :results output x - 1 #+end_src #+RESULTS: test1 ==* Next heading -- end org -- Now Next heading is no longer a heading (notice the == inserted at the beginning of the * Next heading line). What I expected to happen: The second evaulation of the code block should produce the same output as the first. The == text should not be inserted! Hi Ista, Thanks for sharing this bug, I find the same behavior with the following example code. , | #+name: block | #+begin_src sh :results output | # nothing | #+end_src | | #+RESULTS: block | | * top ` Alright, I've just pushed up a fix for this issue. Best, Emacs : GNU Emacs 24.1.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.2.3) of 2012-04-15 on arch-desktop Package: Org-mode version 7.8.09 current state: == (setq org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code) org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-occur-hook '(org-first-headline-recenter) org-metaup-hook '(org-babel-load-in-session-maybe) org-export-preprocess-before-normalizing-links-hook '(org-remove-file-link-modifiers) org-confirm-shell-link-function 'yes-or-no-p 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-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-after-todo-state-change-hook '(org-clock-out-if-current) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-babel-pre-tangle-hook '(save-buffer) org-mode-hook '(#[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) org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) 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-format-toc-function 'org-export-latex-format-toc-default org-export-blocks '((src org-babel-exp-src-block nil) (export-comment org-export-blocks-format-comment t) (ditaa org-export-blocks-format-ditaa nil) (dot org-export-blocks-format-dot nil)) org-export-first-hook '(org-beamer-initialize-open-trackers) org-export-interblocks '((src org-babel-exp-non-block-elements)) org-babel-tangle-lang-exts '((python . py) (perl . pl) (latex . tex) (emacs-lisp . el)) org-confirm-elisp-link-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-babel-load-languages '((emacs-lisp . t) (sh . t) (R . t) (js . t) (latex . t) (octave . t) (ditaa . t) (org . t) (perl . t) (python . t) (matlab . t)) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) ) -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] [OT] Current website not very attractive
I love the orgmode website. If you want to see amateurish and not attractive, take a look at http://www.r-project.org/ (I love R too, but the website could use an update) -Ista On Thu, Aug 9, 2012 at 5:45 PM, Marcelo de Moraes Serpa celose...@gmail.com wrote: Hey list, Don't want to be negative, but doesn't anyone else also think the current design is kind of amateurish and not very attractive? I also did not like the screenshot used, I preferred the previous one, it showed more org capabilities, and the colors and indentation looked better. My two cents and food for thought, - Marcelo.
Re: [O] [ANN] Editable HTML export of Org-mode files
Hi Eric, Sounds really cool, I'd love to try it out. But when I run (ert org-ehtml) I get errors like Selector: org-ehtml Passed: 0 Failed: 5 (5 unexpected) Total: 5/6 Started at: 2012-08-15 22:00:20-0400 Finished. Finished at: 2012-08-15 22:00:50-0400 FFQFFF F org-ehtml-elnode-serve-all-editable (void-function cl-flet) F org-ehtml-elnode-serve-complex (void-function cl-flet) Q org-ehtml-elnode-serve-simple (quit) F org-ehtml-export-file (void-variable org-export-with-LaTeX-fragments) F org-ehtml-post-request (error Shell command in progress) F org-ehtml-simple-export (void-variable org-export-with-LaTeX-fragments) This is with the git version of org and emacs 24.1.1 Any ideas what I might have missed? Thanks, Ista On Mon, Aug 13, 2012 at 6:28 PM, Eric Schulte eric.schu...@gmx.com wrote: Hi, I've recently put together a web server which runs in Emacs and exports local Org-mode files to HTML in such a way that they may be edited from within a web browser with the edits saved to local files on disk. The code is available from github. repository https://github.com/eschulte/org-ehtml README --- http://eschulte.github.com/org-ehtml This is a very thin Emacs Lisp and JavaScript wrapper around Nic Ferrier's elnode Emacs web server [1], and Nicolas Goaziou's structured Org-mode file representation and export engine. It requires Emacs 24 and the development versions of both Org-mode and elnode. The code is fairly new so there are likely some kinks to be worked out (backup your files before editing them with this web-server), but the implementation is very simple and should be easy to modify. See the README for information on how to make use of elnode's authentication system, or how to have web edits automatically committed to a local version control system. Comments and patches are welcome. Cheers, Footnotes: [1] https://github.com/nicferrier/elnode -- Eric Schulte http://cs.unm.edu/~eschulte
Re: [O] [ANN] Editable HTML export of Org-mode files
On Thu, Aug 16, 2012 at 2:31 AM, Eric Schulte eric.schu...@gmx.com wrote: Ista Zahn istaz...@gmail.com writes: Hi Eric, Sounds really cool, I'd love to try it out. But when I run (ert org-ehtml) I get errors like Selector: org-ehtml Passed: 0 Failed: 5 (5 unexpected) Total: 5/6 Started at: 2012-08-15 22:00:20-0400 Finished. Finished at: 2012-08-15 22:00:50-0400 FFQFFF F org-ehtml-elnode-serve-all-editable (void-function cl-flet) F org-ehtml-elnode-serve-complex (void-function cl-flet) Q org-ehtml-elnode-serve-simple (quit) F org-ehtml-export-file (void-variable org-export-with-LaTeX-fragments) F org-ehtml-post-request (error Shell command in progress) F org-ehtml-simple-export (void-variable org-export-with-LaTeX-fragments) This is with the git version of org and emacs 24.1.1 Any ideas what I might have missed? Thanks, Ista Ah, thanks for sharing this output, it looks like I wasn't careful enough about ensuring that cl-lib was loaded. I've added a number of require statements which should fix the error you pointed out above. Please grab the latest from git, and let me know if these problems persist or any new issues assert themselves. With the current git version I now get File error: Cannot open load file, cl-lib on start up. find / -name cl-lib.el does not produce any results on my machine, nor have I been able to find it in elpa/marmalade etc. Google search suggests it is built in with emacs, but I'm pretty sure I don't have it... Best, Ista Thanks, -- Eric Schulte http://cs.unm.edu/~eschulte
Re: [O] [ANN] Editable HTML export of Org-mode files
On Thu, Aug 16, 2012 at 12:36 PM, Eric Schulte eric.schu...@gmx.com wrote: Ista Zahn istaz...@gmail.com writes: On Thu, Aug 16, 2012 at 2:31 AM, Eric Schulte eric.schu...@gmx.com wrote: Ista Zahn istaz...@gmail.com writes: Hi Eric, Sounds really cool, I'd love to try it out. But when I run (ert org-ehtml) I get errors like Selector: org-ehtml Passed: 0 Failed: 5 (5 unexpected) Total: 5/6 Started at: 2012-08-15 22:00:20-0400 Finished. Finished at: 2012-08-15 22:00:50-0400 FFQFFF F org-ehtml-elnode-serve-all-editable (void-function cl-flet) F org-ehtml-elnode-serve-complex (void-function cl-flet) Q org-ehtml-elnode-serve-simple (quit) F org-ehtml-export-file (void-variable org-export-with-LaTeX-fragments) F org-ehtml-post-request (error Shell command in progress) F org-ehtml-simple-export (void-variable org-export-with-LaTeX-fragments) This is with the git version of org and emacs 24.1.1 Any ideas what I might have missed? Thanks, Ista Ah, thanks for sharing this output, it looks like I wasn't careful enough about ensuring that cl-lib was loaded. I've added a number of require statements which should fix the error you pointed out above. Please grab the latest from git, and let me know if these problems persist or any new issues assert themselves. With the current git version I now get File error: Cannot open load file, cl-lib on start up. find / -name cl-lib.el does not produce any results on my machine, nor have I been able to find it in elpa/marmalade etc. Google search suggests it is built in with emacs, but I'm pretty sure I don't have it... Ugh, this is more headache related to the renaming of all cl-* functions between the released version of Emacs 24 and the development head of Emacs (which I'm using). I've just pushed up a change after which all tests are passing on both the development head and the released version of Emacs 24. Thanks for your help in running this down. All is working as expected, and as expected it's really cool. Thank you! Now if I could just edit babel source blocks and have the results blocks update on the fly I would be in R workshop presenter heaven. Any chance of this sort of thing down the road? Best, Best, Ista Thanks, -- Eric Schulte http://cs.unm.edu/~eschulte -- Eric Schulte http://cs.unm.edu/~eschulte
Re: [O] [ANN] Editable HTML export of Org-mode files
On Thu, Aug 16, 2012 at 4:11 PM, Eric Schulte eric.schu...@gmx.com wrote: All is working as expected, and as expected it's really cool. Thank you! Great, happy its working. Now if I could just edit babel source blocks and have the results blocks update on the fly I would be in R workshop presenter heaven. Any chance of this sort of thing down the road? Yea, I haven't implemented an edit interface for code blocks yet. As you suggest I think that they could benefit from a customized edit interface, luckily Nicolas' org-export makes element-specific exports easy to implement. I'm not sure what sort of interaction would be best... - would a [RUN] button be useful - should just the body of the code block be editable, or everything - should code block results have a re-run button Personally I would like to see it work pretty much the same as other editable elements, except that it would re-run the code and update the results block. So you could just 1) click to edit the source block 2) make changes to the code 3) click save and any results block would be updated to the result of your changes in step 2. Best, Ista No solution has jumped out yet, so I'm just wanting till something seems obvious. If you have more specific ideas I'd love to hear them. I think something like Python's notebooks should be fairly easy to implement. Cheers, Best, Best, Ista Thanks, -- Eric Schulte http://cs.unm.edu/~eschulte -- Eric Schulte http://cs.unm.edu/~eschulte -- Eric Schulte http://cs.unm.edu/~eschulte
Re: [O] export literal examples font-lock: ess-mode
On Fri, Aug 17, 2012 at 9:23 AM, Paul paulburk...@gmail.com wrote: I write do-files for Stata code in emacs using ESS, which marks up my code and sends it to a comint-mode buffer for evaluation. I'd like to include some source code in an org file, as in the below examle: #+begin_src -n foreach var of varlist _all{ rename `var' new_`var' } #+end_src I have a couple of questions: How can I use ess fontification in this snippet #+begin_src stata foreach var of varlist _all{ rename `var' new_`var' } #+end_src works for me. and in the file to which I export? I think this depends on your export target. It should just work for html, but pdf will be more work. The manual says I need to specify the name of the major mode, however including #+begin_src ess -n results in the following error org-edit-src-code: No such language mode: nil-mode. I've tried using ess-mode, and anything else I can think of, to no avail. What should I include? I think #+begin_src stata is correct. Also, assuming I'm able to get the fontification to work, is there a way to customize it for exporting? Finally, org-babel looks tremendously useful. Is there a way to harness it's capabilities for an unsupported language like Stata's? C-c ' will open a temporary buffer in ess mode so you can edit and run the code using ess, and tangling will work as expected. The only thing you need babel support for is actually running the code in org-mode and inserting the results block. I've made weak attempts to add stata support to babel, but my elisp-foo is not strong enough. Thanks to everyone who read this through, and in particular to anyone who can help! Paul
[O] Interweaveing code and results with :session
Hi, I would like to interweave multi-line R code and results, like this: #+begin_src R :results output 2+2 3+3 #+end_src #+results: : 2+2 : [1] 4 : 3+3 : [1] 6 while using R :session. The solution posted at http://lists.gnu.org/archive/html/emacs-orgmode/2010-08/msg00785.html is to set #+begin_src emacs-lisp (setq org-babel-R-command R --silent --no-save) #+end_src This works, but only if session is not being used. For example: --8---cut here---start-8--- #+begin_src emacs-lisp (setq org-babel-R-command R --silent --no-save) #+end_src #+results: : R --silent --no-save This works as desired: #+begin_src R :results output 2+2 3+3 #+end_src #+RESULTS: : 2+2 : [1] 4 : 3+3 : [1] 6 : Does not interweave code and results when using :session: #+begin_src R :results output :session *R* 2+2 3+3 #+end_src #+results: : [1] 4 : [1] 6 --8---cut here---end---8--- Is there a way to get this interweaved output while using :session? Thanks! Ista
Re: [O] Interweaveing code and results with :session
On Sun, Aug 19, 2012 at 7:40 PM, Eric Schulte eric.schu...@gmx.com wrote: Ista Zahn istaz...@gmail.com writes: Hi, I would like to interweave multi-line R code and results, like this: #+begin_src R :results output 2+2 3+3 #+end_src #+results: : 2+2 : [1] 4 : 3+3 : [1] 6 while using R :session. The solution posted at http://lists.gnu.org/archive/html/emacs-orgmode/2010-08/msg00785.html is to set #+begin_src emacs-lisp (setq org-babel-R-command R --silent --no-save) #+end_src This works, but only if session is not being used. For example: --8---cut here---start-8--- #+begin_src emacs-lisp (setq org-babel-R-command R --silent --no-save) #+end_src #+results: : R --silent --no-save This works as desired: #+begin_src R :results output 2+2 3+3 #+end_src #+RESULTS: : 2+2 : [1] 4 : 3+3 : [1] 6 : Does not interweave code and results when using :session: #+begin_src R :results output :session *R* 2+2 3+3 #+end_src #+results: : [1] 4 : [1] 6 --8---cut here---end---8--- Is there a way to get this interweaved output while using :session? Unfortunately I do not believe this is currently possible, however it shouldn't be hard to implement for someone familiar with ob-R.el. Thanks Eric. I'm able to get the desired behavior by setting (setq org-babel-R-command R --silent --save --restore) instead of using :session Obviously this is slow, and has other disadvantagages, but it does give interweaved results while allowing object persistance across code blocks. Best, Ista Best, Thanks! Ista -- Eric Schulte http://cs.unm.edu/~eschulte
Re: [Orgmode] Org-mode release 7.01
'k': it clocks you out from the beginning of the idle period and clock you back in X minutes ago. s/S Subtract the idle time from the current clock. This is the same as keeping 0 minutes. C Cancel the open timer altogether. It will be as though you never clocked in. j/J Jump to the current clock, to make manual adjustments. For all these options, using uppercase makes your final state to be CLOCKED OUT. Thanks to John Wiegley for making these changes. A property value of nil now means to unset a property This can be useful in particular with property inheritance, if some upper level has the property, and some grandchild of it would like to have the default settings (i.e. not overruled by a property) back. Thanks to Robert Goldman and Bernt Hansen for suggesting this change. The problem with comment syntax has finally been fixed === Thanks to Leo who has been on a year-long quest to get this fixed and finally found the right way to do it. Make it possible to protect hidden subtrees from being killed by =C-k= === This was a request by Scott Otterson. See the new variable =org-ctrl-k-protect-subtree=. New module org-mac-link-grabber.el === This module allows to grab links to all kinds of applications on a mac. It is available in the contrib directory. Thanks to Anthony Lander for this contribution. LaTeX export: Implement table* environment for wide tables === Thanks to Chris Gray for a patch to this effect. When cloning entries, remove or renew ID property == Thanks to David Maus for this change. - Carsten ___ 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 -- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org ___ 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] org-babel caching question
Hi all, I am just starting to get org-babel figured out, but I've run into an issue that I could use help with. Basically, with :cache yes turned on, subsequent code blocks to not pick up changes in earlier code blocks. I would like to know if there is a way to make org babel pick up these changes. An example follows. ---8--begin example--8--- Test org-babel caching mechanism * Instructions 1. Assign the value 1 to variable a in source block1. 2. Run org-babel-execute-buffer. 3. Change variable a by assigning it the value 2 in source block1. 4. Run org-babel-execute-buffer, and notice that a is still equal to 1, 2 in source block2, when it should be 2, 2. * Create R object a #+srcname block1 #+begin_src R :session R1 :cache yes a - 1 #+end_src * Change the value of a #+srcname block2 #+begin_src R :session R1 :cache yes a - c(a, 2) #+end_src * Commentary It appears that the org-babel caching mechanism does not notice that input values have changed. This is inconvenient, because if I make a mistake in an earlier code block I have to turn caching off in order to get the values to be updated in subsequent code blocks. Is there any way to make babel check to see if the input values have changed? ---8--end example--8--- -- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org ___ 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] Error when running org-babel-execute-buffer -- Wrong type argument: consp, nil
Hi, I recently upgraded to version 7.3 (from 7.01), and discovered that org-babel-execute-buffer no longer works, returning Wrong type argument: consp, nil. This behavior is exists even with the simplest of examples, such as #+begin_src R 2+2 #+end_src and persists even when I reduce my .emacs file down to a bare minimum of ;;Set up org mode (require 'org-install) (add-to-list 'auto-mode-alist '(\\.org$ . org-mode)) (define-key global-map \C-cl 'org-store-link) (define-key global-map \C-ca 'org-agenda) ;; Enable R, latex, lisp support (org-babel-do-load-languages 'org-babel-load-languages '((R . t) (latex . t))) org-babel-execute-src_block works. If all blocks have been evaluated, then running org-babel-execute-buffer works (even if a block has changed), although it returns a message saying Invalid function: org-babel-map-src-blocks (I don't know if this is related or not). In other words, org-babel-execute-buffer works to update blocks that have previously been evaluated, but fails when the buffer contains unevaluated blocks. This is with org version 7.3, and I get the same behavior using emacs version 23.2.1 and emacs version 24.0.50.1 Any help will be appreciated. Best, -- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org ___ 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: [O] Trouble using julia with org-babel
On Wed, Oct 29, 2014 at 12:35 PM, Doyley, Marvin M. mdoy...@ur.rochester.edu wrote: Hi there, I have been play with julia the last couple of weeks and have been having some issues when I try to use it in org-babel More specifically, It get the following error ERROR: unsupported or misplaced expression using in _start at ./client.jl:394 in _start at /julia/usr/lib/julia/sys.dylib When I execute the following code block #+begin_src julia using Winston #+end_src I get the same thing, though both of these variations work for me: #+begin_src julia using Winston 1 + 1 #+end_src #+RESULTS: : 2 #+begin_src julia :results output using Winston #+end_src Hope this helps, Ista #+RESULTS: I should mention, that everything works perfectly in eshell or when I execute simple code blocks like #+begin_src julia linspace(0,10,5) #+end_src #+RESULTS: | 0 | | 2.5 | | 5 | | 7.5 | | 10 | Does Any body know how to resolve this issue. Cheers, M
Re: [O] Trouble using julia with org-babel
On Wed, Oct 29, 2014 at 10:09 PM, Doyley, Marvin M. mdoy...@ur.rochester.edu wrote: I am using release-0.3.0 what version are you using. I am also using ob-julia.el I'm using julia version 0.3.1 with GNU Emacs 24.4.1 and Org-mode version 8.2.10. I'm using the ob-julia.el distributed with org-plus-contrib. Best, Ista Cheers, M Sent from my iPad On Oct 29, 2014, at 9:43 PM, Ista Zahn istaz...@gmail.com wrote: On Wed, Oct 29, 2014 at 12:35 PM, Doyley, Marvin M. mdoy...@ur.rochester.edu wrote: Hi there, I have been play with julia the last couple of weeks and have been having some issues when I try to use it in org-babel More specifically, It get the following error ERROR: unsupported or misplaced expression using in _start at ./client.jl:394 in _start at /julia/usr/lib/julia/sys.dylib When I execute the following code block #+begin_src julia using Winston #+end_src I get the same thing, though both of these variations work for me: #+begin_src julia using Winston 1 + 1 #+end_src #+RESULTS: : 2 #+begin_src julia :results output using Winston #+end_src Hope this helps, Ista #+RESULTS: I should mention, that everything works perfectly in eshell or when I execute simple code blocks like #+begin_src julia linspace(0,10,5) #+end_src #+RESULTS: | 0 | | 2.5 | | 5 | | 7.5 | | 10 | Does Any body know how to resolve this issue. Cheers, M
Re: [O] Inline code :results replace not working
On Mon, Nov 10, 2014 at 11:23 AM, Charles C. Berry ccbe...@ucsd.edu wrote: On Mon, 10 Nov 2014, Andreas Leha wrote: [snip] Nonetheless, from a literate programming perspective, I think that replaceable (and raw) inline results are definitely desirable. Regardless of the state of their implementation in orgmode right now. +1. +1 from me as well. For exactly the reason Andreas illustrated I've given up on using inline results for the past year or so. Would be great to see this feature become usable by implementing a system for replacing them. -Ista I find myself writing an inline src block, then typing `C-c C-c C-x u' to view and then remove the result, then revise, and repeat. I'd be happy to just leave it in the document. FWIW, I'm not -- yet? -- convinced we should see the results of inline code blocks inlined in the paragraph (and I'm not sure either it does not cause interpretation problems); but, for sure, I'd love to be able to preview the value interactively, at least. So, I do not doubt, that you and Nicolas are right with that replaceable inline results are not implemented and are -- from orgmodes perspective -- expected to be evaluated only during export. My message was meant more as a feature request saying that I consider replaceable inline results useful and would like to see them supported by org. Could you better explain your statement: Limiting the use of inline code to eval-on-export-only renders all the org-babel-execute-subtree and related functionality useless? I'm not sure to fully understand your use-case. That'd certainly be worth explaining why you think it must be changed in the first instance if you'd like Eric or Nicolas (or someone else) to change that. Consider this simple toy example. If you press 'C-c C-v s' in the subtree, the document is 'broken' for export. If you press 'C-c C-v s' twice or more the document is 'broken' even for display. [deleted ECM] It seems like implementing removable inline results cleanly is a nettlesome issue. But with the recent implementation of `org-babel-inline-result-wrap' it would be trivial to wrap results with something like @@babel:%s@@, which can be found and removed more reliably than =%s=. On export, either the :back-end property of such export-snippets could be revised to the backend in use by a parse-tree filter or the code in each org-backend-export-snippet could be revised to accept such snippets. There is still the matter of adding code to find and remove those snippets where Nicolas pointed in ob-core.al. But it seems do-able. HTH, Chuck
Re: [O] Inline code :results replace not working
On Mon, Nov 10, 2014 at 3:04 PM, Grant Rettke g...@wisdomandwonder.com wrote: On Mon, Nov 10, 2014 at 11:03 AM, Ista Zahn istaz...@gmail.com wrote: On Mon, Nov 10, 2014 at 11:23 AM, Charles C. Berry ccbe...@ucsd.edu wrote: On Mon, 10 Nov 2014, Andreas Leha wrote: [snip] Nonetheless, from a literate programming perspective, I think that replaceable (and raw) inline results are definitely desirable. Regardless of the state of their implementation in orgmode right now. +1. +1 from me as well. For exactly the reason Andreas illustrated I've given up on using inline results for the past year or so. Would be great to see this feature become usable by implementing a system for replacing them. My approach here has been to use hidden source blocks that aren't exported but make it really easy to see the result during development. These settings should work on any configuration, so I didn't include mine here. ✂✂ #+BEGIN_SRC R a = 10 b = 23 c = a + b #+END_SRC #+BEGIN_SRC R :results output silent :exports none c #+END_SRC The user calculated src_R{c}. ✂✂ When you use these functions http://orgmode.org/manual/Key-bindings-and-useful-functions.html#Key-bindings-and-useful-functions the addition of these hidden blocks hav almost zero cost and give me what I want. The problem I have is not that I miss being able to see results of the inline block in the org-mode buffer. The problem is that I don't want blocks to be evaluated on export (too time consuming in many cases). So I turn that off, and either evaluate the blocks one at a time (I'm aware of the dangers of this, not my point here) or call org-babel-execute-buffer. Everytime I do that I get duplicate output from inline code. As far as I can see inline code + org-babel-execute-buffer is incompatible, which is why I gave up on the former. Best, Ista
Re: [O] Executing org shell blocks on remote machine over ssh
On Tue, Nov 18, 2014 at 10:43 AM, Brett Viren b...@bnl.gov wrote: David Bjergaard davi...@duke.edu writes: I use org mode as a lab notebook. I write org-src blocks to keep track of tasks I do at the command line, and then I copy paste them into the terminal. I would really like to hit C-c C-c on the source block and have it executed on the remote machine. I know that you can specify the remote machine according to [1], however the software I use requires a fairly complicated setup to get going. Is it just complicated, or is it also prohibitively long-running? If just the former, you could maybe bundle the setup into some shell script and source it in each of your sh source blocks. Eg: #+BEGIN_SRC sh :results output :dir /ssh:lycastus:/home/bviren /bin/pwd echo $HOSTNAME ls -l foo.sh echo --- cat foo.sh echo --- source ./foo.sh echo $FOO #+END_SRC #+RESULTS: : /home/bviren : lycastus : -rw-rw-r-- 1 bviren bviren 16 Nov 18 10:27 foo.sh : --- : export FOO=bar : : --- : bar If the setup is purely environmental, and it takes a long time to perform, maybe you could do the set up once and then cache the resulting environment using the output of env. I guess I'm missing something (like why the OP want's to run a shell in a separate window), but why not just #+BEGIN_SRC sh :results output :dir /ssh:lycastus:/home/bviren :session *shell* /bin/pwd echo $HOSTNAME ls -l foo.sh echo --- cat foo.sh echo --- source ./foo.sh echo $FOO #+END_SRC ? Best, Ista -Brett.
Re: [O] Executing org shell blocks on remote machine over ssh
On Tue, Nov 18, 2014 at 1:23 PM, David Bjergaard davi...@duke.edu wrote: Ista Zahn istaz...@gmail.com writes: On Tue, Nov 18, 2014 at 10:43 AM, Brett Viren b...@bnl.gov wrote: David Bjergaard davi...@duke.edu writes: I use org mode as a lab notebook. I write org-src blocks to keep track of tasks I do at the command line, and then I copy paste them into the terminal. I would really like to hit C-c C-c on the source block and have it executed on the remote machine. I know that you can specify the remote machine according to [1], however the software I use requires a fairly complicated setup to get going. Is it just complicated, or is it also prohibitively long-running? If just the former, you could maybe bundle the setup into some shell script and source it in each of your sh source blocks. Eg: #+BEGIN_SRC sh :results output :dir /ssh:lycastus:/home/bviren /bin/pwd echo $HOSTNAME ls -l foo.sh echo --- cat foo.sh echo --- source ./foo.sh echo $FOO #+END_SRC #+RESULTS: : /home/bviren : lycastus : -rw-rw-r-- 1 bviren bviren 16 Nov 18 10:27 foo.sh : --- : export FOO=bar : : --- : bar If the setup is purely environmental, and it takes a long time to perform, maybe you could do the set up once and then cache the resulting environment using the output of env. I guess I'm missing something (like why the OP want's to run a shell in a separate window), but why not just #+BEGIN_SRC sh :results output :dir /ssh:lycastus:/home/bviren :session *shell* /bin/pwd echo $HOSTNAME ls -l foo.sh echo --- cat foo.sh echo --- source ./foo.sh echo $FOO #+END_SRC ? Best, Ista -Brett. Hi Ista, Brett, Thanks for the hints, I'll try these. Some clarification: If the setup is purely environmental, and it takes a long time to perform, maybe you could do the set up once and then cache the resulting environment using the output of env. Unfortunately it takes a long time to set up, and its complicated (I have to initialize different versions of the software depending on which project I'm working on.) It can take up to 10 seconds to restore a saved environment, and it takes some setting up bootstrap the restoration command. I guess I'm missing something (like why the OP want's to run a shell in a separate window), but why not just I want the separate window because once the environment is set up, I also jump around a lot. Emacs is great for jumping around a lot, another reason to run the shell inside emacs instead of in a separate window. I record the pieces of shell script that are important for reproducing results in the notebook. The snippets are then recycled across many sessions, and different pieces are used at different times (some are even used with different pieces of software). What I would like is to log into the remote machine, set up the software, and then have a way to tell emacs to send the org-src block to the set up environment so that I can build up the parts I need at that moment. I know this is working against the grain of the literate programming paradigm where the document and the source code are coupled, and tangling the document produces a program that can be executed. I'm just wondering if its possible. It really does sound to me like you're just looking for the :session argument. Best, Ista If not that's fine. Really I'm just trying to save myself a copy-paste (and the associated issues with it getting recorded in my .bash_history). Cheers, Dave
Re: [O] Conditionally export certain sections based on predefined types
On Thu, Dec 4, 2014 at 1:59 PM, Pete Ley peteley11...@gmail.com wrote: Not a great title, but I'm not sure how to explain what I want succinctly. I'm trying to write a resume, and I'd like to be able to export different versions of it for different things. For instance, I don't necessarily want to include my hourly job experience when applying for a programming job, and I'd like to exclude my programming and other technical experience for certain job applications. I'm thinking something like this * Work experience ** Some hourly job :PROPERTIES: :export-exclude: programming :END: * Programming languages :PROPERTIES: :export-exclude: hourly :END: Obviously it doesn't have to be properties, but I thought that was the most clear way to explain what I'm looking for. So I'd like to be able to export a specific type of resume, like a programming resume which excludes hourly jobs or an hourly resume which excludes programming language proficiency. Is there a way to do this already? Is there a canonical way to create this functionality? I'd rather not start hacking without a good idea of how more knowledgeable users might tackle this. There might be better ways, but I do --8---cut here---start-8- # uncomment one of these before export. # for hourly version: # #+EXCLUDE_TAGS: programming # for programming version # #+EXCLUDE_TAGS: hourly * Work experience:hourly: ** Some hourly job * Programming languages :programming: --8---cut here---end-8- Best, Ista
Re: [O] Conducting end user surveys and analyze data (was: Org-mode to feed a database)
On Dec 31, 2014 5:38 AM, Karl Voit devn...@karl-voit.at wrote: * Vikas Rawal vikasli...@agrarianresearch.org wrote: But there would be many interesting things one could do in an emacs/org-based solution. My biggest worry is that it would require continuous training of people coming in to enter data. I think you can differ between the data entry platform and the platform where you analyze the data. You do have to train people using Emacs/Org-mode as well. When I was a researcher, I used SurveyMonkey for my surveys. It's open source and web-based. You get the data in CSV files AFAIR. No, I don't believe surveymonkey is open source. Perhaps you are thinking of limesurvey? I also tested Google Drive (spreadsheet) forms which were very easy to set up. However, the person filling out the survey needs a Google Drive account. No, that is not true. You don't need a google account to fill in a Google drive form. The results were exported in various formats AFAIR. So, choosing a well known interface type (web-based forms) for end-users and choosing a separate power-tool for analysis (R, Org-mode, ...) is not a bad idea IMHO. I agree that doing it in emacs doesn't make sense from a productivity standpoint. The only reason to do something like this in emacs is because it would be cool and increase your geek cred. Best, Ista -- mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode: get Memacs from https://github.com/novoid/Memacs https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github
Re: [O] Conducting end user surveys and analyze data (was: Org-mode to feed a database)
On Wed, Dec 31, 2014 at 8:40 AM, Karl Voit devn...@karl-voit.at wrote: * Ista Zahn istaz...@gmail.com wrote: On Dec 31, 2014 5:38 AM, Karl Voit devn...@karl-voit.at wrote: When I was a researcher, I used SurveyMonkey for my surveys. It's open source and web-based. You get the data in CSV files AFAIR. No, I don't believe surveymonkey is open source. Perhaps you are thinking of limesurvey? Yes, absolutely true. I mixed them up - sorry for that. It was https://www.limesurvey.org with a local installation. I also tested Google Drive (spreadsheet) forms which were very easy to set up. However, the person filling out the survey needs a Google Drive account. No, that is not true. You don't need a google account to fill in a Google drive form. Really? I was not able to do so. Probably I have to re-try it again. I've never had a problem with this--for example http://j.mp/1zvWP1G should work without signing into google. In case this is true, then I'd got for Google Drive forms because of the very easy handling! Yes, google is very convenient. The results were exported in various formats AFAIR. ... and I guess everything we need here is CSV :-) Thanks for your correction! -- mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode: get Memacs from https://github.com/novoid/Memacs https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github
Re: [O] [bug?] Link to be exported only in HTML
On Wed, Feb 4, 2015 at 10:15 AM, Sebastien Vauban sva-n...@mygooglest.com wrote: #+TITLE: ECM Links for HTML only * Test If I want to include a link (GPL logo, here) to the HTML export, I should put it in a block, right? #+begin_html [[http://opensource.org/licenses/GPL-3.0][http://img.shields.io/:license-gpl-blue.svg]] #+end_html Well, that does not work: the link is not rendered as a link; it's copied verbatim. You need to write the link in html, not org: #+begin_html a href=http://opensource.org/licenses/GPL-3.0;img src=http://img.shields.io/:license-gpl-blue.svg; alt=:license-gpl-blue.svg //a #+end_html OTOH, the link on its own is correctly exported to HTML: [[http://opensource.org/licenses/GPL-3.0][http://img.shields.io/:license-gpl-blue.svg]] ... but it fails to be exported to LaTeX (causing a TeX capacity exceeded error), reason why I must not have the link when exporting to LaTeX. I can't replicate that, for me it exports to \href{http://opensource.org/licenses/GPL-3.0}{\url{http://img.shields.io/:license-gpl-blue.svg}} and compiles just fine. Is this a bug? Is there an alternative? Best regards, Seb -- Sebastien Vauban