[O] Unable to get file link search to work

2014-02-21 Thread Alexis

Hi all,

i'm running org-mode 8.2.5h in Emacs 24.3.

Say i have file a.org:

  * Main
  ** Group
  *** Firstname Lastname

My reading of

http://orgmode.org/manual/External-links.html#External-links

and

http://orgmode.org/manual/Search-options.html#Search-options

is that i should be able to, in b.org - which resides in the same
directory as a.org - have something like:

  [[file+emacs:a.org::*Firstname]]

such that when i move point over that link, and enter C-c C-o
(i.e. org-open-at-point), i will be taken to a buffer containing a.org,
with point on the 'Firstname Lastname' heading. Instead, what happens is
that a new buffer is created, attached to a new file called, literally,
'a.org::*Firstname'.

Similarly, if in b.org i have something like:

  [[file+emacs:a.org::2]]

i am not taken to line 2 of a.org, but instead to a new buffer attached
to a new file literally called 'a.org::2'.

i have observed this behaviour with
org-link-search-must-match-exact-headline set to either 'query-to-create
or to nil.

What am i doing wrong?


Alexis.



Re: [O] Conditional in table formula with times

2014-02-21 Thread Sebastien Vauban
Loris Bennett wrote:
 I'm trying to keep track of total time spend at work, but I am having
 trouble with a conditional in table formula:

 | *Day*| *Came* | *Went* | *Worked* | *Required* |   *Diff* |
 |--+++--++--|
 | [2014-01-06 Mon] |   8:00 |  17:00 | 09:00:00 |   00:00:00 | 09:00:00 |
 | [2014-01-07 Tue] ||| 00:00:00 |   00:00:00 | 00:00:00 |
 | [2014-01-08 Wed] |   8:10 |  16:30 | 08:20:00 |   00:00:00 | 08:20:00 |
 | [2014-01-09 Thu] |   7:55 |  17:05 | 09:10:00 |   00:00:00 | 09:10:00 |
 | [2014-01-10 Fri] |   8:00 |  17:05 | 09:05:00 |   00:00:00 | 09:05:00 |
 #+TBLFM: $4=$3-$2;T::$5=if($4  0,8:18:00,00:00:00);T::$6=$4-$5;T

 Can anyone enlighten me as to why I get 00:00:00 in the first case?

Not answering your question...

Just wanted to mention that, for this type of task, you probably should
have a look at the clocking mechanisms (C-c C-x C-i and the like), and
use them to generate tables like the above, or bills for clients, etc.

Using proper clocking brings you many advantages, whose main (IMO) is
the clock check feature, where you can check that you don't have
unintended clocking gaps during the day, nor clocking overlap...

Best regards,
  Seb

-- 
Sebastien Vauban




[O] LaTeX export: Handle hash symbol in footnote url links

2014-02-21 Thread Michael Bach
Dear org-mode Devs and Users,

I am trying to export the following snippet

#+BEGIN_ORG
* LaTeX export of url with hash symbol

The Org mode export facilities can be used to export Org documents or
parts of Org documents to a variety of other formats.[fn:1]

* Footnotes

[fn:1] [[http://orgmode.org/org.html#Exporting]]
#+END_ORG

Now the exported .tex file contains the link as
: \footnote{\url{http://orgmode.org/org.html#Exporting}}

Which LaTeX does not like:
: Illegal parameter number in definition of \Hy@tempa

FWIW, there is a workaround for the percent symbol described on SO[1]
using `\urldef` - but this does not work with the hash symbol.

Is there another workaround/solution that works with org-mode?

[1] bit.ly/1cwYJaM




Re: [O] LaTeX export: Handle hash symbol in footnote url links

2014-02-21 Thread Vladimir Lomov
Hello,
** Michael Bach [2014-02-21 11:52:14 +0100]:

 Dear org-mode Devs and Users,

 I am trying to export the following snippet

 #+BEGIN_ORG
 * LaTeX export of url with hash symbol

 The Org mode export facilities can be used to export Org documents or
 parts of Org documents to a variety of other formats.[fn:1]

 * Footnotes

 [fn:1] [[http://orgmode.org/org.html#Exporting]]
 #+END_ORG

 Now the exported .tex file contains the link as
 : \footnote{\url{http://orgmode.org/org.html#Exporting}}

 Which LaTeX does not like:
 : Illegal parameter number in definition of \Hy@tempa

 FWIW, there is a workaround for the percent symbol described on SO[1]
 using `\urldef` - but this does not work with the hash symbol.

 Is there another workaround/solution that works with org-mode?

Hash (#), as well as several other symbols have to be espaced when used
as is in LaTeX documents. See, for example, The Not So Short
Introduction to LaTeX2e, 1.3.2 Special Characters. In general it is
duty of ox-latex (LaTeX export backend) to espace such characters.

 [1] bit.ly/1cwYJaM

---
WBR, Vladimir Lomov

-- 
God grant us the serenity to accept the things we cannot change, courage to
change the things we can, and wisdom to know the difference.



Re: [O] Conditional in table formula with times

2014-02-21 Thread Loris Bennett
Hi Seb,

Sebastien Vauban sva-n...@mygooglest.com
writes:

 Loris Bennett wrote:
 I'm trying to keep track of total time spend at work, but I am having
 trouble with a conditional in table formula:

 | *Day*| *Came* | *Went* | *Worked* | *Required* |   *Diff* |
 |--+++--++--|
 | [2014-01-06 Mon] |   8:00 |  17:00 | 09:00:00 |   00:00:00 | 09:00:00 |
 | [2014-01-07 Tue] ||| 00:00:00 |   00:00:00 | 00:00:00 |
 | [2014-01-08 Wed] |   8:10 |  16:30 | 08:20:00 |   00:00:00 | 08:20:00 |
 | [2014-01-09 Thu] |   7:55 |  17:05 | 09:10:00 |   00:00:00 | 09:10:00 |
 | [2014-01-10 Fri] |   8:00 |  17:05 | 09:05:00 |   00:00:00 | 09:05:00 |
 #+TBLFM: $4=$3-$2;T::$5=if($4  0,8:18:00,00:00:00);T::$6=$4-$5;T

 Can anyone enlighten me as to why I get 00:00:00 in the first case?

 Not answering your question...

 Just wanted to mention that, for this type of task, you probably should
 have a look at the clocking mechanisms (C-c C-x C-i and the like), and
 use them to generate tables like the above, or bills for clients, etc.

 Using proper clocking brings you many advantages, whose main (IMO) is
 the clock check feature, where you can check that you don't have
 unintended clocking gaps during the day, nor clocking overlap...

 Best regards,
   Seb

I do already use clocking for certain areas of activity.  However, I
would need nested clocking, i.e. a clock for at work/not at work
which I can clock into at the beginning of the day an out of at the end
of the day and within that the ability to clock into to and out of
various activities.  Is that possible?

Cheers,

Loris

-- 
This signature is currently under construction.




Re: [O] Conditional in table formula with times

2014-02-21 Thread Sebastien Vauban
Loris Bennett wrote:
 Sebastien Vauban writes:
 Loris Bennett wrote:
 I'm trying to keep track of total time spend at work, but I am having
 trouble with a conditional in table formula:

 | *Day*| *Came* | *Went* | *Worked* | *Required* |   *Diff* |
 |--+++--++--|
 | [2014-01-06 Mon] |   8:00 |  17:00 | 09:00:00 |   00:00:00 | 09:00:00 |
 | [2014-01-07 Tue] ||| 00:00:00 |   00:00:00 | 00:00:00 |
 | [2014-01-08 Wed] |   8:10 |  16:30 | 08:20:00 |   00:00:00 | 08:20:00 |
 | [2014-01-09 Thu] |   7:55 |  17:05 | 09:10:00 |   00:00:00 | 09:10:00 |
 | [2014-01-10 Fri] |   8:00 |  17:05 | 09:05:00 |   00:00:00 | 09:05:00 |
 #+TBLFM: $4=$3-$2;T::$5=if($4  0,8:18:00,00:00:00);T::$6=$4-$5;T

 Can anyone enlighten me as to why I get 00:00:00 in the first case?

 Not answering your question...

 Just wanted to mention that, for this type of task, you probably should
 have a look at the clocking mechanisms (C-c C-x C-i and the like), and
 use them to generate tables like the above, or bills for clients, etc.

 Using proper clocking brings you many advantages, whose main (IMO) is
 the clock check feature, where you can check that you don't have
 unintended clocking gaps during the day, nor clocking overlap...

 I do already use clocking for certain areas of activity.  However, I
 would need nested clocking, i.e. a clock for at work/not at work
 which I can clock into at the beginning of the day an out of at the end
 of the day and within that the ability to clock into to and out of
 various activities.  Is that possible?

I do have personal tasks into personal.org, and work tasks in work.org
(and many others).

Those files have FILETAGS (set to :personal: and :work:) so that I don't
have to manually tag every section, etc.

Then, in your clocktable, you can include/exclude clock information
based on the tag.

So, yes, what you ask seems possible to me!

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Conditional in table formula with times

2014-02-21 Thread Loris Bennett
Sebastien Vauban sva-n...@mygooglest.com
writes:

 Loris Bennett wrote:
 Sebastien Vauban writes:
 Loris Bennett wrote:
 I'm trying to keep track of total time spend at work, but I am having
 trouble with a conditional in table formula:

 | *Day*| *Came* | *Went* | *Worked* | *Required* |   *Diff* |
 |--+++--++--|
 | [2014-01-06 Mon] |   8:00 |  17:00 | 09:00:00 |   00:00:00 | 09:00:00 |
 | [2014-01-07 Tue] ||| 00:00:00 |   00:00:00 | 00:00:00 |
 | [2014-01-08 Wed] |   8:10 |  16:30 | 08:20:00 |   00:00:00 | 08:20:00 |
 | [2014-01-09 Thu] |   7:55 |  17:05 | 09:10:00 |   00:00:00 | 09:10:00 |
 | [2014-01-10 Fri] |   8:00 |  17:05 | 09:05:00 |   00:00:00 | 09:05:00 |
 #+TBLFM: $4=$3-$2;T::$5=if($4  0,8:18:00,00:00:00);T::$6=$4-$5;T

 Can anyone enlighten me as to why I get 00:00:00 in the first case?

 Not answering your question...

 Just wanted to mention that, for this type of task, you probably should
 have a look at the clocking mechanisms (C-c C-x C-i and the like), and
 use them to generate tables like the above, or bills for clients, etc.

 Using proper clocking brings you many advantages, whose main (IMO) is
 the clock check feature, where you can check that you don't have
 unintended clocking gaps during the day, nor clocking overlap...

 I do already use clocking for certain areas of activity.  However, I
 would need nested clocking, i.e. a clock for at work/not at work
 which I can clock into at the beginning of the day an out of at the end
 of the day and within that the ability to clock into to and out of
 various activities.  Is that possible?

 I do have personal tasks into personal.org, and work tasks in work.org
 (and many others).

 Those files have FILETAGS (set to :personal: and :work:) so that I don't
 have to manually tag every section, etc.

 Then, in your clocktable, you can include/exclude clock information
 based on the tag.

 So, yes, what you ask seems possible to me!

OK, so I would clock into a generic :office: activity, which might be
interrupted by :programming:, :bofhing:, :meeting:, :lunch: and
:snooze:.  I would then create a clock table including :office:,
:programming:, :bofhing: and :meeting:, but excluding :lunch:
and :snooze:.

But would this approach allow me to do stuff like subtracting how long I
should have spent at work each day, so that I can work out how much
overtime I have?

Cheers,

Loris

-- 
This signature is currently under construction.




Re: [O] LaTeX export: Handle hash symbol in footnote url links

2014-02-21 Thread Michael Bach
Hello Vladimir,

On 21/02/2014 12:14, Vladimir Lomov wrote:
 Hello,
 ** Michael Bach [2014-02-21 11:52:14 +0100]:
 
 Dear org-mode Devs and Users,
 
 I am trying to export the following snippet
 
 #+BEGIN_ORG
 * LaTeX export of url with hash symbol
 
 The Org mode export facilities can be used to export Org documents or
 parts of Org documents to a variety of other formats.[fn:1]
 
 * Footnotes
 
 [fn:1] [[http://orgmode.org/org.html#Exporting]]
 #+END_ORG
 
 Now the exported .tex file contains the link as
 : \footnote{\url{http://orgmode.org/org.html#Exporting}}
 
 Which LaTeX does not like:
 : Illegal parameter number in definition of \Hy@tempa
 
 FWIW, there is a workaround for the percent symbol described on SO[1]
 using `\urldef` - but this does not work with the hash symbol.
 
 Is there another workaround/solution that works with org-mode?
 
 Hash (#), as well as several other symbols have to be espaced when used
 as is in LaTeX documents. See, for example, The Not So Short
 Introduction to LaTeX2e, 1.3.2 Special Characters. In general it is
 duty of ox-latex (LaTeX export backend) to espace such characters.
 

Thanks for your answer. `\url` can handle hash symbols in its argument
without escaping alright - as can be expected. AFAICS, the problem lies
in the `\footnote` command. And yes, I was thinking of `ox-latex`
figuring out that the url is in a footnote and escape accordingly.

I can see that the export engine should not and cannot cover all special
cases, but since links and footnotes are `first-class` org-mode
concepts, it would be nice to have them play along in this situation.
From a typographic point of view, I figured url links in footnotes are
not that unusual.

Best Regards,
Michael


 [1] bit.ly/1cwYJaM
 
 ---
 WBR, Vladimir Lomov
 





Re: [O] Conditional in table formula with times

2014-02-21 Thread Sebastien Vauban
Loris Bennett wrote:
 Sebastien Vauban sva-n...@mygooglest.com writes:
 Loris Bennett wrote:
 Sebastien Vauban writes:
 Loris Bennett wrote:
 I'm trying to keep track of total time spend at work, but I am having
 trouble with a conditional in table formula:

 | *Day*| *Came* | *Went* | *Worked* | *Required* |   *Diff* |
 |--+++--++--|
 | [2014-01-06 Mon] |   8:00 |  17:00 | 09:00:00 |   00:00:00 | 09:00:00 |
 | [2014-01-07 Tue] ||| 00:00:00 |   00:00:00 | 00:00:00 |
 | [2014-01-08 Wed] |   8:10 |  16:30 | 08:20:00 |   00:00:00 | 08:20:00 |
 | [2014-01-09 Thu] |   7:55 |  17:05 | 09:10:00 |   00:00:00 | 09:10:00 |
 | [2014-01-10 Fri] |   8:00 |  17:05 | 09:05:00 |   00:00:00 | 09:05:00 |
 #+TBLFM: $4=$3-$2;T::$5=if($4  0,8:18:00,00:00:00);T::$6=$4-$5;T

 Can anyone enlighten me as to why I get 00:00:00 in the first case?

 Just wanted to mention that, for this type of task, you probably should
 have a look at the clocking mechanisms (C-c C-x C-i and the like), and
 use them to generate tables like the above, or bills for clients, etc.

 Using proper clocking brings you many advantages, whose main (IMO) is
 the clock check feature, where you can check that you don't have
 unintended clocking gaps during the day, nor clocking overlap...

 I do already use clocking for certain areas of activity.  However, I
 would need nested clocking, i.e. a clock for at work/not at work
 which I can clock into at the beginning of the day an out of at the end
 of the day and within that the ability to clock into to and out of
 various activities.  Is that possible?

 I do have personal tasks into personal.org, and work tasks in work.org
 (and many others).

 Those files have FILETAGS (set to :personal: and :work:) so that I don't
 have to manually tag every section, etc.

 Then, in your clocktable, you can include/exclude clock information
 based on the tag.

 So, yes, what you ask seems possible to me!

 OK, so I would clock into a generic :office: activity, which might be
 interrupted by :programming:, :bofhing:, :meeting:, :lunch: and
 :snooze:.  I would then create a clock table including :office:,
 :programming:, :bofhing: and :meeting:, but excluding :lunch:
 and :snooze:.

Best is that you clock into such tasks:

--8---cut here---start-8---
* Work :work:

** TODO Read and reply to emails

** TODO Meetings

** TODO Write report

* Personal:personal:

(Do you really want to clock personal stuff?  You can, though)
--8---cut here---end---8---

Then, you can generate a clocktable view for all your :work: activities.

 But would this approach allow me to do stuff like subtracting how long I
 should have spent at work each day, so that I can work out how much
 overtime I have?

I think, but I'm not sure, that you could name the clocktable view, and
access some of its fields. If so, then, you could make your substract in
a summary table.

Best regards,
  Seb

-- 
Sebastien Vauban




[O] [ANN] Firefox extension for org-protocol and org-capture

2014-02-21 Thread Olivier Schwander
Dear list,

I would like to announce the first version of an extension to
call org-capture through org-protocol from Firefox:
 - http://chadok.info/firefox-org-capture/

It just does the same thing as the Javascript bookmarklet but without
the need to register the scheme org-protocol:// in Firefox/Gnome/KDE/XDG
(or whatever we are supposed to do this week to manage handler for
protocols). I hope this solution to be easier and more reliable, at
least for Firefox users.

It is not on https://addons.mozilla.org for now, but I will submit it
for review in a few days.

Olivier




Re: [O] Use date in Easy Templates?

2014-02-21 Thread John Kitchin
I solved a similar problem to this with yasnippets:

http://kitchingroup.cheme.cmu.edu/blog/2014/02/16/A-dynamic-snippet-for-a-task-due-7-days-from-now/

You can dynamically evaluate lisp code in the snippet when it is expanded.
That way you can get whatever format suits you!

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, Feb 16, 2014 at 2:33 PM, Rainer M Krug rai...@krugs.de wrote:



 On 02/16/14, 19:08 , Nick Dokos wrote:
  Rainer M Krug rai...@krugs.de writes:
 
  is it possible to insert the actual date into Easy Templates?
 

 That's what I thought as well.

 
  No - but it's not difficult to crib the %file code and add %date:
 
  --8---cut here---start-8---
  (defun org-complete-expand-structure-template (start cell)
Expand a structure template.
(let* ((musep (org-bound-and-true-p org-mtags-prefer-muse-templates))
 (rpl (nth (if musep 2 1) cell))
 (ind ))
  (delete-region start (point))
  (when (string-match \\`#\\+ rpl)
(cond
 ((bolp))
 ((not (string-match \\S- (buffer-substring (point-at-bol)
 (point
(setq ind (buffer-substring (point-at-bol) (point
 (t (newline
  (setq start (point))
  (if (string-match %file rpl)
(setq rpl (replace-match
   (concat
\
(save-match-data
  (abbreviate-file-name (read-file-name Include file:
 )))
\)
   t t rpl)))
  ;;; ADDED CODE
  (if (string-match %date rpl)
(setq rpl (replace-match
(save-match-data
  (format-time-string %Y-%m-%d (current-time)))
   t t rpl)))
  ;;; END OF ADDED CODE
  (setq rpl (mapconcat 'identity (split-string rpl \n)
 (concat \n ind)))
  (insert rpl)
  (if (re-search-backward \\? start t) (delete-char 1
 
  --8---cut here---end---8---
 
  However, the next thing somebody will ask is a different format for the
  date which will require YACV[fn:1]. But maybe one exists already?
 
  And the next thing is more of these %thingies... so it would be better
  to add yet another layer to the function, so that arbitrary %thingies
  can be added by customizing YACV, probably an alist of
 
   (thingie . thingie-function)
 
  pairs...

 That sounds like a good idea which would make the Easy Templates more
 powerful.

 Cheers,

 Rainer

 
  Footnotes:
 
  [fn:1] Yet Another Customization Variable :-)
 

 --
 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




[O] Text emphasize with fill-paragraph ?

2014-02-21 Thread Martin Leduc
Hi all,

  I don't know whether it is a bug, an unimplemented feature or simply that I 
use it wrongly, but I can't emphasize text (with // ** or _ _) within a filled 
paragraph. Moreover, sometime I get it to work but I'm not sure how to 
reproduce. 

Thanks,
Martin
  

Re: [O] [ANN] Firefox extension for org-protocol and org-capture

2014-02-21 Thread Rasmus
Olivier Schwander olivier.schwan...@chadok.info writes:

 Dear list,

 I would like to announce the first version of an extension to
 call org-capture through org-protocol from Firefox:
  - http://chadok.info/firefox-org-capture/

 It just does the same thing as the Javascript bookmarklet but without
 the need to register the scheme org-protocol:// in Firefox/Gnome/KDE/XDG
 (or whatever we are supposed to do this week to manage handler for
 protocols). I hope this solution to be easier and more reliable, at
 least for Firefox users.

So what do I do after installing it?  I get a new button but nothing
happens when I click it.  On this PC I'm using Fx27 and GNU Emacs
24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.7) and Org-mode
version 8.2.5h and i3-wm.  I can test with Gnome when I get home.

–Rasmus

-- 
This is the kind of tedious nonsense up with which I will not put




[O] Problem with org-bibtex-read with fields type, key

2014-02-21 Thread Stefan-W. Hahn
Good evening,

I have a little problem with org-bibtex function org-bibtex-read:

My bibtex entries have the keyword type and key. When
reading such an entry with org-bibtex-read I get an alist
with the entries :type and :key each twice.

,
| (defun org-bibtex-read ()
|   ...
|  (cons (let ((field (funcall keyword (car pair
|  (case field
|(:=type= :type)
|(:=key= :key)
|(otherwise field)))
|(funcall clean-space (funcall strip-delim (cdr pair)
|   ...
`

Seems to be because of the conversation of =type= and =key=.
Am I the only person having problems with it?

Is there some advice?

With kind regards,
Stefan
  
-- 
Stefan-W. Hahn  It is easy to make things.
It is hard to make things simple.



[O] [PATCH] Org-bibtex: checking string length in org-bibtex-read before using aref

2014-02-21 Thread Stefan-W. Hahn
Good afternoon,

I have a problem with org-bibtex function org-bibtex-read if I have an
empty field in a bibitem like this:

@article(test,
   description = )

In this case the aref gives an exception. I would like to suggest
the attached following fix.

With kind regards,
Stefan

-- 
Stefan-W. Hahn  It is easy to make things.
It is hard to make things simple.
From e5fa86104d94e69575d6c4ff54d0aa41b7083440 Mon Sep 17 00:00:00 2001
From: Stefan-W. Hahn stefan.h...@s-hahn.de
Date: Fri, 21 Feb 2014 17:19:39 +0100
Subject: [PATCH] [PATCH] Org-bibtex: checking string length in org-bibtex-read
 before using aref

If a field in a bibtex entry is empty:

@article(test,
   description = )

the function org-bibtex-read throws an exception because of
using aref on this empty string.

The solution is to check the length of the string before.

TINY CHANGE.

Signed-off-by: Stefan-W. Hahn stefan.h...@s-hahn.de
---
 lisp/org-bibtex.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/org-bibtex.el b/lisp/org-bibtex.el
index b4e6977..7571169 100644
--- a/lisp/org-bibtex.el
+++ b/lisp/org-bibtex.el
@@ -613,7 +613,8 @@ (defun org-bibtex-read ()
 	(strip-delim
 	 (lambda (str)	 ; strip enclosing ... and {...}
 	   (dolist (pair '((34 . 34) (123 . 125) (123 . 125)))
-	 (when (and (= (aref str 0) (car pair))
+	 (when (and ( (length str) 0)
+			(= (aref str 0) (car pair))
 			(= (aref str (1- (length str))) (cdr pair)))
 	   (setf str (substring str 1 (1- (length str)) str)))
 (push (mapcar
-- 
1.9.0



Re: [O] [ANN] Firefox extension for org-protocol and org-capture

2014-02-21 Thread Olivier Schwander
Le 21 Feb 2014 16:43, Rasmus a écrit:
 So what do I do after installing it? I get a new button but nothing
 happens when I click it.

Do you have emacs server and org-protocol enabled ? Something like this
in your .emacs:

(server-start)
(require 'org-protocol)

If not, you should add these two lines and maybe have a look on worg:
http://orgmode.org/worg/org-contrib/org-protocol.html

You can also test manually in a shell with:

 emacsclient org-protocol://capture://example.com/Example/

(It is exactly what does the add-on)

Best,

Olivier




[O] ox-latex: need win-cygwin path translation

2014-02-21 Thread mirko
Hi,

This is on Windows 7 and Cygwin64 with TeXLive

When exporting to latex and pdf, the compilation fails because the path
passed to pdflatex is the Windows one.

I installed and activated cygwin-mount and setup-cygwin packages, but that
did not help.

Before I dig in (I did find the pdf export code in ox-latex), I am wondering
if there is something else I can do.  If I activate some path translator, is
there some hook I can attach it to so that the ox-latex exporter will see it?

Thanks,

Mirko




Re: [O] [ANN] Firefox extension for org-protocol and org-capture

2014-02-21 Thread Xebar Saram
wow Olivier

thanks so much, ive been waiting for something like this for ages :), never
managed to get the registering the protocol parts working.

one thing though, is there a way to define which client it oepns? i have
several emacs client opened at once and prefer the extension nowt to use a
current one but pop up a new CLI emacsclient for quick adding which will go
away after i finish capturing, is that possible?

best and thx alot!

Z

thx alot!

Z


On Fri, Feb 21, 2014 at 6:41 PM, Olivier Schwander 
olivier.schwan...@chadok.info wrote:

 Le 21 Feb 2014 16:43, Rasmus a écrit:
  So what do I do after installing it? I get a new button but nothing
  happens when I click it.

 Do you have emacs server and org-protocol enabled ? Something like this
 in your .emacs:

 (server-start)
 (require 'org-protocol)

 If not, you should add these two lines and maybe have a look on worg:
 http://orgmode.org/worg/org-contrib/org-protocol.html

 You can also test manually in a shell with:

  emacsclient org-protocol://capture://example.com/Example/

 (It is exactly what does the add-on)

 Best,

 Olivier





[O] controling width of graphviz source block result

2014-02-21 Thread regcl

When I try to control the width of the image produced by 
included graphviz (DOT) code like so ...

#+ATTR_HTML: :width 300
#+INCLUDE: gnus.dot SRC dot :file gnus.png :exports results

... width is not controlled. 

This works ...

#+INCLUDE: gnus.dot SRC dot :file gnus.png :exports none
#+ATTR_HTML: :width 300
file:gnus.png

So it makes me wonder... Is this a bug or operator error?

Thanks,
regcl

GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw scroll bars)
of 2014-02-20 on e3

Org-mode version 8.2.5c (release_8.2.5c @
/home/regcl/.emacs.d/lisp/org-mode/lisp/)






Re: [O] controling width of graphviz source block result

2014-02-21 Thread Nicolas Goaziou
Hello,

regcl re...@channing.harvard.edu writes:

 When I try to control the width of the image produced by 
 included graphviz (DOT) code like so ...

 #+ATTR_HTML: :width 300
 #+INCLUDE: gnus.dot SRC dot :file gnus.png :exports results

 ... width is not controlled.

Here the HTML attribute applies to the INCLUDE keyword below.

 #+INCLUDE: gnus.dot SRC dot :file gnus.png :exports none
 #+ATTR_HTML: :width 300
 file:gnus.png

Here, the HTML attribute applies to the link below.

Therefore, the behaviour is to be expected.


Regards,

-- 
Nicolas Goaziou



Re: [O] org-export-latex-hyperref-options-format

2014-02-21 Thread Nicolas Goaziou
Hello,

Joe Hirn joseph.h...@gmail.com writes:

 With recommended changes.

Thank you. It looks good.

Could you add a commit message (see Commit messages and ChangeLog
entries section in http://orgmode.org/worg/org-contribute.html) and
send it again, using git format-patch?


Regards,

-- 
Nicolas Goaziou



Re: [O] [ANN] Firefox extension for org-protocol and org-capture

2014-02-21 Thread Nick Dokos
Olivier Schwander olivier.schwan...@chadok.info writes:

 Le 21 Feb 2014 16:43, Rasmus a écrit:
 So what do I do after installing it? I get a new button but nothing
 happens when I click it.

 Do you have emacs server and org-protocol enabled ? Something like this
 in your .emacs:

 (server-start)
 (require 'org-protocol)

 If not, you should add these two lines and maybe have a look on worg:
 http://orgmode.org/worg/org-contrib/org-protocol.html

 You can also test manually in a shell with:

  emacsclient org-protocol://capture://example.com/Example/

 (It is exactly what does the add-on)


My emacsclient is is /usr/local/bin - I changed that in the addon's
preferences panel.The command line invocation works fine for me -
the button in FF (26.0 fwiw) does not: nothing happens. I uninstalled
and reinstalled the addon a couple of times, restarted FF: no go.
Is there a way to debug the FF end of the equation?

Nick






Re: [O] org-export-latex-hyperref-options-format

2014-02-21 Thread Joe Hirn
Here you go.

Thanks a lot for all your help. Was really nice working on it with you.


From af2a8066be01b94504fff9e009617ce186bd9e03 Mon Sep 17 00:00:00 2001
From: Joe Hirn joseph.h...@gmail.com
Date: Fri, 21 Feb 2014 12:15:58 -0600
Subject: [PATCH] Allow customization of hyperrefsetup via
 `org-latex-hyperref-template'

* ox-latex.el (org-latex-hyperref-template): Add custom var
`org-latex-hyperref-template' to enable
  customization of the \\hypersetup{...}. The value is a format-spec
  with placeholders for KEYWORDS, DESCRIPTION and CREATOR.

  (org-latex-with-hyperref): Remove custom var
  `org-latex-with-hyperref'. Set `org-latex-hyperref-template' to
  an empty string to disable the \\hypersetup{...} output.

  (org-latex-template): Make use of new `org-latex-hyperref-template'
  when emitting \\hypersetup{...}.

This patch allows the user to emit custom options for the
\\hypersetup{...} options which are used by the \\hyperref package.

Modfied by Joe Hirn with advice from Nicholas Goaziou

TINYCHANGE
---
 ox-latex.el | 29 +++--
 1 file changed, 19 insertions(+), 10 deletions(-)

diff --git a/ox-latex.el b/ox-latex.el
index 19f055e..f6e5a09 100644
--- a/ox-latex.el
+++ b/ox-latex.el
@@ -103,7 +103,7 @@
(:latex-class-options LATEX_CLASS_OPTIONS nil nil t)
(:latex-header LATEX_HEADER nil nil newline)
(:latex-header-extra LATEX_HEADER_EXTRA nil nil newline)
-   (:latex-hyperref-p nil texht org-latex-with-hyperref t)
+   (:latex-hyperref nil nil org-latex-hyperref-template t)
;; Redefine regular options.
(:date DATE nil \\today t)))

@@ -341,10 +341,18 @@ the toc:nil option, not to those generated with #+TOC
keyword.
   :group 'org-export-latex
   :type 'string)

-(defcustom org-latex-with-hyperref t
-  Toggle insertion of \\hypersetup{...} in the preamble.
+(defcustom org-latex-hyperref-template \\hypersetup{\n
pdfkeywords={%k},\n  pdfsubject={%d},\n  pdfcreator={%c}}\n
+  Template for hyperref package options.
+
+Value is a format string, which can contain the following placeholders:
+
+  %k for KEYWORDS line
+  %d for DESCRIPTION line
+  %c for CREATOR line
+
+An empty string disables the setup.
   :group 'org-export-latex
-  :type 'boolean)
+  :type 'string)

  Headline

@@ -1118,12 +1126,13 @@ holding export options.
  ;; Title
  (format \\title{%s}\n title)
  ;; Hyperref options.
- (when (plist-get info :latex-hyperref-p)
-   (format \\hypersetup{\n  pdfkeywords={%s},\n  pdfsubject={%s},\n
 pdfcreator={%s}}\n
-   (or (plist-get info :keywords) )
-   (or (plist-get info :description) )
-   (if (not (plist-get info :with-creator)) 
- (plist-get info :creator
+ (format-spec (plist-get info :latex-hyperref)
+  (format-spec-make
+   ?k (or (plist-get info :keywords) )
+   ?d (or (plist-get info :description))
+   ?c (if (plist-get info :with-creator)
+  (plist-get info :creator)
+)))
  ;; Document start.
  \\begin{document}\n\n
  ;; Title command.
-- 
1.8.5.4



On Fri, Feb 21, 2014 at 11:28 AM, Nicolas Goaziou n.goaz...@gmail.comwrote:

 Hello,

 Joe Hirn joseph.h...@gmail.com writes:

  With recommended changes.

 Thank you. It looks good.

 Could you add a commit message (see Commit messages and ChangeLog
 entries section in http://orgmode.org/worg/org-contribute.html) and
 send it again, using git format-patch?


 Regards,

 --
 Nicolas Goaziou



[O] Timestamps in properties not exported by icalendar exporter

2014-02-21 Thread David Engster
I have the problem that a certain kind Org entries is not exported by
the icalendar exporter, namely those created by the gnus-icalendar
package.

This package creates Org entries from calendar invites in the following
way (I've omitted some of the properties, but you get the idea);

** Some appointment (location)
   :PROPERTIES:
   :ICAL_EVENT: t
   :ID:   04008200E00074C5B7101A82E00800
   :DT:   2013-12-09 Mon 13:00-13:30
   :END:

   Body text


These entries show up in the agenda just fine, but the icalendar
exporter does not export it because the timestamp is in the properties
(the gnus-icalendar package puts it there so that you can easily change
it if the organizer decides to change the event and sends a change
request).

The exporter could of course simply take the first timestamp it finds in
the properties, but it could be the wrong one; for instance, there could
be a LOGBOOK timestamp before the one in DT. Hence I think it would be
nice if you could tell the exporter which property to use as timestamp
during export.

-David



Re: [O] [patch] Support CUSTOM_ID property in latex export

2014-02-21 Thread Richard Lawrence
Hi Nicolas and all,

Here's a new patch that adds a variable org-latex-custom-id-as-label to
control whether CUSTOM_ID should be used to generate labels during LaTeX
export.

Let me know what you think.  In particular, I wasn't sure if I should
provide more information in the defcustom statement beyond :group and
:type (like :package-version?).  Also, does the docstring represent the
trade-offs of using this variable well enough?

I wasn't sure how to get git format-patch to generate a single patch for
the changes between my branch and master (since there are now two
commits on my branch), so this was generated with git diff --patch.  If
you want me to send the commit message, etc. can you let me know how to
do this in whatever way is most convenient for you?  

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 5815874..df22768 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -375,6 +375,47 @@ which format headlines like for Org version prior to 8.0.
   :package-version '(Org . 8.0)
   :type 'function)
 
+(defcustom org-latex-custom-id-as-label nil
+   Toggle use of CUSTOM_ID properties for generating section labels.
+
+If non-nil, Org will use the value of a headline's CUSTOM_ID
+property as the argument to the \label command for the LaTeX
+section corresponding to the headline.
+
+Setting this variable gives you control over how Org generates
+labels for sections during LaTeX export.  One reason to do this
+is that it allows you to refer to headlines using a single label
+both in Org's link syntax and in embedded LaTeX code.
+
+For example, when this variable is non-nil, a headline like this:
+
+  ** Some section
+ :PROPERTIES:
+ :CUSTOM_ID: sec:foo
+ :END:
+  This is section [[#sec:foo]].
+  #+BEGIN_LATEX
+  And this is still section \ref{sec:foo}.
+  #+END_LATEX
+
+will be exported to LaTeX as:
+
+  \subsection{Some section}
+  \label{sec:foo}
+  This is section \ref{sec:foo}.
+  And this is still section \ref{sec:foo}.
+
+Note, however, that when a headline defines a value for
+CUSTOM_ID, Org simply passes this value to \label unchanged.  You
+are responsible for ensuring that the value is a valid LaTeX
+\label key, that it is unique throughout the generated document,
+etc.
+ 
+For headlines that do not define the CUSTOM_ID property, Org will
+continue to use its default labeling scheme to generate labels
+and resolve links into section references.
+  :group 'org-export-latex
+  :type 'boolean)
 
  Footnotes
 
@@ -1373,10 +1414,14 @@ holding contextual information.
 			   todo todo-type priority text tags))
 	   ;; Associate \label to the headline for internal links.
 	   (headline-label
-	(format \\label{sec-%s}\n
-		(mapconcat 'number-to-string
-			   (org-export-get-headline-number headline info)
-			   -)))
+	(let ((custom-label (and org-latex-custom-id-as-label
+ (org-element-property :CUSTOM_ID headline
+	  (if custom-label
+		  (format \\label{%s}\n custom-label)
+		(format \\label{sec-%s}\n
+			(mapconcat 'number-to-string
+   (org-export-get-headline-number headline info)
+   -)
 	   (pre-blanks
 	(make-string (org-element-property :pre-blank headline) 10)))
   (if (or (not section-fmt) (org-export-low-level-p headline info))
@@ -1845,12 +1890,16 @@ INFO is a plist holding contextual information.  See
 	  ;; number.  Otherwise, display description or headline's
 	  ;; title.
 	  (headline
-	   (let ((label
-		  (format sec-%s
-			  (mapconcat
-			   'number-to-string
-			   (org-export-get-headline-number destination info)
-			   -
+	   (let* ((custom-label (and org-latex-custom-id-as-label
+(org-element-property :CUSTOM_ID destination)))
+		  (label
+		   (or
+		custom-label
+		(format sec-%s
+			(mapconcat
+			 'number-to-string
+			 (org-export-get-headline-number destination info)
+			 -)
 	 (if (and (plist-get info :section-numbers) (not desc))
 		 (format \\ref{%s} label)
 	   (format \\hyperref[%s]{%s} label


Best,
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] Any linguists (or other gb4e/linguex users) on this list?

2014-02-21 Thread Richard Lawrence
Hi Org folks,

I am wondering if anyone on this list uses the gb4e or linguex packages
in LaTeX documents that they export from Org.

I have been working on an export backend derived from the LaTeX exporter
to allow exporting ordinary Org lists as linguistics examples formatted
by one of these two packages.  For example, a list like:

#+ATTR_LATEX: :environment gb4e-exe
1) This is an example sentence. s:example
2) * This ungrammatical sentence! s:ungrammatical

would be exported as:

\begin{exe}
\ex[ ]{This is an example sentence.} \label{s:example}
\ex[*]{This ungrammatical sentence!} \label{s:ungrammatical}
\end{exe}

This allows typing your examples using Org's nicer syntax, and referring
to them using Org links.

The backend is still in very early stages (it doesn't support linguex
yet, for example, nor have I tested it with glosses), but it supports
simple gb4e examples, including nested lists.  If anyone else is
interested in this, I can try to package it up in a form that could be
shared or put in org-contrib.  Let me know!

-- 
Best,
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.)



Re: [O] Non-interactive export

2014-02-21 Thread Simon Thum

Sorry, I was being imprecise.


I do have maxima and shell and other source bocks since the dawn of org, 
approximately. I did not have any gnuplot blocks until before two weeks. 
The gnuplot blocks break my setup, currently.


So, what is weird is that maxima and shell do well but gnuplot wants its 
interactive things.


I noticed the same behaviour when exporting interactively - babel  asks 
me for the gnuplot stuff. Could it be that the export defaults vary per 
backend?


My org-confirm-babel-evaluate is t. However on export, only gnuplot 
triggers this question. I now notice that maxima is executed on export 
without asking first; I guess shell is the same.


Things are getting stranger...

Cheers,

Simon

On 02/21/2014 12:38 AM, John Hendy wrote:

On Thu, Feb 20, 2014 at 4:12 PM, Simon Thum simon.t...@gmx.de wrote:

Hi all,

I have a server over which I sync my Org files and provide drops for other
clients, chiefly iCal and vCard. Therefore I need non-interactive export.

Things recently stopped working however, and although I acknowledge it is
likely not Org's fault maybe here I can find somewone more into lisp to help
me out a bit.

In my logs I find, since it stopped working:


Evaluate this gnuplot code block on your system? (yes or no)



Which stops the show, waiting for input. Emacs is started with -batch and is
given an export script. This so far avoided such questions (from org-babel?)
successfully. I have maxima blocks since ages and do not remember having
seen this behaviour.

Does naybody have an idea what could be going on?

The machine does not even have gnuplot.


I don't think the machine matters so much as the source of Org/babel
thinking gnuplot *code* exists in one of your files.

Can you try something like this from the directory containing the
exported files?

grep -r #+begin_src gnuplot *

I would have suggested just tweaking the variable
=org-confirm-babel-evaluate=, but I think it's more important to track
the source of this down, as turning the inquiries off implies that we
all know exactly what's going to be evaluated, and this sounds like an
instance of something not only unknown, but a change on what you
believe to be a rather unchanged system, which is definitely
concerning.

Good luck,
John



Thanks in advance,

Simon








[O] Namespace problem org-mode / Clojure

2014-02-21 Thread Volker Strobel
Hi,

I'm trying to use org-mode with Clojure and already posted my problem at
https://groups.google.com/forum/#!topic/clojure/lnZWUH4XxJM
All my code blocks get evaluated in the namespace user, even if I evaluate
the (ns ...) code block first.

EXAMPLE (core.org in src/org-works of Leiningen project):
---
#+BEGIN_SRC clojure :tangle core.clj
(ns org-works.core
  (:gen-class))
#+END_SRC

#+RESULTS:
: nil

#+BEGIN_SRC clojure :tangle core.clj
(in-ns 'org-works.core)
(def a 5)

#+END_SRC

#+RESULTS:
: #'org-works.core/a

#+BEGIN_SRC clojure :tangle core.clj
(def b 5)

#+END_SRC

#+RESULTS:
: #'user/b

--

Funnily enough, it did work once for a few hours (i.e. the vars were
declared in the namespace org-works.core), but then it stopped working.
Now I tried to reinstall emacs 24.3 and follow all the instructions on
http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-clojure.html

Here are some further details of my system configuration:
(M-x org-version: *Org-mode version 8.2.5h (release_8.2.5h-643-gd0ae56 @
/home/pold/org-mode/lisp/*). I also tried to copy the content of the
ob-clojure.el file directly to my .emacs.

My .emacs only has a minimal content:
(require 'package)
(add-to-list 'package-archives
 '(marmalade . http://marmalade-repo.org/packages/;))
(package-initialize)

(defvar my-packages '(starter-kit
  starter-kit-lisp
  starter-kit-bindings
  starter-kit-eshell
  clojure-mode
  clojure-test-mode
  cider))

(dolist (p my-packages)
  (when (not (package-installed-p p))
(package-install p)))

(add-to-list 'load-path /home/pold/org-mode/lisp)

(require 'org)
(require 'ob-clojure)

(setq org-babel-clojure-backend 'cider)
(require 'cider)

My installed packages are:
(clojure-test-mode cider clojure-mode pkg-info epl dash
starter-kit-bindings starter-kit-eshell starter-kit-lisp elisp-slime-nav
starter-kit magit ido-ubiquitous smex find-file-in-project
idle-highlight-mode paredit).

Any ideas what's going wrong here?

Thanks!

Best, Volker


[O] Configuring html footnote (or adding to end of body)

2014-02-21 Thread Blanchette, Marco
Sorry if this has been answered before, can’t seem to find a way to search for 
it…

Is there a way to configure the default content of the footer produced during 
html formatted export? There is a javaScript that I would like to be the last 
bit of my html every time an org file is exported. Can’t seem to figure that 
one out.

Thanks

--  Marco Blanchette, Ph.D.
Genomic Scientist
Stowers Institute for Medical Research
1000 East 50th Street
Kansas City MO 64110
www.stowers.org

Tel: 816-926-4071
Cell: 816-726-8419
Fax: 816-926-2018



Re: [O] Namespace problem org-mode / Clojure

2014-02-21 Thread Thomas S. Dye
Aloha Volker,

I don't use Clojure, but ob-clojure.el defines a header argument
:package. You should be able to do something like:

#+header: :package org-works.core

to execute code in that name space.

hth,
Tom

Volker Strobel volker.strobe...@gmail.com writes:

 Hi,

 I'm trying to use org-mode with Clojure and already posted my problem at
 https://groups.google.com/forum/#!topic/clojure/lnZWUH4XxJM
 All my code blocks get evaluated in the namespace user, even if I evaluate
 the (ns ...) code block first.

 EXAMPLE (core.org in src/org-works of Leiningen project):
 ---
 #+BEGIN_SRC clojure :tangle core.clj
 (ns org-works.core
   (:gen-class))
 #+END_SRC

 #+RESULTS:
 : nil

 #+BEGIN_SRC clojure :tangle core.clj
 (in-ns 'org-works.core)
 (def a 5)

 #+END_SRC

 #+RESULTS:
 : #'org-works.core/a

 #+BEGIN_SRC clojure :tangle core.clj
 (def b 5)

 #+END_SRC

 #+RESULTS:
 : #'user/b

 --

 Funnily enough, it did work once for a few hours (i.e. the vars were
 declared in the namespace org-works.core), but then it stopped working.
 Now I tried to reinstall emacs 24.3 and follow all the instructions on
 http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-clojure.html

 Here are some further details of my system configuration:
 (M-x org-version: *Org-mode version 8.2.5h (release_8.2.5h-643-gd0ae56 @
 /home/pold/org-mode/lisp/*). I also tried to copy the content of the
 ob-clojure.el file directly to my .emacs.

 My .emacs only has a minimal content:
 (require 'package)
 (add-to-list 'package-archives
  '(marmalade . http://marmalade-repo.org/packages/;))
 (package-initialize)

 (defvar my-packages '(starter-kit
   starter-kit-lisp
   starter-kit-bindings
   starter-kit-eshell
   clojure-mode
   clojure-test-mode
   cider))

 (dolist (p my-packages)
   (when (not (package-installed-p p))
 (package-install p)))

 (add-to-list 'load-path /home/pold/org-mode/lisp)

 (require 'org)
 (require 'ob-clojure)

 (setq org-babel-clojure-backend 'cider)
 (require 'cider)

 My installed packages are:
 (clojure-test-mode cider clojure-mode pkg-info epl dash
 starter-kit-bindings starter-kit-eshell starter-kit-lisp elisp-slime-nav
 starter-kit magit ido-ubiquitous smex find-file-in-project
 idle-highlight-mode paredit).

 Any ideas what's going wrong here?

 Thanks!

 Best, Volker
 Hi,

 I'm trying to use org-mode with Clojure and already posted my problem
 at https://groups.google.com/forum/#!topic/clojure/lnZWUH4XxJM
 All my code blocks get evaluated in the namespace user, even if I
 evaluate the (ns ...) code block first. 

 EXAMPLE (core.org in src/org-works of Leiningen project):
 ---
 #+BEGIN_SRC clojure :tangle core.clj
 (ns org-works.core
 (:gen-class))
 #+END_SRC

 #+RESULTS:
 : nil

 #+BEGIN_SRC clojure :tangle core.clj
 (in-ns 'org-works.core)
 (def a 5)

 #+END_SRC

 #+RESULTS:
 : #'org-works.core/a

 #+BEGIN_SRC clojure :tangle core.clj
 (def b 5)

 #+END_SRC

 #+RESULTS:
 : #'user/b

 --

 Funnily enough, it did work once for a few hours (i.e. the vars were
 declared in the namespace org-works.core), but then it stopped
 working. 
 Now I tried to reinstall emacs 24.3 and follow all the instructions on
 http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-clojure.html

 Here are some further details of my system configuration:
 (M-x org-version: Org-mode version 8.2.5h (release_8.2.5h-643-gd0ae56
 @ /home/pold/org-mode/lisp/). I also tried to copy the content of the
 ob-clojure.el file directly to my .emacs.

 My .emacs only has a minimal content:
 (require 'package)
 (add-to-list 'package-archives
 '(marmalade . http://marmalade-repo.org/packages/;))
 (package-initialize)

 (defvar my-packages '(starter-kit
 starter-kit-lisp
 starter-kit-bindings
 starter-kit-eshell
 clojure-mode
 clojure-test-mode
 cider))

 (dolist (p my-packages)
 (when (not (package-installed-p p))
 (package-install p)))

 (add-to-list 'load-path /home/pold/org-mode/lisp)

 (require 'org)
 (require 'ob-clojure)

 (setq org-babel-clojure-backend 'cider)
 (require 'cider)

 My installed packages are:
 (clojure-test-mode cider clojure-mode pkg-info epl dash
 starter-kit-bindings starter-kit-eshell starter-kit-lisp
 elisp-slime-nav starter-kit magit ido-ubiquitous smex
 find-file-in-project idle-highlight-mode paredit).

 Any ideas what's going wrong here?

 Thanks!

 Best, Volker



-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] Namespace problem org-mode / Clojure

2014-02-21 Thread Volker Strobel
Thanks for your answer, Tom!
I tried to modify my org file like this:
-
#+header: :package org-works.core
#+BEGIN_SRC clojure :tangle core.clj
(ns org-works.core
  (:gen-class))
#+END_SRC

#+header: :package org-works.core
#+BEGIN_SRC clojure :tangle core.clj

(def a 5)

#+END_SRC
---

But then, 'M-x org-babel-execute-buffer' results in a emacs crash (can't
edit anything anymore, nor close the frame).

Best, Volker



2014-02-21 23:36 GMT+01:00 Thomas S. Dye t...@tsdye.com:

 Aloha Volker,

 I don't use Clojure, but ob-clojure.el defines a header argument
 :package. You should be able to do something like:

 #+header: :package org-works.core

 to execute code in that name space.

 hth,
 Tom

 Volker Strobel volker.strobe...@gmail.com writes:

  Hi,
 
  I'm trying to use org-mode with Clojure and already posted my problem at
  https://groups.google.com/forum/#!topic/clojure/lnZWUH4XxJM
  All my code blocks get evaluated in the namespace user, even if I
 evaluate
  the (ns ...) code block first.
 
  EXAMPLE (core.org in src/org-works of Leiningen project):
  ---
  #+BEGIN_SRC clojure :tangle core.clj
  (ns org-works.core
(:gen-class))
  #+END_SRC
 
  #+RESULTS:
  : nil
 
  #+BEGIN_SRC clojure :tangle core.clj
  (in-ns 'org-works.core)
  (def a 5)
 
  #+END_SRC
 
  #+RESULTS:
  : #'org-works.core/a
 
  #+BEGIN_SRC clojure :tangle core.clj
  (def b 5)
 
  #+END_SRC
 
  #+RESULTS:
  : #'user/b
 
  --
 
  Funnily enough, it did work once for a few hours (i.e. the vars were
  declared in the namespace org-works.core), but then it stopped working.
  Now I tried to reinstall emacs 24.3 and follow all the instructions on
  http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-clojure.html
 
  Here are some further details of my system configuration:
  (M-x org-version: *Org-mode version 8.2.5h (release_8.2.5h-643-gd0ae56 @
  /home/pold/org-mode/lisp/*). I also tried to copy the content of the
  ob-clojure.el file directly to my .emacs.
 
  My .emacs only has a minimal content:
  (require 'package)
  (add-to-list 'package-archives
   '(marmalade . http://marmalade-repo.org/packages/;))
  (package-initialize)
 
  (defvar my-packages '(starter-kit
starter-kit-lisp
starter-kit-bindings
starter-kit-eshell
clojure-mode
clojure-test-mode
cider))
 
  (dolist (p my-packages)
(when (not (package-installed-p p))
  (package-install p)))
 
  (add-to-list 'load-path /home/pold/org-mode/lisp)
 
  (require 'org)
  (require 'ob-clojure)
 
  (setq org-babel-clojure-backend 'cider)
  (require 'cider)
 
  My installed packages are:
  (clojure-test-mode cider clojure-mode pkg-info epl dash
  starter-kit-bindings starter-kit-eshell starter-kit-lisp elisp-slime-nav
  starter-kit magit ido-ubiquitous smex find-file-in-project
  idle-highlight-mode paredit).
 
  Any ideas what's going wrong here?
 
  Thanks!
 
  Best, Volker
  Hi,
 
  I'm trying to use org-mode with Clojure and already posted my problem
  at https://groups.google.com/forum/#!topic/clojure/lnZWUH4XxJM
  All my code blocks get evaluated in the namespace user, even if I
  evaluate the (ns ...) code block first.
 
  EXAMPLE (core.org in src/org-works of Leiningen project):
  ---
  #+BEGIN_SRC clojure :tangle core.clj
  (ns org-works.core
  (:gen-class))
  #+END_SRC
 
  #+RESULTS:
  : nil
 
  #+BEGIN_SRC clojure :tangle core.clj
  (in-ns 'org-works.core)
  (def a 5)
 
  #+END_SRC
 
  #+RESULTS:
  : #'org-works.core/a
 
  #+BEGIN_SRC clojure :tangle core.clj
  (def b 5)
 
  #+END_SRC
 
  #+RESULTS:
  : #'user/b
 
  --
 
  Funnily enough, it did work once for a few hours (i.e. the vars were
  declared in the namespace org-works.core), but then it stopped
  working.
  Now I tried to reinstall emacs 24.3 and follow all the instructions on
  http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-clojure.html
 
  Here are some further details of my system configuration:
  (M-x org-version: Org-mode version 8.2.5h (release_8.2.5h-643-gd0ae56
  @ /home/pold/org-mode/lisp/). I also tried to copy the content of the
  ob-clojure.el file directly to my .emacs.
 
  My .emacs only has a minimal content:
  (require 'package)
  (add-to-list 'package-archives
  '(marmalade . http://marmalade-repo.org/packages/;))
  (package-initialize)
 
  (defvar my-packages '(starter-kit
  starter-kit-lisp
  starter-kit-bindings
  starter-kit-eshell
  clojure-mode
  clojure-test-mode
  cider))
 
  (dolist (p my-packages)
  (when (not (package-installed-p p))
  (package-install p)))
 
  (add-to-list 'load-path /home/pold/org-mode/lisp)
 
  (require 'org)
  (require 'ob-clojure)
 
  (setq org-babel-clojure-backend 'cider)
  (require 'cider)
 
  My installed packages are:
  (clojure-test-mode cider clojure-mode pkg-info epl dash
  starter-kit-bindings 

Re: [O] [ANN] Firefox extension for org-protocol and org-capture

2014-02-21 Thread Peter Salazar
I'm having the same issue as Nick: the command line invocation works, but
the button in Firefox has no effect. I changed the emacs binary path to
/usr/bin/aquamacs




On Fri, Feb 21, 2014 at 12:48 PM, Nick Dokos ndo...@gmail.com wrote:

 Olivier Schwander olivier.schwan...@chadok.info writes:

  Le 21 Feb 2014 16:43, Rasmus a écrit:
  So what do I do after installing it? I get a new button but nothing
  happens when I click it.
 
  Do you have emacs server and org-protocol enabled ? Something like this
  in your .emacs:
 
  (server-start)
  (require 'org-protocol)
 
  If not, you should add these two lines and maybe have a look on worg:
  http://orgmode.org/worg/org-contrib/org-protocol.html
 
  You can also test manually in a shell with:
 
   emacsclient org-protocol://capture://example.com/Example/
 
  (It is exactly what does the add-on)
 

 My emacsclient is is /usr/local/bin - I changed that in the addon's
 preferences panel.The command line invocation works fine for me -
 the button in FF (26.0 fwiw) does not: nothing happens. I uninstalled
 and reinstalled the addon a couple of times, restarted FF: no go.
 Is there a way to debug the FF end of the equation?

 Nick







Re: [O] Namespace problem org-mode / Clojure

2014-02-21 Thread Thomas S. Dye
Ouch! You'll want advice from an expert then.

All the best,
Tom

Volker Strobel volker.strobe...@gmail.com writes:

 Thanks for your answer, Tom!
 I tried to modify my org file like this:
 -
 #+header: :package org-works.core
 #+BEGIN_SRC clojure :tangle core.clj
 (ns org-works.core
   (:gen-class))
 #+END_SRC

 #+header: :package org-works.core
 #+BEGIN_SRC clojure :tangle core.clj

 (def a 5)

 #+END_SRC
 ---

 But then, 'M-x org-babel-execute-buffer' results in a emacs crash (can't
 edit anything anymore, nor close the frame).

 Best, Volker



 2014-02-21 23:36 GMT+01:00 Thomas S. Dye t...@tsdye.com:

 Aloha Volker,

 I don't use Clojure, but ob-clojure.el defines a header argument
 :package. You should be able to do something like:

 #+header: :package org-works.core

 to execute code in that name space.

 hth,
 Tom

 Volker Strobel volker.strobe...@gmail.com writes:

  Hi,
 
  I'm trying to use org-mode with Clojure and already posted my problem at
  https://groups.google.com/forum/#!topic/clojure/lnZWUH4XxJM
  All my code blocks get evaluated in the namespace user, even if I
 evaluate
  the (ns ...) code block first.
 
  EXAMPLE (core.org in src/org-works of Leiningen project):
  ---
  #+BEGIN_SRC clojure :tangle core.clj
  (ns org-works.core
(:gen-class))
  #+END_SRC
 
  #+RESULTS:
  : nil
 
  #+BEGIN_SRC clojure :tangle core.clj
  (in-ns 'org-works.core)
  (def a 5)
 
  #+END_SRC
 
  #+RESULTS:
  : #'org-works.core/a
 
  #+BEGIN_SRC clojure :tangle core.clj
  (def b 5)
 
  #+END_SRC
 
  #+RESULTS:
  : #'user/b
 
  --
 
  Funnily enough, it did work once for a few hours (i.e. the vars were
  declared in the namespace org-works.core), but then it stopped working.
  Now I tried to reinstall emacs 24.3 and follow all the instructions on
  http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-clojure.html
 
  Here are some further details of my system configuration:
  (M-x org-version: *Org-mode version 8.2.5h (release_8.2.5h-643-gd0ae56 @
  /home/pold/org-mode/lisp/*). I also tried to copy the content of the
  ob-clojure.el file directly to my .emacs.
 
  My .emacs only has a minimal content:
  (require 'package)
  (add-to-list 'package-archives
   '(marmalade . http://marmalade-repo.org/packages/;))
  (package-initialize)
 
  (defvar my-packages '(starter-kit
starter-kit-lisp
starter-kit-bindings
starter-kit-eshell
clojure-mode
clojure-test-mode
cider))
 
  (dolist (p my-packages)
(when (not (package-installed-p p))
  (package-install p)))
 
  (add-to-list 'load-path /home/pold/org-mode/lisp)
 
  (require 'org)
  (require 'ob-clojure)
 
  (setq org-babel-clojure-backend 'cider)
  (require 'cider)
 
  My installed packages are:
  (clojure-test-mode cider clojure-mode pkg-info epl dash
  starter-kit-bindings starter-kit-eshell starter-kit-lisp elisp-slime-nav
  starter-kit magit ido-ubiquitous smex find-file-in-project
  idle-highlight-mode paredit).
 
  Any ideas what's going wrong here?
 
  Thanks!
 
  Best, Volker
  Hi,
 
  I'm trying to use org-mode with Clojure and already posted my problem
  at https://groups.google.com/forum/#!topic/clojure/lnZWUH4XxJM
  All my code blocks get evaluated in the namespace user, even if I
  evaluate the (ns ...) code block first.
 
  EXAMPLE (core.org in src/org-works of Leiningen project):
  ---
  #+BEGIN_SRC clojure :tangle core.clj
  (ns org-works.core
  (:gen-class))
  #+END_SRC
 
  #+RESULTS:
  : nil
 
  #+BEGIN_SRC clojure :tangle core.clj
  (in-ns 'org-works.core)
  (def a 5)
 
  #+END_SRC
 
  #+RESULTS:
  : #'org-works.core/a
 
  #+BEGIN_SRC clojure :tangle core.clj
  (def b 5)
 
  #+END_SRC
 
  #+RESULTS:
  : #'user/b
 
  --
 
  Funnily enough, it did work once for a few hours (i.e. the vars were
  declared in the namespace org-works.core), but then it stopped
  working.
  Now I tried to reinstall emacs 24.3 and follow all the instructions on
  http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-clojure.html
 
  Here are some further details of my system configuration:
  (M-x org-version: Org-mode version 8.2.5h (release_8.2.5h-643-gd0ae56
  @ /home/pold/org-mode/lisp/). I also tried to copy the content of the
  ob-clojure.el file directly to my .emacs.
 
  My .emacs only has a minimal content:
  (require 'package)
  (add-to-list 'package-archives
  '(marmalade . http://marmalade-repo.org/packages/;))
  (package-initialize)
 
  (defvar my-packages '(starter-kit
  starter-kit-lisp
  starter-kit-bindings
  starter-kit-eshell
  clojure-mode
  clojure-test-mode
  cider))
 
  (dolist (p my-packages)
  (when (not (package-installed-p p))
  (package-install p)))
 
  (add-to-list 'load-path /home/pold/org-mode/lisp)
 
  (require 'org)
  (require 'ob-clojure)
 
  (setq org-babel-clojure-backend 'cider)
  

Re: [O] [ANN] Firefox extension for org-protocol and org-capture

2014-02-21 Thread Erik Hetzner
At Fri, 21 Feb 2014 18:34:17 -0500,
Peter Salazar wrote:
 
 I'm having the same issue as Nick: the command line invocation works, but
 the button in Firefox has no effect. I changed the emacs binary path to
 /usr/bin/aquamacs

I had to start emacsclient in a terminal, probably because my emacs
was run with emacs --daemon ? I made a little wrapper script that runs
emacsclient in a terminal.

best, Erik

-- 
Sent from my free software system http://fsf.org/.



Re: [O] [ANN] Firefox extension for org-protocol and org-capture

2014-02-21 Thread Nick Dokos
Nick Dokos ndo...@gmail.com writes:

 Olivier Schwander olivier.schwan...@chadok.info writes:

 Le 21 Feb 2014 16:43, Rasmus a écrit:
 So what do I do after installing it? I get a new button but nothing
 happens when I click it.

 Do you have emacs server and org-protocol enabled ? Something like this
 in your .emacs:

 (server-start)
 (require 'org-protocol)

 If not, you should add these two lines and maybe have a look on worg:
 http://orgmode.org/worg/org-contrib/org-protocol.html

 You can also test manually in a shell with:

  emacsclient org-protocol://capture://example.com/Example/

 (It is exactly what does the add-on)


 My emacsclient is is /usr/local/bin - I changed that in the addon's
 preferences panel.The command line invocation works fine for me -
 the button in FF (26.0 fwiw) does not: nothing happens. I uninstalled
 and reinstalled the addon a couple of times, restarted FF: no go.
 Is there a way to debug the FF end of the equation?


I tried it with FF 27.0 and that seems to work. Thanks, Olivier!
Any possibility of a similar Chromium extension? :-)

-- 
Nick