[O] Setup for switching between 2 org-mode configurations (demo/productive)?
Hi, I'd like to set up org-mode in a way to separate my personal data from my gerenal settings. Why? I'd like to be able to quickly and easily create tutorials or minimal examples with sample data without having to worry about publishing private/personal information anywhere. So I'm searching for a way to disable all personal data with one command and easily re-enable them later. I assume that some of you already have something like that or can recommend a way for doing so? I'm using Mercurial for versioning my org-mode files (but honestly I have no ideas about the advanced features of version control like branching, merging, etc., I'm just abusing it for regularly storing backups of my setup and data and making a diff, if something got messed up or accidently deleted). Kind regards Martin
Re: [O] Setup for switching between 2 org-mode configurations (demo/productive)?
* M elwood...@web.de wrote: Hi, Hi! I'd like to set up org-mode in a way to separate my personal data from my gerenal settings. and easily re-enable them later. [...] I assume that some of you already have something like that or can recommend a way for doing so? I by myself did chose a manual attempt so far: temporarily modifying org-agenda-files to one demo file [1] and sticking to this demo file only while showing stuff. With my Memacs setup (see sig), I gave up selecting stuff that might be private because every daily agenda shows private stuff (in case or displaying archive files is enabled). To demonstrate Memacs, I wrote a small shell script that finds days where I got no time-stamp in my Org-mode files. (Fun act: I found only a handful within the last years!). This way, I chose September 15th 2008 for [2]. I created dummy entries for a demo scenario and stick to this single artificial day only. :-) 1. e.g., https://github.com/novoid/org-mode-workshop/blob/master/featureshow/org-mode-teaser.org 2. http://arxiv.org/abs/1304.1332 -- 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
[O] How to install recent documentation of org 8.2?
I tried to get a recent documentation in my org-mode: I'm using Aquamacs 2.5 on MacOS X, which seems to have org-mode 6.33 onboard. I tried to load the recent documentation with a link to the doc directory in my org-mode 8.2 (expanded contents from git repository) in my .emacs. (add-to-list 'Info-additional-directory-list (expand-file-name ~/mypath/org-mode/org_current/doc)) But this does have no effect. With C-h i, I get displayed a an outdated org-manual. Is the doc directory the right one or do I have to download the documentation separately? I had downloaded the zipped version from http://orgmode.org/org-8.2.1.zip . Kind regards Martin
Re: [O] exporting to beamer error: org-beamer--normalize-argument: Wrong type argument: stringp, nil
Hello, Rob Stewart robstewar...@gmail.com writes: I have followed this tutorial to export from org to beamer frames. http://orgmode.org/worg/exporters/beamer/ox-beamer.html . Unfortunately, the frames are not created for 2nd level headings. Instead, subsections are used. I am using org-mode from the git repository, pulled today using commit f871fb6 . I have tried both org-export-to-pdf and org-beamer-export-to-pdf . The first is not effective (LaTeX output below). Please do not use the first one, it belongs to the old exporter. The latter throws an error org-beamer--normalize-argument: Wrong type argument: stringp, nil . I cannot reproduce you problem. You may want to check if your installation is correct. Regards, -- Nicolas Goaziou
Re: [O] How to install recent documentation of org 8.2?
2013-10-03 10:27 M: I tried to load the recent documentation with a link to the doc directory in my org-mode 8.2 (expanded contents from git repository) in my .emacs. (add-to-list 'Info-additional-directory-list (expand-file-name ~/mypath/org-mode/org_current/doc)) But this does have no effect. With C-h i, I get displayed a an outdated org-manual. The following worked for me, however in a different environment (Gentoo Linux with org-mode 8.2 installed via the package manager). My Org 8.2 info file ended up in /usr/share/info/org, whereas the one packaged by Emacs is in /usr/share/info/emacs-24. I couldn't get the directory settings in Emacs right, but the following worked: I created my own info directory and prepended it to the INFOPATH environment variable: export INFOPATH=$HOME/.emacs.d/info:$INFOPATH In this directory, I created a symlink to the Org 8.2 info: $ ls -l ~/.emacs.d/info total 0 lrwxrwxrwx 1 clange clange 19 Sep 14 15:20 org - /usr/share/info/org HTH, Christoph -- Christoph Lange, School of Computer Science, University of Birmingham http://cs.bham.ac.uk/~langec/, Skype duke4701 → Mathematics in Computer Science Special Issue on “Enabling Domain Experts to use Formalised Reasoning”; submission until 31 October. http://cs.bham.ac.uk/research/projects/formare/pubs/mcs-doform/
[O] org-submit-bug-report is missing org-remember [Re: Bug: org-remember.el is not in git repo]
Hi all, 2013-04-12 06:27 Bastien: Yes, org-remember.el has been removed from Org 8.0. davi...@es.gnu.org (David Arroyo Menéndez) writes: Trying does org-submit-report from git repo, I've found this error, I've fixed my problem adding (load /usr/share/emacs/24.3.50/lisp/org/org-remember.el) to my .emacs ... I just wanted to submit a bug report via org-submit-bug-report, but it said Cannot open load file: org-remember. Indeed org.el of version 8.2 still makes some references to org-remember. Cheers, Christoph -- Christoph Lange, School of Computer Science, University of Birmingham http://cs.bham.ac.uk/~langec/, Skype duke4701 → Mathematics in Computer Science Special Issue on “Enabling Domain Experts to use Formalised Reasoning”; submission until 31 October. http://cs.bham.ac.uk/research/projects/formare/pubs/mcs-doform/
[O] C-c C-c doesn't tick check box when pressed on a hyperlink in a list item
Hi all, this is a bug in Org 8.2 on Emacs 24.3. I can't use org-submit-bug-report right now (see previous mail), so let me try this way. I have a check list like this * [X] item * [ ] item and some of the items contain hyperlinks. When I am on one such hyperlink and press C-c C-c it doesn't tick the check box but says C-c C-c can do nothing useful at this location. Cheers, Christoph -- Christoph Lange, School of Computer Science, University of Birmingham http://cs.bham.ac.uk/~langec/, Skype duke4701 → Mathematics in Computer Science Special Issue on “Enabling Domain Experts to use Formalised Reasoning”; submission until 31 October. http://cs.bham.ac.uk/research/projects/formare/pubs/mcs-doform/
Re: [O] How to install recent documentation of org 8.2?
thanks a lot! I found the old versions of the org documentation in the same path /usr/share/info and replaced them by the new org file from the doc directory. Sure, when installing the next version I'll have to think of that, but at least now it works. Martin Von: Christoph LANGE math.semantic@gmail.com Organisation: University of Birmingham Datum: Thu, 03 Oct 2013 11:46:39 +0100 An: M elwood...@web.de Cc: emacs orgmode-mailinglist emacs-orgmode@gnu.org Betreff: Re: [O] How to install recent documentation of org 8.2? 2013-10-03 10:27 M: I tried to load the recent documentation with a link to the doc directory in my org-mode 8.2 (expanded contents from git repository) in my .emacs. (add-to-list 'Info-additional-directory-list (expand-file-name ~/mypath/org-mode/org_current/doc)) But this does have no effect. With C-h i, I get displayed a an outdated org-manual. The following worked for me, however in a different environment (Gentoo Linux with org-mode 8.2 installed via the package manager). My Org 8.2 info file ended up in /usr/share/info/org, whereas the one packaged by Emacs is in /usr/share/info/emacs-24. I couldn't get the directory settings in Emacs right, but the following worked: I created my own info directory and prepended it to the INFOPATH environment variable: export INFOPATH=$HOME/.emacs.d/info:$INFOPATH In this directory, I created a symlink to the Org 8.2 info: $ ls -l ~/.emacs.d/info total 0 lrwxrwxrwx 1 clange clange 19 Sep 14 15:20 org - /usr/share/info/org HTH, Christoph -- Christoph Lange, School of Computer Science, University of Birmingham http://cs.bham.ac.uk/~langec/, Skype duke4701 → Mathematics in Computer Science Special Issue on “Enabling Domain Experts to use Formalised Reasoning”; submission until 31 October. http://cs.bham.ac.uk/research/projects/formare/pubs/mcs-doform/
Re: [O] Setup for switching between 2 org-mode configurations (demo/productive)?
Karl Voit devn...@karl-voit.at writes: * M elwood...@web.de wrote: Hi, Hi! I'd like to set up org-mode in a way to separate my personal data from my gerenal settings. and easily re-enable them later. [...] I assume that some of you already have something like that or can recommend a way for doing so? I by myself did chose a manual attempt so far: temporarily modifying org-agenda-files to one demo file [1] and sticking to this demo file only while showing stuff. With my Memacs setup (see sig), I gave up selecting stuff that might be private because every daily agenda shows private stuff (in case or displaying archive files is enabled). It may be worth considering running in a virtual machine. -- Nick
Re: [O] C-c C-c doesn't tick check box when pressed on a hyperlink in a list item
Hello, Christoph LANGE math.semantic@gmail.com writes: this is a bug in Org 8.2 on Emacs 24.3. I can't use org-submit-bug-report right now (see previous mail), so let me try this way. I have a check list like this * [X] item * [ ] item and some of the items contain hyperlinks. When I am on one such hyperlink and press C-c C-c it doesn't tick the check box but says C-c C-c can do nothing useful at this location. Indeed. It should be fixed now. Thank you for reporting it. Regards, -- Nicolas Goaziou
Re: [O] How to install recent documentation of org 8.2?
M elwood...@web.de writes: thanks a lot! I found the old versions of the org documentation in the same path /usr/share/info and replaced them by the new org file from the doc directory. Also Mac, but using emacs from homebrew , | GNU Emacs 24.3.1 (x86_64-apple-darwin12.4.0, NS apple-appkit-1187.39) of 2013-09-05 on Rainers-MacBook-Pro.local ` I followed this with interest, as I have the same problem. Replacing the file with a link, worked for the help via the org-mode menu, but I can't find it in the top level of the info files. Is there anything I have to do in addition? My Info-directory-list is as follow: , | (/Users/rainerkrug/.emacs.d/elpa/auctex-11.87 /Users/rainerkrug/.emacs.d/elpa/magit-20130902.311 /Users/rainerkrug/.emacs.d/elpa/w3m-20130902.1802 /usr/local/info/ /usr/share/info/) ` and I have the org info file in /usr/local/info : , | $ ls /usr/share/info/or* | /usr/share/info/org /usr/share/info/org-1.bak /usr/share/info/org-2.bak /usr/share/info/org.bak ` Even before putting the link in, the org info was not in the top level info. Any suggestions? As far as I though, info would scan the directories to generate the info tree? Sure, when installing the next version I'll have to think of that, but at least now it works. I have a link in my .emacs.d (named org-mode) which I link to the latest version in separate directories (org-VERSIONNUMBER ang org-git). So I can easily switch, and the link would stay there. Cheers, Rainer Martin Von: Christoph LANGE math.semantic@gmail.com Organisation: University of Birmingham Datum: Thu, 03 Oct 2013 11:46:39 +0100 An: M elwood...@web.de Cc: emacs orgmode-mailinglist emacs-orgmode@gnu.org Betreff: Re: [O] How to install recent documentation of org 8.2? 2013-10-03 10:27 M: I tried to load the recent documentation with a link to the doc directory in my org-mode 8.2 (expanded contents from git repository) in my .emacs. (add-to-list 'Info-additional-directory-list (expand-file-name ~/mypath/org-mode/org_current/doc)) But this does have no effect. With C-h i, I get displayed a an outdated org-manual. The following worked for me, however in a different environment (Gentoo Linux with org-mode 8.2 installed via the package manager). My Org 8.2 info file ended up in /usr/share/info/org, whereas the one packaged by Emacs is in /usr/share/info/emacs-24. I couldn't get the directory settings in Emacs right, but the following worked: I created my own info directory and prepended it to the INFOPATH environment variable: export INFOPATH=$HOME/.emacs.d/info:$INFOPATH In this directory, I created a symlink to the Org 8.2 info: $ ls -l ~/.emacs.d/info total 0 lrwxrwxrwx 1 clange clange 19 Sep 14 15:20 org - /usr/share/info/org HTH, Christoph -- Christoph Lange, School of Computer Science, University of Birmingham http://cs.bham.ac.uk/~langec/, Skype duke4701 → Mathematics in Computer Science Special Issue on “Enabling Domain Experts to use Formalised Reasoning”; submission until 31 October. http://cs.bham.ac.uk/research/projects/formare/pubs/mcs-doform/ #secure method=pgpmime mode=sign -- Rainer M. Krug email: RMKrugatgmaildotcom
[O] link interfering with brackets when abbreviated
Hi all The recent bug report below reminds me of a comparable situation with a bug that I wanted to report at some time: #+LINK: link-abbreviation http://www.orgmode.org/# 1) [ ] [[http://www.orgmode.org/#docs]] 2) [[link-abbreviation:docs]] 3) [ ] [[link-abbreviation:docs]] 1 bla bla [ ] [[http://www.orgmode.org/#docs]] 2 bla bla [[link-abbreviation:docs]] 3 bla bla [ ] [[link-abbreviation:docs]] | 1 | [ ] | [[http://www.orgmode.org/#docs]] | | 2 | | [[link-abbreviation:docs]] | | 3 | [ ] | [[link-abbreviation:docs]] | C-c C-o with point on 1 or 2 opens the browser, on 3 I expect the same but an error happens. Michael On Thu, Oct 3, 2013 at 12:56 PM, Christoph LANGE math.semantic@gmail.com wrote: subject: C-c C-c doesn't tick check box when pressed on a hyperlink in a list item this is a bug in Org 8.2 on Emacs 24.3. I can't use org-submit-bug-report right now (see previous mail), so let me try this way. I have a check list like this * [X] item * [ ] item and some of the items contain hyperlinks. When I am on one such hyperlink and press C-c C-c it doesn't tick the check box but says C-c C-c can do nothing useful at this location.
Re: [O] Bug: dates in heading break beamer export
Hello, Daniele Pizzolli d...@toel.it writes: On 10/02/2013 05:55 PM, Nicolas Goaziou wrote: Daniele Pizzolli writes: Yes, I think is fair to drop the markup. OK. I would also think that this is safe default when nested markup is bad. The following patch should protect some fragile commands in a section-like structure. It is Beamer-only since general LaTeX back-end doesn't seem to encounter these problems. Does it fix the problem? Regards, -- Nicolas Goaziou From d8c37c9265fd6a3d45dce4ce86a12b634c9be0fd Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou n.goaz...@gmail.com Date: Thu, 3 Oct 2013 15:11:03 +0200 Subject: [PATCH] ox-beamer: Protect fragile commands in sections * lisp/ox-beamer.el (org-beamer--format-section): Protect fragile commands in sections. --- lisp/ox-beamer.el | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el index a975d24..b812a75 100644 --- a/lisp/ox-beamer.el +++ b/lisp/ox-beamer.el @@ -444,9 +444,25 @@ INFO is a plist used as a communication channel. Format HEADLINE as a sectioning part. CONTENTS holds the contents of the headline. INFO is a plist used as a communication channel. - ;; Use `latex' back-end output, inserting overlay specifications - ;; if possible. - (let ((latex-headline (org-export-with-backend 'latex headline contents info)) + ;; Use `latex' back-end output, inserting overlay specifications if + ;; possible. Also protect fragile commands. + (let ((latex-headline + (org-export-data-with-backend + headline + (org-export-create-backend + :parent 'latex + :transcoders + (let ((protected-output + (function + (lambda (object contents info) + (let ((code (org-export-with-backend + 'beamer object contents info))) + (if (org-string-nw-p code) (concat \\protect code) + code)) + (mapcar #'(lambda (type) (cons type protected-output)) + '(bold footnote-reference italic strike-through + timestamp underline + info)) (mode-specs (org-element-property :BEAMER_ACT headline))) (if (and mode-specs (string-match \\`\\(.*?\\)\\(?:\\*\\|\\[.*\\]\\)?{ -- 1.8.4
[O] Using Multiple TODO Keywords
[ Ubuntu; Org 8.2 ] I've defined this: (setq org-todo-keywords '((sequence TODO PENDING | CANCELED DONE))) And then created a simple, repeating task: ** TODO Mow the lawn 2013-10-03 Thu +1w When I use `t' or C-c C-t, the keywords change from TODO, to PENDING, to CANCELED, and then repeat *only those three states*. Shouldn't I be able to use the above to mark the this week's task as DONE? Sorry if I'm missing something obvious! -- Prof Kenneth H Jacker k...@cs.appstate.edu Computer Science Dept www.cs.appstate.edu/~khj Appalachian State Univ Boone, NC 28608 USA
[O] ob-clojure.el alternative using nrepl
Hi all, Current method of clojure evaluation is through slime. I couldn't get it to work, when I tried long ago. So I attach one that uses nrepl. Switching between the two should be as easy as using (require 'ob-clojure) or (require 'ob-clojure-nrepl). regards, Oleh
Re: [O] ob-clojure.el alternative using nrepl
I guess that I forgot the attachment. Oleh On Thu, Oct 3, 2013 at 5:45 PM, Oleh ohwoeo...@gmail.com wrote: Hi all, Current method of clojure evaluation is through slime. I couldn't get it to work, when I tried long ago. So I attach one that uses nrepl. Switching between the two should be as easy as using (require 'ob-clojure) or (require 'ob-clojure-nrepl). regards, Oleh 0001-ob-clojure-nrepl.el-Added-nrepl-alternative-to-ob-cl.patch Description: Binary data
Re: [O] ob-clojure.el alternative using nrepl
Hi Oleh, Oleh ohwoeo...@gmail.com writes: Current method of clojure evaluation is through slime. I couldn't get it to work, when I tried long ago. So I attach one that uses nrepl. Switching between the two should be as easy as using (require 'ob-clojure) or (require 'ob-clojure-nrepl). Nice, something needed. I guess we should rather have an option for this in ob-clojure.el, letting users decide whether they want to use nrepl.el or slime, a sensible default being to use nrepl.el. What do you think? -- Bastien
[O] link referencing does not work for headings including dates?
Dear All, I'd like to use headings, which display dates (live) as well. This seems to be practical when browsing org file. So one can see at first sight when e.g. meeting was held: ** Changelog *** meeting 2013-10-03 Thu 17:41 *** meeting Cristina 2013-09-13 Fri 14:41 *** short meeting after holidays 2013-09-04 Wed 09:09 *** meeting - seems finally OK 2013-06-27 Thu 17:00 Now, the trouble is, that when I invoke org-store-link in any of those headings containing date, only the textual part gets copied. Such link, when pasted, does not work. Instead I get message claiming that link does not exist, and asking whether I want to create a new one anyone knows how to avoid this problem while still using 'visible' dates? I want to have those dates visible at first sight without need of opening the heading... many thanks .d.
Re: [O] ob-clojure.el alternative using nrepl
Here's an updated patch. I use defalias, is that OK? Oleh On Thu, Oct 3, 2013 at 6:23 PM, Bastien b...@gnu.org wrote: Hi Oleh, Oleh ohwoeo...@gmail.com writes: Should I rather put the code in ob-clojure.el with something like (defcustom ob-clojure-method nrepl)? Yes, I think it's better. Maybe (defcustom ob-clojure-repl 'nrepl) Let's discuss this on the list so that others can chime in. Thanks for bringing this up! -- Bastien 0001-ob-clojure.el-switch-to-nREPL-as-the-main-method-of-.patch Description: Binary data
Re: [O] Yet another question about email and org-mode
Suvayu Ali fatkasuvayu+li...@gmail.com writes: On Wed, Oct 02, 2013 at 11:24:18AM -0700, Josiah Schwab wrote: Hi Alan, I am happy to use native emacs mail, for sending email. What I want to be able to do is keep a copy of my email in an org-mode file. Taking a step back, is there a reason that you want to keep a copy of the email contents in the org file, as opposed to including a link to the email message? I would ask the same question. Specially when Org supports so many URI schemes for emails: gnus, mhe, rmail, notmuch, vm, vm-imap, wl. Even simple file links to maildirs would work too. If you like the Gmail web interface, linking to that is also possible! or, to turn it around completely, what about defining an org backend for gnus, i.e. nnorg, which stores emails using org format, modelled along the nnmbox backend [[info:(gnus) Unix Mail Box]]? You could then use the GCC gnus header. only partly in jest... ;-) -- : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5
Re: [O] Setup for switching between 2 org-mode configurations (demo/productive)?
* Nick Dokos ndo...@gmail.com wrote: Karl Voit devn...@karl-voit.at writes: With my Memacs setup (see sig), I gave up selecting stuff that might be private because every daily agenda shows private stuff (in case or displaying archive files is enabled). It may be worth considering running in a virtual machine. If I had to do this on a monthly basis or similar, you are absolutely right, yes. However, unfortunately I give Org-mode/Memacs demos probably twice a year or so. It's not worth the hazzle/disk space/effort. -- 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] ob-clojure.el alternative using nrepl
Thanks for this update. Oleh ohwoeo...@gmail.com writes: Here's an updated patch. I use defalias, is that OK? Two changes. 1. instead of customization through a defalias, use defcustom and a variable which determines which function (eval-slime or eval-nrepl) is called. 2. ob-*.el files should not require ob-tangle. If you prefer not to make these changes I can apply your patch, and then make the required changes myself over-top. Best, Oleh On Thu, Oct 3, 2013 at 6:23 PM, Bastien b...@gnu.org wrote: Hi Oleh, Oleh ohwoeo...@gmail.com writes: Should I rather put the code in ob-clojure.el with something like (defcustom ob-clojure-method nrepl)? Yes, I think it's better. Maybe (defcustom ob-clojure-repl 'nrepl) Let's discuss this on the list so that others can chime in. Thanks for bringing this up! -- Bastien From ab5c9a8844b4103e40cd4c135f297a7089cd7cdf Mon Sep 17 00:00:00 2001 From: Oleh Krehel ohwoeo...@gmail.com Date: Thu, 3 Oct 2013 18:23:16 +0200 Subject: [PATCH] ob-clojure.el: switch to nREPL as the main method of evaluating Clojure. Get the old behavior with: (defalias 'org-babel-execute:clojure 'org-babel--execute-clojure-slime) --- lisp/ob-clojure.el | 34 ++ 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/lisp/ob-clojure.el b/lisp/ob-clojure.el index bc2bbc0..3b82f0a 100644 --- a/lisp/ob-clojure.el +++ b/lisp/ob-clojure.el @@ -2,8 +2,8 @@ ;; Copyright (C) 2009-2013 Free Software Foundation, Inc. -;; Author: Joel Boehland -;; Eric Schulte +;; Author: Joel Boehland, Eric Schulte, Oleh Krehel +;; ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org @@ -24,20 +24,26 @@ ;;; Commentary: -;;; support for evaluating clojure code, relies on slime for all eval +;;; support for evaluating clojure code, relies either on slime or +;;; on nrepl for all eval ;;; Requirements: ;;; - clojure (at least 1.2.0) ;;; - clojure-mode -;;; - slime +;;; - either slime or nrepl -;;; By far, the best way to install these components is by following -;;; the directions as set out by Phil Hagelberg (Technomancy) on the -;;; web page: http://technomancy.us/126 +;;; For SLIME-way, the best way to install these components is by +;;; following the directions as set out by Phil Hagelberg (Technomancy) +;;; on the web page: http://technomancy.us/126 + +;;; For nREPL-way: +;;; get clojure is with https://github.com/technomancy/leiningen +;;; get nrepl from MELPA (clojure-mode is a dependency). ;;; Code: (require 'ob) +(require 'ob-tangle) (declare-function slime-eval ext:slime (sexp optional package)) @@ -72,7 +78,7 @@ (format (clojure.core/with-out-str %s) body)) (t body -(defun org-babel-execute:clojure (body params) +(defun org-babel--execute-clojure-slime (body params) Execute a block of Clojure code with Babel. (require 'slime) (with-temp-buffer @@ -88,6 +94,18 @@ ,(buffer-substring-no-properties (point-min) (point-max))) (cdr (assoc :package params)) +(defun org-babel--execute-clojure-nrepl (body params) + Execute a block of Clojure code with Babel and nREPL. + (require 'nrepl) + (if (nrepl-current-connection-buffer) + (let* ((result (nrepl-eval body)) + (s (plist-get result :stdout)) + (r (plist-get result :value))) +(if s (concat s \n r) r)) +(error nREPL not connected! Use M-x nrepl-jack-in.))) + +(defalias 'org-babel-execute:clojure 'org-babel--execute-clojure-nrepl) + (provide 'ob-clojure) -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D
[O] How to install recent documentation of org 8.2?
I tried to get a recent documentation in my org-mode: I'm using Aquamacs 2.5 on MacOS X, which seems to have org-mode 6.33 onboard. I tried to load the recent documentation with a link to the doc directory in my org-mode 8.2 (expanded contents from git repository) in my .emacs. (add-to-list 'Info-additional-directory-list (expand-file-name ~/mypath/org-mode/org_current/doc)) But this does have no effect. With C-h i, I get displayed a an outdated org-manual. Is the doc directory the right one or do I have to download the documentation separately? I had downloaded the zipped version from http://orgmode.org/org-8.2.1.zip . Kind regards Martin
Re: [O] ob-clojure.el alternative using nrepl
Hi Eric, I can make the changes tomorrow. Or you can make them now if you like. I required ob-tangle because it's a pre-requisite for ob-clojure: an error is thrown if I try to load ob-clojure before ob-tangle. So it makes sense to me to require it. regards, Oleh On Thu, Oct 3, 2013 at 8:06 PM, Eric Schulte schulte.e...@gmail.com wrote: Thanks for this update. Oleh ohwoeo...@gmail.com writes: Here's an updated patch. I use defalias, is that OK? Two changes. 1. instead of customization through a defalias, use defcustom and a variable which determines which function (eval-slime or eval-nrepl) is called. 2. ob-*.el files should not require ob-tangle. If you prefer not to make these changes I can apply your patch, and then make the required changes myself over-top. Best, Oleh On Thu, Oct 3, 2013 at 6:23 PM, Bastien b...@gnu.org wrote: Hi Oleh, Oleh ohwoeo...@gmail.com writes: Should I rather put the code in ob-clojure.el with something like (defcustom ob-clojure-method nrepl)? Yes, I think it's better. Maybe (defcustom ob-clojure-repl 'nrepl) Let's discuss this on the list so that others can chime in. Thanks for bringing this up! -- Bastien From ab5c9a8844b4103e40cd4c135f297a7089cd7cdf Mon Sep 17 00:00:00 2001 From: Oleh Krehel ohwoeo...@gmail.com Date: Thu, 3 Oct 2013 18:23:16 +0200 Subject: [PATCH] ob-clojure.el: switch to nREPL as the main method of evaluating Clojure. Get the old behavior with: (defalias 'org-babel-execute:clojure 'org-babel--execute-clojure-slime) --- lisp/ob-clojure.el | 34 ++ 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/lisp/ob-clojure.el b/lisp/ob-clojure.el index bc2bbc0..3b82f0a 100644 --- a/lisp/ob-clojure.el +++ b/lisp/ob-clojure.el @@ -2,8 +2,8 @@ ;; Copyright (C) 2009-2013 Free Software Foundation, Inc. -;; Author: Joel Boehland -;; Eric Schulte +;; Author: Joel Boehland, Eric Schulte, Oleh Krehel +;; ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org @@ -24,20 +24,26 @@ ;;; Commentary: -;;; support for evaluating clojure code, relies on slime for all eval +;;; support for evaluating clojure code, relies either on slime or +;;; on nrepl for all eval ;;; Requirements: ;;; - clojure (at least 1.2.0) ;;; - clojure-mode -;;; - slime +;;; - either slime or nrepl -;;; By far, the best way to install these components is by following -;;; the directions as set out by Phil Hagelberg (Technomancy) on the -;;; web page: http://technomancy.us/126 +;;; For SLIME-way, the best way to install these components is by +;;; following the directions as set out by Phil Hagelberg (Technomancy) +;;; on the web page: http://technomancy.us/126 + +;;; For nREPL-way: +;;; get clojure is with https://github.com/technomancy/leiningen +;;; get nrepl from MELPA (clojure-mode is a dependency). ;;; Code: (require 'ob) +(require 'ob-tangle) (declare-function slime-eval ext:slime (sexp optional package)) @@ -72,7 +78,7 @@ (format (clojure.core/with-out-str %s) body)) (t body -(defun org-babel-execute:clojure (body params) +(defun org-babel--execute-clojure-slime (body params) Execute a block of Clojure code with Babel. (require 'slime) (with-temp-buffer @@ -88,6 +94,18 @@ ,(buffer-substring-no-properties (point-min) (point-max))) (cdr (assoc :package params)) +(defun org-babel--execute-clojure-nrepl (body params) + Execute a block of Clojure code with Babel and nREPL. + (require 'nrepl) + (if (nrepl-current-connection-buffer) + (let* ((result (nrepl-eval body)) + (s (plist-get result :stdout)) + (r (plist-get result :value))) +(if s (concat s \n r) r)) +(error nREPL not connected! Use M-x nrepl-jack-in.))) + +(defalias 'org-babel-execute:clojure 'org-babel--execute-clojure-nrepl) + (provide 'ob-clojure) -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D
[O] Disabling TODO entries in a subtree
Hi Orgers, I work as an editorial assistant for a journal (together with a friend). We get LaTeX files of articles, and have to convert them to our template, do some proof-reading and corrections, send galleys to authors etc. It is convenient to have a TODO Org tree for each paper, with TODO subheadings for all these activities. Thus, I created a tree called Paper template with all these TODO entries and copy it as needed. However, I do not want them to show up an the agenda's todo list. Is there a possibility to disable a tree, so that no its subheadings appear in the global todo list? If not, it's not a huge problem for me - I'll just write a small elisp function inserting my template - but if it's not possible, maybe (and this is a huge maybe!) such a feature is worth adding to Org-mode? Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
Re: [O] Disabling TODO entries in a subtree
On Thu, Oct 3, 2013 at 2:32 PM, Marcin Borkowski mb...@wmi.amu.edu.pl wrote: Hi Orgers, I work as an editorial assistant for a journal (together with a friend). We get LaTeX files of articles, and have to convert them to our template, do some proof-reading and corrections, send galleys to authors etc. It is convenient to have a TODO Org tree for each paper, with TODO subheadings for all these activities. Thus, I created a tree called Paper template with all these TODO entries and copy it as needed. However, I do not want them to show up an the agenda's todo list. Is there a possibility to disable a tree, so that no its subheadings appear in the global todo list? Custom agenda that excludes certain tags? Perhaps there's a way to propagate some tag to the contents of the tree? Then exclude any items with that tag? Just a thought, John If not, it's not a huge problem for me - I'll just write a small elisp function inserting my template - but if it's not possible, maybe (and this is a huge maybe!) such a feature is worth adding to Org-mode? Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
Re: [O] ob-clojure.el alternative using nrepl
Oleh ohwoeo...@gmail.com writes: Hi Eric, I can make the changes tomorrow. Or you can make them now if you like. Please try out the attached patch which may be applied overtop of your patch and let me know if it works? I had to guess at the two nrepl function arguments. From ee6c792ec7657e50524d78d309538e7e58bb2989 Mon Sep 17 00:00:00 2001 From: Eric Schulte schulte.e...@gmail.com Date: Thu, 3 Oct 2013 13:25:46 -0600 Subject: [PATCH 2/2] ob-clojure nrepl customization variable - ensure body is expanded for n-repl as well - declare n-repl functions - remove require ob-tangle from ob-clojure * lisp/ob-clojure.el (org-babel-clojure-backend): Customization variable to select clojure backend (nrepl-eval): Declared function. (nrepl-current-connection-buffer): Declared function. (org-babel-execute:clojure): Execution now uses customized backend. --- lisp/ob-clojure.el | 59 +- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/lisp/ob-clojure.el b/lisp/ob-clojure.el index 3b82f0a..255fe8d 100644 --- a/lisp/ob-clojure.el +++ b/lisp/ob-clojure.el @@ -43,9 +43,10 @@ ;;; Code: (require 'ob) -(require 'ob-tangle) (declare-function slime-eval ext:slime (sexp optional package)) +(declare-function nrepl-current-connection-buffer ext:nrepl ()) +(declare-function nrepl-eval ext:nrepl (body)) (defvar org-babel-tangle-lang-exts) (add-to-list 'org-babel-tangle-lang-exts '(clojure . clj)) @@ -53,6 +54,11 @@ (defvar org-babel-default-header-args:clojure '()) (defvar org-babel-header-args:clojure '((package . :any))) +(defcustom org-babel-clojure-backend 'nrepl + Backend used to evaluate Clojure code blocks. + :group 'org-babel + :type 'symbol) + (defun org-babel-expand-body:clojure (body params) Expand BODY according to PARAMS, return the expanded body. (let* ((vars (mapcar #'cdr (org-babel-get-header params :var))) @@ -78,33 +84,32 @@ (format (clojure.core/with-out-str %s) body)) (t body -(defun org-babel--execute-clojure-slime (body params) +(defun org-babel-execute:clojure (body params) Execute a block of Clojure code with Babel. - (require 'slime) - (with-temp-buffer -(insert (org-babel-expand-body:clojure body params)) -((lambda (result) - (let ((result-params (cdr (assoc :result-params params - (org-babel-result-cond result-params - result - (condition-case nil (org-babel-script-escape result) - (error result) - (slime-eval - `(swank:eval-and-grab-output - ,(buffer-substring-no-properties (point-min) (point-max))) - (cdr (assoc :package params)) - -(defun org-babel--execute-clojure-nrepl (body params) - Execute a block of Clojure code with Babel and nREPL. - (require 'nrepl) - (if (nrepl-current-connection-buffer) - (let* ((result (nrepl-eval body)) - (s (plist-get result :stdout)) - (r (plist-get result :value))) -(if s (concat s \n r) r)) -(error nREPL not connected! Use M-x nrepl-jack-in.))) - -(defalias 'org-babel-execute:clojure 'org-babel--execute-clojure-nrepl) + (let ((expanded (org-babel-expand-body:clojure body params))) +(case org-babel-clojure-backend + (slime + (require 'slime) + (with-temp-buffer + (insert expanded) + ((lambda (result) + (let ((result-params (cdr (assoc :result-params params + (org-babel-result-cond result-params + result + (condition-case nil (org-babel-script-escape result) + (error result) + (slime-eval + `(swank:eval-and-grab-output + ,(buffer-substring-no-properties (point-min) (point-max))) + (cdr (assoc :package params)) + (nrepl + (require 'nrepl) + (if (nrepl-current-connection-buffer) + (let* ((result (nrepl-eval expanded)) + (s (plist-get result :stdout)) + (r (plist-get result :value))) + (if s (concat s \n r) r)) + (error nREPL not connected! Use M-x nrepl-jack-in.)) (provide 'ob-clojure) -- 1.8.4 I required ob-tangle because it's a pre-requisite for ob-clojure: an error is thrown if I try to load ob-clojure before ob-tangle. So it makes sense to me to require it. I don't see this. With the latest version of Org-mode I'm able to require ob-clojure w/o any problems when starting with no configuration (e.g., emacs -Q). Cheers, regards, Oleh On Thu, Oct 3, 2013 at 8:06 PM, Eric Schulte schulte.e...@gmail.com wrote: Thanks for this update. Oleh ohwoeo...@gmail.com writes: Here's an updated patch. I use defalias, is that OK? Two changes. 1. instead of customization through a defalias, use defcustom and a variable which determines which function (eval-slime or eval-nrepl) is called. 2. ob-*.el files should not require ob-tangle. If you prefer not to make these changes I can apply your patch, and then make the required changes myself over-top. Best, Oleh On Thu, Oct 3, 2013 at 6:23 PM,
Re: [O] Disabling TODO entries in a subtree
On 3.10.2013, at 21:45, John Hendy jw.he...@gmail.com wrote: On Thu, Oct 3, 2013 at 2:32 PM, Marcin Borkowski mb...@wmi.amu.edu.pl wrote: Hi Orgers, I work as an editorial assistant for a journal (together with a friend). We get LaTeX files of articles, and have to convert them to our template, do some proof-reading and corrections, send galleys to authors etc. It is convenient to have a TODO Org tree for each paper, with TODO subheadings for all these activities. Thus, I created a tree called Paper template with all these TODO entries and copy it as needed. However, I do not want them to show up an the agenda's todo list. Is there a possibility to disable a tree, so that no its subheadings appear in the global todo list? Custom agenda that excludes certain tags? Perhaps there's a way to propagate some tag to the contents of the tree? Then exclude any items with that tag? To exclude a specific TODO keyword or so, you can try agenda filters. Check them out in the manual and in also check out the variable org-agenda-tag-filter-preset. To exclude a specific tree, you can try to tag the tree with the ARCHIVE tag. - Carsten Just a thought, John If not, it's not a huge problem for me - I'll just write a small elisp function inserting my template - but if it's not possible, maybe (and this is a huge maybe!) such a feature is worth adding to Org-mode? Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University signature.asc Description: Message signed with OpenPGP using GPGMail
Re: [O] ob-clojure.el alternative using nrepl
Hi Eric, Eric Schulte schulte.e...@gmail.com writes: Please try out the attached patch which may be applied overtop of your patch and let me know if it works? I had to guess at the two nrepl function arguments. It works fine for nrepl.el, thanks a lot! -- Bastien
Re: [O] Disabling TODO entries in a subtree
On Thu, Oct 03, 2013 at 09:32:24PM +0200, Marcin Borkowski wrote: list. Is there a possibility to disable a tree, so that no its subheadings appear in the global todo list? Did you try archiving the whole tree? -- Suvayu Open source is the future. It sets us free.
Re: [O] Limit subtree to a specific export backend
2013/9/30 Sebastien Vauban sva-n...@mygooglest.com: A partly manual solution would be to use tags for which sections to export in which backend, make a sparse tree with the backend you're interested to export, and export what's visible? I am by far not an Org mode expert, and have never used sparse trees. Would you mind to point me to the appropriate manual section, or give me some details on how to create a sparse tree matching a specific tag only?
Re: [O] ob-clojure.el alternative using nrepl
Bastien b...@altern.org writes: Hi Eric, Eric Schulte schulte.e...@gmail.com writes: Please try out the attached patch which may be applied overtop of your patch and let me know if it works? I had to guess at the two nrepl function arguments. It works fine for nrepl.el, thanks a lot! Alright, I just pushed this up. Thanks for testing, I haven't used Clojure in a couple of years now (since happily moving on to Common Lisp as my lisp of choice). Thanks to Oleh for the patch! Cheers, -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D
Re: [O] Disabling TODO entries in a subtree
Dnia 2013-10-03, o godz. 21:32:24 Marcin Borkowski mb...@wmi.amu.edu.pl napisał(a): Hi Orgers, I work as an editorial assistant for a journal (together with a friend). We get LaTeX files of articles, and have to convert them to our template, do some proof-reading and corrections, send galleys to authors etc. It is convenient to have a TODO Org tree for each paper, with TODO subheadings for all these activities. Thus, I created a tree called Paper template with all these TODO entries and copy it as needed. However, I do not want them to show up an the agenda's todo list. Is there a possibility to disable a tree, so that no its subheadings appear in the global todo list? If not, it's not a huge problem for me - I'll just write a small elisp function inserting my template - but if it's not possible, maybe (and this is a huge maybe!) such a feature is worth adding to Org-mode? And now for something completely different;): I sent my email, then went asleep. I woke half an hour ago, and a thought occured to me: checkboxes. And now a little game: I wonder how many of the answers I got mentioned this idea;). Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
Re: [O] Disabling TODO entries in a subtree
Dnia 2013-10-04, o godz. 05:24:45 Marcin Borkowski mb...@wmi.amu.edu.pl napisał(a): I sent my email, then went asleep. I woke half an hour ago, and a thought occured to me: checkboxes. And now a little game: I wonder how many of the answers I got mentioned this idea;). Wow, /now/ I'm impressed! None of them did. Org features are like the Spanish Inquisition! Thank you, guys! -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
Re: [O] Getting rid of split frame with org-capture
I also wanted to have new pop-up org-capture window that would be created in response to some shortcut anywhere in Windows and occupied the entire frame. Since I haven't found any solutions, I just modified a function I saw in this thread: (defun make-capture-frame () Create a new frame and run org-capture. (interactive) (make-frame '((name . capture))) (select-frame-by-name capture) (delete-other-windows) (flet ((switch-to-buffer-other-window (buf) (switch-to-buffer buf))) (org-capture))) The culprit is switch-to-buffer-other-window that ultimately gets called by org-capture so I just reassign it temporarily to switch-to-buffer. Then I use AutoHotkey to create a shortcut that would call emacsclient with the new function. I am experimenting with AutoHotkey to construct application-dependent org-mode-style links on the clipboard so that I can use %x parameter in my capture templates to insert them. The current version of my AutoHotkey script creates links when in Google Chrome or Excel: https://github.com/alexvorobiev/autohotkey/blob/master/AutoHotkey.ahk The shortcut is Win-` Regards, Alex On Wed, Dec 14, 2011 at 10:37 AM, Tom Prince tom.pri...@ualberta.netwrote: On Wed, 14 Dec 2011 00:11:11 +0100, Andreas Leha andreas.l...@med.uni-goettingen.de wrote: While it works well on my emacs23, the emacs24 snapshot from http://emacs.naquadah.org/ crashes, when I select a template. Is this a general issue with emacs24? Ideas to adapt the snippet to work with emacs24? What do you mean by crash? Does the emacs process exit? In that case, I would try reporting the problem to some emacs forum ... I don't think emacs should be crashing given any elisp code, certainly not this code. Tom
Re: [O] How to install recent documentation of org 8.2?
Martin Beck martin.b...@macbay.de writes: I tried to get a recent documentation in my org-mode: I'm using Aquamacs 2.5 on MacOS X, which seems to have org-mode 6.33 onboard. I tried to load the recent documentation with a link to the doc directory in my org-mode 8.2 (expanded contents from git repository) in my .emacs. (add-to-list 'Info-additional-directory-list (expand-file-name ~/mypath/org-mode/org_current/doc)) But this does have no effect. With C-h i, I get displayed a an outdated org-manual. Is the doc directory the right one or do I have to download the documentation separately? I had downloaded the zipped version from http://orgmode.org/org-8.2.1.zip . Here is a thread which discussed this issue extensively. http://comments.gmane.org/gmane.emacs.orgmode/71129 Thanks and Regards Noorul
Re: [O] [RFC] Simple cache mechanism for `org-element-at-point'
Nicolas Goaziou n.goaz...@gmail.com writes: Hello, The following patches introduce a simple cache mechanism for both `org-element-at-point' and `org-element-context'. My goal is to make them fast enough to be used in most core commands (excepted headlines-only commands). Since a wrong cache can break Org behaviour badly, I would appreciate if it could be tested a bit. You can disable cache at any time by setting `org-element-use-cache' to nil and reset it with `org-element-cache-reset' function. It may also be interesting to tweak `org-element--cache-sync-idle-time' and `org-element--cache-merge-changes-threshold', although I don't expect a regular user to do it. Anyway, it may lead to better default values. Since cache is updated upon buffer modification, visibility status cannot be cached properly. Since it is also buggy, the first patch removes that data altogether. Cool! Anything in particular that we should be looking out for (structure editing, export, etc)? It has so far not set my computer on fire.