Re: [O] clickable text in org-mode not working

2012-11-13 Thread Sebastien Vauban
Hello John,

John Kitchin wrote:
 It appears that one cannot define clickable text in org-mode. I was
 trying to make some text in an org-file respond to different types of
 clicking. I know that links provide some functionality for this, but
 out of curiosity I wanted to see what else I could do.

 If I run the following code on a buffer in text-mode, the first four
 characters in the buffer turn blue with a white background, they turn
 a light green when the mouse is over them, and finally a message box
 pops up when I click on the characters.

 (let ((map (make-sparse-keymap)))
  (define-key map (kbd down-mouse-1)
 '(lambda() (interactive) (message-box it works!)))
  (add-text-properties 1 5 `(keymap, map
 font-lock-face (:foreground blue
 :background white)
 mouse-face highlight)))

 If I switch to org-mode, the clickability and mouse highlighting go
 away. They also do not appear when I run the function in an
 org-buffer.

 Does anyone know if there is a feature in org-mode that turns this
 off, or if there is a way to get the clickability to work? Is it
 related to having links that are clickable?

I'm not sure to understand your use case -- why do you want clickable text in
the first place (other than links)?

But, did you look at `org-add-link-type' which does allow some kind of
powerful stuff (mainly for export, but can maybe be diverted from its original
purpose)?

I guess you also are aware of the elisp and shell links you can already put in
any Org file, as clickable buttons?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] automating incrementing of date stamps

2012-11-13 Thread Alan Schmitt
Michael Brand michael.ch.br...@gmail.com writes:

 in emacs
 org-mode 7.9.2 this key combination did not increment the date stamp.

 What tells “C-h c S-RET” in that place? Also check the manual
 section “3.1 The built-in table editor” about S-RET saying “This key
 is also used by shift-selection and related modes (see Conflicts).” or
 try emacs -Q.

I found out that the cursor position is important for this to work. For
instance it works if it is after the date.

Alan



Re: [O] [PATCH] Separate clocksum format for durations = 1 day

2012-11-13 Thread Toby Cubitt
Attached is a new two-patch series implementing finer-grained control
over the format of clocksum durations (only in overlays and the
mode-line; the format of the CLOCK entries stored in org files remains
unchanged and hard-coded, as before).

The first patch:
- defines a new org-minutes-to-clocksum-string function (replacing
  org-minutes-to-hh:mm-string) for formatting time durations according to
  customization options;
- unifies the formatting of clocksum durations throughout org-colview.el
  and org-clock.el by always calling org-minutes-to-clocksum-string to do
  the formatting;
- extends the org-time-clocksum-format defcustom, allowing it to either
  be a single format string (as before), or a list of between 1 and 3
  format strings for the minutes, hours and days components of a time
  duration;
- retains the org-time-clocksum-use-fractional and
  org-time-clocksum-fractional-format defcustoms, whose meaning is
  unchanged.

The second patch:
- further extends org-time-clocksum-format to allow separate month and
  year components (where a month is taken to be 30 days, a year to be 365
  days).

Both patches maintain backwards-compatibility with any existing
customizations users may have made to these variables. They just add an
additional type for org-time-clocksum-format.

The reason for retaining separate org-time-clocksum-format and
org-time-clocksum-fractional-format's is that (i) it doesn't make much
sense to have a list of formats for separate components when using the
fractional format (see Nicolas' examples earlier in this discussion
thread); (ii) it maintains backwards-compatibility; (iii) it side-steps
the issue of making users customize the format whenever they modify
org-time-clocksum-use-fractional.


I'm not wedded to new customization type I've used in
org-time-clocksum-format. If you prefer a plist, or a different ordering
of the format strings in the list, or a different customization ui,
that's fine by me.

Toby
-- 
Dr T. S. Cubitt
Mathematics and Quantum Information group
Department of Mathematics
Complutense University
Madrid, Spain

email: ts...@cantab.net
web:   www.dr-qubit.org
From 812b6704191d96a8fc255e9c282eeef8deb091cf Mon Sep 17 00:00:00 2001
From: Toby S. Cubitt ts...@cantab.net
Date: Sun, 11 Nov 2012 22:20:24 +
Subject: [PATCH 1/2] Allow more flexible customization of clocksum format

* lisp/org.el (org-time-clocksum-format): as well as a single format
string, can now be a list of up to three format strings which
determine how the minutes, hours and days compontents of a clocksum
duraction should be formated.

* lisp/org.el (org-minutes-to-clocksum-string): function replacing
org-minutes-to-hh:mm-string, which converts a number of minutes to a
string according to the customization options.

* lisp/org-colview.el (org-columns-number-to-string): use new
org-minutes-to-clocksum-string function to format clocksum durations.

* lisp/org-clock.el: instead of calling org-minutes-to-hh:mm-string or
passing org-time-clocksum-format directly to format in order to format
a clock duration as a string, always call the new
org-minutes-to-clocksum-string function to do this.
---
 lisp/org-clock.el   |   51 +
 lisp/org-colview.el |3 +-
 lisp/org.el |   69 +-
 3 files changed, 81 insertions(+), 42 deletions(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 84eb2fd..c768491 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -556,28 +556,23 @@ pointing to it.
 If an effort estimate was defined for the current item, use
 01:30/01:50 format (clocked/estimated).
 If not, show simply the clocked time like 01:50.
-  (let* ((clocked-time (org-clock-get-clocked-time))
-	 (h (floor clocked-time 60))
-	 (m (- clocked-time (* 60 h
+  (let ((clocked-time (org-clock-get-clocked-time)))
 (if org-clock-effort
 	(let* ((effort-in-minutes
 		(org-duration-string-to-minutes org-clock-effort))
-	   (effort-h (floor effort-in-minutes 60))
-	   (effort-m (- effort-in-minutes (* effort-h 60)))
 	   (work-done-str
 		(org-propertize
-		 (format org-time-clocksum-format h m)
+		 (org-minutes-to-clocksum-string clocked-time)
 		 'face (if (and org-clock-task-overrun (not org-clock-task-overrun-text))
 			   'org-mode-line-clock-overrun 'org-mode-line-clock)))
-	   (effort-str (format org-time-clocksum-format effort-h effort-m))
+	   (effort-str (org-minutes-to-clocksum-string effort-in-minutes))
 	   (clockstr (org-propertize
 			  (concat   [%s/ effort-str
    ] ( (replace-regexp-in-string % %% org-clock-heading) ))
 			  'face 'org-mode-line-clock)))
 	  (format clockstr work-done-str))
-  (org-propertize (format
-		   (concat [ org-time-clocksum-format  (%s)])
-		   h m org-clock-heading)
+  (org-propertize (concat [ (org-minutes-to-clocksum-string clocked-time)
+			  (format  (%s) org-clock-heading) ])
 		  'face 

[O] [PATCH] org-e-latex: Tables get correct amount of vertical space

2012-11-13 Thread Myles English
Hi,

This patch replaces every occurence of the \begin{center} environment
with \centering in the file contrib/lisp/org-e-latex.el.  I have tested
the export of a basic table and it works but not sure if all the
replacements are correct.

( BTW, this issue came to light using the nag package like this:
\RequirePackage[l2tabu, orthodox]{nag} )

Myles


From 54ae2245978fa755cd5daa483616ffdfa3e5ed0f Mon Sep 17 00:00:00 2001
From: Myles English mylesengl...@gmail.com
Date: Tue, 13 Nov 2012 14:14:56 +
Subject: [PATCH] org-e-latex:  Tables get correct amount of vertical space

* contrib/lisp/org-e-latex.el: Replaced \begin{center} ..\end{center}
  environments with \centering declarations.

Using both \begin{table} and \being{center} environments leads to double
the vertical space around the float, whereas \centering adds none.

TINYCHANGE
---
 contrib/lisp/org-e-latex.el | 17 +++--
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/contrib/lisp/org-e-latex.el b/contrib/lisp/org-e-latex.el
index 165beb3..c268c2c 100644
--- a/contrib/lisp/org-e-latex.el
+++ b/contrib/lisp/org-e-latex.el
@@ -550,14 +550,13 @@ in order to mimic default behaviour:
  \(when tags
 \(format \hfill{}textsc{:%s:}\
 \(mapconcat 'identity tags \:\)
-\(format (concat \begin{center}\\n\
+\(format (concat \centering\\n\
\fbox{\\n\
\begin{minipage}[c]{.6textwidth}\\n\
\%s\\n\\n\
\rule[.8em]{textwidth}{2pt}\\n\\n\
\%s\
-   \end{minipage}}\
-   \end{center}\)
+   \end{minipage}}\)
full-title contents))
   :group 'org-export-e-latex
   :type 'function)
@@ -1086,7 +1085,7 @@ CONTENTS holds the contents of the center block.  INFO is 
a plist
 holding contextual information.
   (org-e-latex--wrap-label
center-block
-   (format \\begin{center}\n%s\\end{center} contents)))
+   (format \\centering\n%s contents)))
 
 
  Clock
@@ -1508,15 +1507,14 @@ holding contextual information.
   title
   (when tags (format \\hfill{}\\textsc{:%s:}
  (mapconcat 'identity tags :))
-(format (concat \\begin{center}\n
+(format (concat \\centering\n
 \\fbox{\n
 \\begin{minipage}[c]{.6\\textwidth}\n
 %s\n\n
 \\rule[.8em]{\\textwidth}{2pt}\n\n
 %s
 \\end{minipage}\n
-}\n
-\\end{center})
+})
 full-title contents))
 
 
@@ -2302,14 +2300,13 @@ This function assumes TABLE has `org' as its `:type' 
attribute.
  (concat
   (format \\begin{%s}%s\n float-env placement)
   (if org-e-latex-table-caption-above caption )))
-   (when org-e-latex-tables-centered \\begin{center}\n)
+   (when org-e-latex-tables-centered \\centering\n)
(format \\begin{%s}%s{%s}\n%s\\end{%s}
table-env
(if width (format {%s} width) )
alignment
contents
table-env)
-   (when org-e-latex-tables-centered \n\\end{center})
(when float-env
  (concat (if org-e-latex-table-caption-above  caption)
  (format \n\\end{%s} float-env
@@ -2351,7 +2348,7 @@ attribute.
(unless (= n 2)
  (setq output (replace-match  nil nil output)))
 (if (not org-e-latex-tables-centered) output
-  (format \\begin{center}\n%s\n\\end{center} output
+  (format \\centering\n%s output
 
 
  Table Cell
-- 
1.8.0




Re: [O] [PATCH] org-e-latex: Tables get correct amount of vertical space

2012-11-13 Thread Sebastien Vauban
Hi Myles,

Myles English wrote:
 This patch replaces every occurence of the \begin{center} environment
 with \centering in the file contrib/lisp/org-e-latex.el.
 ...
 -   (format \\begin{center}\n%s\\end{center} contents)))
 +   (format \\centering\n%s contents)))

Wouldn't you have to replace

  \begin{center}
...
  \end{center}

by

  {\centering
...
  }

?  That is, add a group around?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [new exporter] no \caption and \label upon export of #+BEGIN_LATEX block

2012-11-13 Thread Myles English

Hi Nicolas,

Thanks for your help.  I am responding with a couple of points just to
complete this thread, in case someone else is wondering about the same
thing.

Nicolas Goaziou writes:

 Myles English mylesengl...@gmail.com writes:

 I'd like to use a tikz snippet in a few different documents and it would
 be convenient to be able to include it in a latex document like so:

 #+CAPTION: a fine figure
 #+NAME:   figure:fine_figure
 #+ATTR_LaTeX: width=5cm
 #+BEGIN_LATEX
 \input{/home/myles/tex/tikz_figure.tex}
 #+END_LATEX

 What is exported is just the \input line, with no \label or \caption, i.e.:

 \input{/home/myles/tex/tikz_figure.tex}

 Well, IMO, it doesn't make much sense to add a caption or a label to an
 export block. Just write whatever you want within the block. I.e.:

 #+BEGIN_LATEX
 \caption{\label{figure:fine_figure}a fine figure}
 \input{/home/myles/tex/tikz_figure.tex}
 #+END_LATEX

 Is there any downside to it?

One downside is that I can't then refer to it using org label syntax
[[figure:fine_figure]] and have to use the latex syntax
\autoref{figure:fine_figure}.  So it is not a problem really.  The other
downside is that it is for latex export only.  That too is not a problem
in this case.

 I believe this was possible with current (old) exporter, based on this
 thread:

 http://lists.gnu.org/archive/html/emacs-orgmode/2012-10/msg00267.html

 This thread is about src blocks. Adding a label or a caption is fine for
 them.

I also found this thread which dicusses the same thing:

http://lists.gnu.org/archive/html/emacs-orgmode/2011-10/msg00232.html

For anyone else wondering what the best way is, I think that, basically,
you have to decide whether you are going to export to latex only or to
other formats as well.  If exporting to other formats then compile the
figure in a source block, convert to png if necessary, and have the
label, caption and other attributes as org markup on a link to the
graphics file.  This takes (comparatively) a lot of marking up and
option tweaking.  If only exporting to latex then the tikz snippet,
label, caption, sizing etc are best contained in a latex block (as
Nicolas says).

 On second thoughts, perhaps another way to do it would be to have a
 source block make the tikz graphic as a standalone pdf/eps and then
 insert it as a link to the file.  The disadvantage of that would be that
 the tikz .tex file would need to be expanded to have it's own
 \begin/end{document} and would loose some flexibility.

The latex package 'standalone' overcomes this disadvantage because you
can *both* compile the tikz figs as, well, standalone pdfs *and* include
them in the latex block using \includestandalone (which works like
\includegraphics), and the advantage is that the tikz file does not need
to be changed at all for the different uses.

 Any thoughts on that route?

 I don't know. for my graphics, I use Asymptote src-blocks generating
 links to pdf files. E.g.:

   #+NAME: app
   #+BEGIN_SRC asymptote :file application.pdf
   import graph;
   defaultpen(fontsize(10pt));
   unitsize(2cm);
   pen p=blue;
   real f(real x) { return x**2; }
   real g(real x) { return -x + 2; }
   draw(graph(f,0,1),p);
   draw(graph(g,1,2),p);
   xaxis(xmax=2.3,Ticks(Size=1mm,NoZero),Arrow(6pt));
   yaxis(ymax=1.3,Ticks(step=.5,Step=1,Size=1mm,NoZero),Arrow(6pt));
   label($O$,(0,0),SW);
   label($C_f$,(1.5,g(1.5)),2N,p);
   #+END_SRC

   #+BEGIN_CENTER
   #+RESULTS: app
   [[file:application.pdf]]
   #+END_CENTER

Thanks for this example I will surely find a use for it.

Myles



Re: [O] [PATCH] org-e-latex: Tables get correct amount of vertical space

2012-11-13 Thread Myles English

Hi Seb,

Sebastien Vauban writes:

 Hi Myles,

 Myles English wrote:
 This patch replaces every occurence of the \begin{center} environment
 with \centering in the file contrib/lisp/org-e-latex.el.
 ...
 -   (format \\begin{center}\n%s\\end{center} contents)))
 +   (format \\centering\n%s contents)))

 Wouldn't you have to replace

   \begin{center}
 ...
   \end{center}

 by

   {\centering
 ...
   }

 ?  That is, add a group around?

I don't think so, at least I have not come across that usage, and it
seems to work without.  Do you know different?

Myles


 Best regards,
   Seb




Re: [O] Erroneous No such file or directory with babel and remote dir

2012-11-13 Thread Loris Bennett
Achim Gratz strom...@nexgo.de writes:

 Loris Bennett writes:
 OK, I must have goofed.  What I did after starting the bisection was

 - run 'make autoload'
 - open test file in emacs with minimal .emacs
 - test
 - end emacs
 - mark bisection good or bad

 I then repeated this for the next commit.

 This would be the correct thing to do, yes.

 Is something missing here, or did I just incorrectly mark a commit?

 I really don't know, I'm just guessing… :-)

 It may be more informative if you traced the invocation of the remote
 execution in both a failing and a working version in the debugger and
 look for any differences as the arguments are cobbled together.  Once
 you find where an how these diverge it would be much easier to find the
 code that is responsible for it (if it wasn't glaringly obvious from the
 trace already).


 Regards,
 Achim.

[Sorry if this appears twice - Gnus got the better of me]

So just as a reminder:

Back in the days of release_7.01h, the following used to work:

,--
| #+begin_src sh :dir /loris@othercomputer:
| hostname
| #+end_src
`--

Currently it produces the error:

,---
| apply: Wrong type argument: number-or-marker-p, 
`---

I have had another go at bisecting this problem and came up with this:

,-
| 9c878a8290c071fbe5e97bc33c300ef2f07d6153 is the first bad commit
| commit 9c878a8290c071fbe5e97bc33c300ef2f07d6153
| Author: Dan Davison davi...@stats.ox.ac.uk
| Date:   Mon Aug 30 09:34:05 2010 -0700
| 
| babel: Fix temporary file processing in the remote execution case.
| 
| * ob.el (org-babel-temp-file): Don't use babel temporary
| directory in remote case; use make-temp-file with remote file
| name so that temp file is guaranteed not to exist previously
| on remote machine.
| (org-babel-tramp-localname): New function to return local name
| portion of possibly remote file specification
| 
| * ob-R.el (org-babel-R-evaluate-external-process): Respond to
| changes in `org-babel-temp-file'; pass local file name to
| remote R process.
| (org-babel-R-evaluate-session) Respond to
| changes in `org-babel-temp-file'; pass local file name to
| remote R process.
| 
| :04 04 b31e072cf6b2951e95b7956d907303e7a04a8cfd 
5f794ada52cceb0614fe7962a399f7e549759003 M  lisp
`-

Does that help anyone any further?

Cheers,

Loris

PS: I am amazed there aren't any more peasants like myself with torches
and pitchforks beating on the gates of Castle Org about this - remote
execution is/was such great feature!
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin Email loris.benn...@fu-berlin.de




Re: [O] [PATCH] org-e-latex: Tables get correct amount of vertical space

2012-11-13 Thread Nick Dokos
Myles English mylesengl...@gmail.com wrote:

 
 Hi Seb,
 
 Sebastien Vauban writes:
 
  Hi Myles,
 
  Myles English wrote:
  This patch replaces every occurence of the \begin{center} environment
  with \centering in the file contrib/lisp/org-e-latex.el.
  ...
  -   (format \\begin{center}\n%s\\end{center} contents)))
  +   (format \\centering\n%s contents)))
 
  Wouldn't you have to replace
 
\begin{center}
  ...
\end{center}
 
  by
 
{\centering
  ...
}
 
  ?  That is, add a group around?
 
 I don't think so, at least I have not come across that usage, and it
 seems to work without.  Do you know different?
 

If a \centering occurs at top-level in a latex document,
then *everything* after it will be centered: it's a declaration that
remains in force for the current group (which is the rest of the
document if it occurs at top-level).

\begin{center}...\end{center} is essentially {\centering ...} except
that it also starts a new paragraph.

It's not clear to me at least, that wholesale replacement is the correct
thing to do: it needs to be looked at on a case-by-case basis I think.

Nick





Re: [O] [PATCH] org-e-latex: Tables get correct amount of vertical space

2012-11-13 Thread Sebastien Vauban
Hi Myles and Nick,

Nick Dokos wrote:
 Myles English mylesengl...@gmail.com wrote:
 Sebastien Vauban writes:
  Myles English wrote:
  This patch replaces every occurence of the \begin{center} environment
  with \centering in the file contrib/lisp/org-e-latex.el.
  ...
  -   (format \\begin{center}\n%s\\end{center} contents)))
  +   (format \\centering\n%s contents)))
 
  Wouldn't you have to replace
 
\begin{center}
  ...
\end{center}
 
  by
 
{\centering
  ...
}
 
  ?  That is, add a group around?
 
 I don't think so, at least I have not come across that usage, and it
 seems to work without.  Do you know different?

 If a \centering occurs at top-level in a latex document,
 then *everything* after it will be centered: it's a declaration that
 remains in force for the current group (which is the rest of the
 document if it occurs at top-level).

As confirmed by Nick, \centering just changes the layout for ever... up to the
end of the document.

Why does it work?  I guess because there are grouping commands inserted by Org
at other places, that stop the propagation of the centering that far... But
it's dangerous to count on them, IMHO.

 \begin{center}...\end{center} is essentially {\centering ...} except
 that it also starts a new paragraph.

 It's not clear to me at least, that wholesale replacement is the correct
 thing to do: it needs to be looked at on a case-by-case basis I think.

I think that's a safe replacement (_with_ the grouping), and with something I
forgot about (well seen Nick!): the \par.

See, for example,
https://groups.google.com/forum/?fromgroups=#!topic/fr.comp.text.tex/0s4WfsIfmy8
for the answer of Manuel Pégourié-Gonnard, one reference wrt LaTeX questions:

  replace the environment by {\centering ... \par}

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [PATCH] org-e-latex: Tables get correct amount of vertical space

2012-11-13 Thread Nick Dokos
Sebastien Vauban wxhgmqzgw...@spammotel.com wrote:

 I think that's a safe replacement (_with_ the grouping), and with something I
 forgot about (well seen Nick!): the \par.
 
 See, for example,
 https://groups.google.com/forum/?fromgroups=#!topic/fr.comp.text.tex/0s4WfsIfmy8
 for the answer of Manuel Pégourié-Gonnard, one reference wrt LaTeX questions:
 
   replace the environment by {\centering ... \par}
 

I think I read the whole thread but I'm still not clear on why
the change is needed. What goes awry with the environment instead
of the declaration?

Nick



Re: [O] [PATCH] org-e-latex: Tables get correct amount of vertical space

2012-11-13 Thread Nick Dokos
Nick Dokos nicholas.do...@hp.com wrote:

 
 I think I read the whole thread but I'm still not clear on why
 the change is needed. What goes awry with the environment instead
 of the declaration?
 

Never mind - I didn't read the whole thread.

Nick



[O] Bug: org-clock-in missing + agenda start up error [7.9.2 (release_7.9.2-567-g854ddf-git @ org-loaddefs.el can not be found!)]

2012-11-13 Thread Martin Steffen



Hi,

since some time, I got an number of problems with org-mode, e.g., error
messages when starting the agenda the first time.  I don't know whether
it's related to another error, but I suspect so, so I mention both.


  1) clockin in no longer works:

  I can no longer clock-in, when typing, the message is


   Function definition is void: org-clock-in

(same for clock-out)


   2) agenda start up error:

When I try to invoke the agenda the _first_ time emacs throws an
error. The error trace/call stack starts with

 call-interactively(org-agenda nil nil)


and the error occurs at 


  Debugger entered--Lisp error: (void-function org-element-context)
(org-element-context)


If I try to invoke the agenda the second time, the error
disappear, even if the agende is not formatted correctly. 
If I then invoke the agenda the third time, it looks ok.

As said, I don't know whether the bumpy agenda start-up causes the
clock-error or is otherwise related, but these errors appear not some
time, and seemed to have appeared around the same time. 


PS: I use pretty much the newest org-mode available via git, and my
emacs is 24.2.3 (but the same appears also at some emacs-23, which I
tried).


Chees, Martin










Emacs  : GNU Emacs 24.2.3 (x86_64-unknown-linux-gnu, GTK+ Version 2.10.4)
 of 2012-10-29 on xxx.xxx.xxx.xxx
Package: Org-mode version 7.9.2 (release_7.9.2-567-g854ddf-git @ 
org-loaddefs.el can not be found!)

current state:
==
(setq
 org-export-preprocess-before-selecting-backend-code-hook 
'(org-beamer-select-beamer-code)
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-track-remove-package t
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-export-preprocess-before-normalizing-links-hook 
'(org-remove-file-link-modifiers)
 org-log-done 'note
 org-confirm-shell-link-function 'yes-or-no-p
 org-track-compile-sources nil
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc
   org-beamer-auto-fragile-frames
   org-beamer-place-default-actions-for-lists)
 org-todo-setup-filter-hook '(org-choose-setup-filter)
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-agenda-custom-commands '((f occur-tree FINISH))
 org-todo-get-default-hook '(org-choose-get-default-mark)
 org-default-notes-file ~/priv/org/notes.org
 org-export-define-heading-targets-headline-hook 
'(org-wikinodes-set-wiki-targets-during-export)
 org-todo-keyword-faces '((TODO :foreground orange :weight bold) 
(UNDERWAY . org-warning)
  (DEFERRED . shadow) (DELEGATED :foreground 
yellow :weight bold)
  (PENDING :foreground brown shadow) (DONE 
:foreground green)
  (DORMANT :foreground grey)
  (CANCELLED :foreground grey :weight bold))
 org-agenda-include-diary t
 org-drawers '(PROPERTIES LOGBOOK CLOCK HIDINGDRAWER WEGGEKLAPPT)
 org-after-todo-state-change-hook '(org-clock-out-if-current org-checklist)
 org-track-directory ~/Downloads/
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-font-lock-set-keywords-hook '(org-wikinodes-add-to-font-lock-keywords)
 org-trigger-hook '(org-depend-trigger-todo org-choose-keep-sensible)
 org-mode-hook '(org-drill-add-cloze-fontification turn-on-font-lock
 (lambda nil
  (org-add-hook (quote change-major-mode-hook) (quote 
org-show-block-all)
   (quote append) (quote local))
  )
 (lambda nil
  (org-add-hook (quote change-major-mode-hook) (quote 
org-babel-show-result-all)
   (quote append) (quote local))
  )
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-refile-targets '((org-agenda-files :maxlevel . 3) (org-agenda-files :tag . 
))
 org-clock-persist t
 org-ctrl-c-ctrl-c-hook '(org-wikinodes-clear-cache-when-on-target 
org-babel-hash-at-point
  org-babel-execute-safely-maybe)
 org-directory ~/priv/org
 org-enforce-todo-dependencies t
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-hide-inline-tasks org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-export-latex-format-toc-function 

Re: [O] Erroneous No such file or directory with babel and remote dir

2012-11-13 Thread Loris Bennett
Achim Gratz strom...@nexgo.de writes:

 Loris Bennett writes:
 OK, I must have goofed.  What I did after starting the bisection was

 - run 'make autoload'
 - open test file in emacs with minimal .emacs
 - test
 - end emacs
 - mark bisection good or bad

 I then repeated this for the next commit.

 This would be the correct thing to do, yes.

 Is something missing here, or did I just incorrectly mark a commit?

 I really don't know, I'm just guessing… :-)

 It may be more informative if you traced the invocation of the remote
 execution in both a failing and a working version in the debugger and
 look for any differences as the arguments are cobbled together.  Once
 you find where an how these diverge it would be much easier to find the
 code that is responsible for it (if it wasn't glaringly obvious from the
 trace already).


 Regards,
 Achim.

So just as a reminder:

Back in the days of release_7.01h, the following used to work:

,--
| #+begin_src sh :dir /loris@othercomputer:
| hostname
| #+end_src
`--

Currently it produces the error:

,---
| apply: Wrong type argument: number-or-marker-p, 
`---

I have had another go at bisecting this problem and came up with this:

,-
| 9c878a8290c071fbe5e97bc33c300ef2f07d6153 is the first bad commit
| commit 9c878a8290c071fbe5e97bc33c300ef2f07d6153
| Author: Dan Davison davi...@stats.ox.ac.uk
| Date:   Mon Aug 30 09:34:05 2010 -0700
| 
| babel: Fix temporary file processing in the remote execution case.
| 
| * ob.el (org-babel-temp-file): Don't use babel temporary
| directory in remote case; use make-temp-file with remote file
| name so that temp file is guaranteed not to exist previously
| on remote machine.
| (org-babel-tramp-localname): New function to return local name
| portion of possibly remote file specification
| 
| * ob-R.el (org-babel-R-evaluate-external-process): Respond to
| changes in `org-babel-temp-file'; pass local file name to
| remote R process.
| (org-babel-R-evaluate-session) Respond to
| changes in `org-babel-temp-file'; pass local file name to
| remote R process.
| 
| :04 04 b31e072cf6b2951e95b7956d907303e7a04a8cfd 
5f794ada52cceb0614fe7962a399f7e549759003 M  lisp
`-

Does that help anyone any further?

Cheers,

Loris

PS: I am amazed there aren't any more peasants like myself with torches
and pitchforks beating on the gates of Castle Org about this - remote
execution is/was such great feature!

-- 
no sig is good sig






[O] Emacs non-breaking space (Ctrl-x 8 space) doesn't export to HTML nbsp;

2012-11-13 Thread D. C. Toedt
Emacs allows you to enter a non-breaking space by typing Ctrl-x 8 space.
 That doesn't export to HTML as nbsp; though.  Is this expected behavior,
or a bug?

I've worked around it by globally-replacing non-breaking spaces with nbsp;
before exporting.

I'm using 7.9.2, the Nov. 5, 2012 build.


-- 
*D. C. Toedt III * |  Lawyer for tech companies  |  Houston, Texas (Central
time zone)|  Last name is pronounced Tate
d...@toedt.com  |  +1 (713) 364-6545   |  *Blog:* On
Contractshttp://www.OnContracts.com  |
 *LinkedIn:* dctoedt http://www.linkedin.com/in/dctoedt  |
Calendarhttps://www.google.com/calendar/embed?src=dc.to...@toedt.commode=WEEK
 (redacted)


Re: [O] clickable text in org-mode not working (Sebastien Vauban)

2012-11-13 Thread John Kitchin
I was just learning about programming interactive features into emacs
buffers, and something that worked in one major mode did not work in
org-mode. I have narrowed it down to an effect of font-lock-mode. When
that is off, the mouse-clicking works fine, when it is on, the font
syntax highlighting works fine, but not the clicking in org-mode.

In terms of usage, I could see this as a way to automatically make
links out of different words, or in a related application to overlay
tooltips on specific words without having to markup the org-file. In
essence, moving some markup to a lisp file that is run before opening
the org-file.

I am familiar with `org-add-link-type' and have used that to do some
pretty cool things, as well as the elisp and shell links. With the
clickable text code I described, you can actually do different things
with different mouse clicks, including different mouse buttons, and
presumably on mouse button up events. It is not obvious that can be
done with `org-add-link-type'; you get the same behavior with any
mouse button click. I havent advanced to a point where I could get
emacs-lisp to tell me which mouse event occurred on clicking on a
link. That seems possible though.

j

 Message: 34
 Date: Tue, 13 Nov 2012 09:50:19 +0100
 From: Sebastien Vauban wxhgmqzgw...@spammotel.com
 To: emacs-orgmode@gnu.org
 Subject: Re: [O] clickable text in org-mode not working
 Message-ID: 80haot999w@somewhere.org
 Content-Type: text/plain

 Hello John,

 John Kitchin wrote:
 It appears that one cannot define clickable text in org-mode. I was
 trying to make some text in an org-file respond to different types of
 clicking. I know that links provide some functionality for this, but
 out of curiosity I wanted to see what else I could do.

 If I run the following code on a buffer in text-mode, the first four
 characters in the buffer turn blue with a white background, they turn
 a light green when the mouse is over them, and finally a message box
 pops up when I click on the characters.

 (let ((map (make-sparse-keymap)))
  (define-key map (kbd down-mouse-1)
 '(lambda() (interactive) (message-box it works!)))
  (add-text-properties 1 5 `(keymap, map
 font-lock-face (:foreground blue
 :background white)
 mouse-face highlight)))

 If I switch to org-mode, the clickability and mouse highlighting go
 away. They also do not appear when I run the function in an
 org-buffer.

 Does anyone know if there is a feature in org-mode that turns this
 off, or if there is a way to get the clickability to work? Is it
 related to having links that are clickable?

 I'm not sure to understand your use case -- why do you want clickable text in
 the first place (other than links)?

 But, did you look at `org-add-link-type' which does allow some kind of
 powerful stuff (mainly for export, but can maybe be diverted from its original
 purpose)?

 I guess you also are aware of the elisp and shell links you can already put in
 any Org file, as clickable buttons?

 Best regards,
   Seb

 --
 Sebastien Vauban







[O] txt2tags exporter: patch questions

2012-11-13 Thread Matteo Cypriani
Hi there,


I worked on an exporter to the txt2tags format (http://txt2tags.org/) via org-
export-generic, and I have got a few questions (that are also included as 
comments in the attached patch).


My first question is about numbered lists: they don't seem to be detected, 
i.e. numbers are kept (despite :body-number-list-leave-number is set to nil), 
and the prefix is not applied. It seems to be the case also for other formats 
handled by the generic exporter, so maybe it is a known issue.


In the same kind of issue, the #+BEGIN_QUOTE blocks does not seem to be 
detected, setting :blockquote-start and :blockquote-end doesn't have any 
effect and the text inside the block is outputted as normal paragraph text.

#+BEGIN_VERSE blocks are the same except they start with “ORG-VERSE-START” and 
end with “ORG-VERSE-END”, but I guess this is more normal since I don't find 
any mention of verse blocks in the org-export-generic code.

That said the txt2tags format doen't handle quote blocks, each line of a quote 
must be indented by a tab. Would it be possible to add something like :body-
line-quote-format and :body-line-verse-format (as :body-line-fixed-format 
exists)?


I also have a problem with tables, as txt2tags doesn't handle horizontal lines 
in the tables; would it be possible to add an option like :body-line-export-
hline?


My last question is about paragraph spacing. To get a blank line between two 
paragraphs (which is the way to separate paragraphs in txt2tags as well as in 
org-mode), I set :body-newline-paragraph to \n (by the way that should also 
be the case at least in the MediaWiki exporter). It works as expected for 
normal paragraphs, but it becomes a mess with item lists.

I set the following variables for more visibility:
 :body-line-format  %s!EOL!\n
 :body-newline-paragraph!NP!\n
 :body-list-format  - %s!EOI!
 :body-list-suffix  !BLS!\n\n!ELS!
So we have !EOL! before an end of line, !NP! before a new paragraph, !EOI! at 
the end of a list item (without a trailing new line), !BLS! to begin the list 
suffix and !ELS! to end it. Note that the txt2tags format requires two blank 
lines to close a list.

Now we have the following text in our org-mode buffer:

- First item.
- This is
  an item
  on three lines.
- Bar foo
  blah.

Which gets exported as:

- First item.!EOI!!NP!
- This is!EOI!!BLS!

!ELS!  an item!EOL!
  on three lines.!EOL!
!NP!
- Bar foo!EOI!!BLS!

!ELS!  blah.!EOL!
!NP!

So, it sounds like multi-line items are not handled properly by org-generic-
exporter. In my opinion:
- :body-newline-paragraph should not be added inside a list, we can handle the 
format of an item list with :body-list-format.
- The second and subsequent lines of an item should be handled as special 
elements instead of as normal lines, i.e. :body-line-format should not be 
used, but maybe a :body-list-line-format should be added.
- The end of a list should be detected so that :body-list-suffix is added only 
there.

I am by no mean a Lisp developper, so that is what I *think* should be done to 
get a proper handling of lists, but (1) I may be wrong, and (2) I don't think 
I can do that myself. Comments and advices appreciated.


Also, at the end of my patch is a small list of things missing in org-generic-
exporter to get a complete txt2tags support, in case someone's got some spare 
time and doesn't know where to start :-)


Thanks for reading so far,

  Matteo

P.S.: please keep me CC'ed if you answer this email, as I am not subscribed to 
the list.
--- org-export-generic.el.orig	2012-11-13 17:59:22.795585712 +0100
+++ org-export-generic.el	2012-11-13 19:33:15.458769199 +0100
@@ -371,6 +371,103 @@
 
  )
 ;;
+;; txt2tags
+;;
+(txt2tags
+ :file-suffix   .t2t
+ :key-binding   ?2
+
+ ; Header
+ :title-format  %s\n
+ :author-export t
+ :date-export   t
+ :date-suffix   \n
+ :toc-exportnil
+
+ ; Titles  sections
+ :body-section-prefix   
+ :body-header-section-numbers   nil
+ :body-section-header-prefix   (\n\n\n=  \n==  === 
+  =  == )
+ :body-section-header-format%s
+ :body-section-header-suffix   ( =\n  ==\n  ===\n
+ \n  =\n  ==\n)
+
+ ; General line format
+ :body-line-format  %s\n
+ :body-line-wrap72
+ ; To have a new line after each paragraph:
+ :body-newline-paragraph\n
+ :body-text-prefix  
+ :body-text-suffix  
+
+ ; Lists
+ ; Note: nested lists are not handled by org-export-generic yet.
+ ; /!\ Multi-line items get a new line after their first line
+ ; (because of :body-newline-paragraph)
+ :body-list-format  - %s
+ 

Re: [O] Emacs non-breaking space (Ctrl-x 8 space) doesn't export to HTML nbsp;

2012-11-13 Thread Nicolas Goaziou
Hello,

D. C. Toedt d...@toedt.com writes:

 Emacs allows you to enter a non-breaking space by typing Ctrl-x 8 space.
  That doesn't export to HTML as nbsp; though.  Is this expected behavior,
 or a bug?

Org doesn't replace UTF-8 characters with HTML (or any other export
target) symbols. So, yes, this is the expected behaviour.

Note that you can also have a non-breaking space by using an entity:
\nbsp{}.


Regards,

-- 
Nicolas Goaziou



Re: [O] [bug?] org-e-latex; unexpected enumerate in export

2012-11-13 Thread Nicolas Goaziou
Yagnesh Raghava Yakkala h...@yagnesh.org writes:

 Seems fill-paragraph and auto-fill are not working properly(at least for
 me). Some how the number is placed like that unintentionally. But I guess the
 work-around question is still valid.

There already is a protection mechanism against this situation. The
question is: why doesn't it kick in here?

Did you try with -Q? Also, what is the value of `fill-nobreak-predicate'
variable in that buffer?


Regards,

-- 
Nicolas Goaziou



Re: [O] Sexp aganda entries broken?

2012-11-13 Thread Simon Thum

On 11/12/2012 09:31 PM, Nicolas Goaziou wrote:

Simon Thumsimon.t...@gmx.de  writes:


I see, it just seemed to me that org-contacts uses it for (seemingly)
good reasons and there is no replacement or deprecation. Is there
missing consensus on this syntax?


I don't think so. AFAIU this syntax was created to include diary entries
without the overhead of generating the diary first. There are not meant
to be used as a replacement for timestamps.
Sure. I'd appreciate if the new icalendar exporter would handle these 
entries (in particular org-contacts ones) - I didn't yet get it to 
export agendas. Is it possible to do that?


Cheers,

Simon




Regards,






Re: [O] [bug?] org-e-latex; unexpected enumerate in export

2012-11-13 Thread Yagnesh Raghava Yakkala

Hello Nicolas,

 There already is a protection mechanism against this situation. 

is it by latex-exporter or by auto-fill? :/

 Did you try with -Q? 

Yes I did, export is still producing enumerate. Of course If I adjust sentence
as you suggested earlier manually (fill is not so accurate) export is working
as desired.

Also, what is the value of `fill-nobreak-predicate' variable in that buffer?

Its value is `nil'.


Thanks.,
-- 
ఎందరో మహానుభావులు అందరికి వందనములు
YYR


Re: [O] Sexp aganda entries broken?

2012-11-13 Thread Nicolas Goaziou
Simon Thum simon.t...@gmx.de writes:

 Sure. I'd appreciate if the new icalendar exporter would handle these
 entries (in particular org-contacts ones) - I didn't yet get it to
 export agendas. Is it possible to do that?

There's support for it (see `org-e-icalendar-include-sexps'). Internally
it uses the function `org-diary-to-ical-string', but, last time I tried,
this function wasn't able to return anything but the empty string. YMMV.


Regards,

-- 
Nicolas Goaziou



Re: [O] [bug?] org-e-latex; unexpected enumerate in export

2012-11-13 Thread Nicolas Goaziou
Yagnesh Raghava Yakkala h...@yagnesh.org writes:

 is it by latex-exporter or by auto-fill? :/

This is unrelated to the exporter. Something is wrong in your Org
buffer: filling/Auto-filling shouldn't create a phantom item like this
one.

 Did you try with -Q? 

 Yes I did, export is still producing enumerate. Of course If I adjust sentence
 as you suggested earlier manually (fill is not so accurate) export is working
 as desired.

I'm not talking about export, but filling. Can you fill correctly
with -Q ? By fill correctly I mean that 2008. shouldn't be put at
the beginning of a line unless it wasn't there already.

Also, what is the value of `fill-nobreak-predicate' variable in that buffer?

 Its value is `nil'.

That is the problem. It should contain at least
`org-fill-paragraph-separate-nobreak-p' and
`org-fill-line-break-nobreak-p' functions. Do you have an idea why it
doesn't?


Regards,

-- 
Nicolas Goaziou



Re: [O] [bug?] org-e-latex; unexpected enumerate in export

2012-11-13 Thread Yagnesh Raghava Yakkala

Hello Nicolas,

 I'm not talking about export, but filling. Can you fill correctly
 with -Q ? By fill correctly I mean that 2008. shouldn't be put at
 the beginning of a line unless it wasn't there already.

with emacs -Q (with org-mode release_7.9.2-584-g0421be)

--8---cut here---start-8---
The Model was initialized at 00 UTC 25 DEC 2008 to 00 UTC 28 DEC 2008. The 
initial and boundary conditions blah blah.  more blah
--8---cut here---end---8---

fill-paragraph (M-q) is filling following way (I think correctly).

--8---cut here---start-8---
The Model was initialized at 00 UTC 25 DEC 2008 to 00 UTC 28
DEC 2008. The initial and boundary conditions blah blah.  more blah
--8---cut here---end---8---

but when the paragraph

--8---cut here---start-8---
The Model was initialized at 00 UTC 25 DEC 2008 to 00 UTC 28 DEC
2008. The initial and boundary conditions blah blah.  more blah
--8---cut here---end---8---

fill-paragraph doesn't change anything. May be fill is also assuming the
second line as a list and correctly so.

I think the fault is with my English and writing habits. After several edits
in that paragraph It ended up having number and dot at the bol.  I think Its
just a watch-out case.

Also, what is the value of `fill-nobreak-predicate' variable in that buffer?

 Its value is `nil'.

 That is the problem. It should contain at least
 `org-fill-paragraph-separate-nobreak-p' and
 `org-fill-line-break-nobreak-p' functions. 

Do you have an idea why it doesn't?

I read it wrong earlier.

Sorry for ringing false alarm.

Thanks a lot.
-- 
ఎందరో మహానుభావులు అందరికి వందనములు
YYR



Re: [O] Bug: org-clock-in missing + agenda start up error [7.9.2 (release_7.9.2-567-g854ddf-git @ org-loaddefs.el can not be found!)]

2012-11-13 Thread Achim Gratz
Martin Steffen writes:
 Package: Org-mode version 7.9.2 (release_7.9.2-567-g854ddf-git @ 
 org-loaddefs.el can not be found!)
Here's your clue: 
-^

Generate the autoloads file and things should start to work:

make compile


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

Waldorf MIDI Implementation  additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs




Re: [O] [PATCH] org-e-latex: Tables get correct amount of vertical space

2012-11-13 Thread Myles English


Sebastien Vauban writes:

 Hi Myles and Nick,

 Nick Dokos wrote:
 Myles English mylesengl...@gmail.com wrote:
 Sebastien Vauban writes:
  Myles English wrote:
  This patch replaces every occurence of the \begin{center} environment
  with \centering in the file contrib/lisp/org-e-latex.el.
  ...
  -   (format \\begin{center}\n%s\\end{center} contents)))
  +   (format \\centering\n%s contents)))
 
  Wouldn't you have to replace
 
\begin{center}
  ...
\end{center}
 
  by
 
{\centering
  ...
}
 
  ?  That is, add a group around?
 
 I don't think so, at least I have not come across that usage, and it
 seems to work without.  Do you know different?

 If a \centering occurs at top-level in a latex document,
 then *everything* after it will be centered: it's a declaration that
 remains in force for the current group (which is the rest of the
 document if it occurs at top-level).

 As confirmed by Nick, \centering just changes the layout for ever... up to the
 end of the document.

 Why does it work?  I guess because there are grouping commands inserted by Org
 at other places, that stop the propagation of the centering that far... But
 it's dangerous to count on them, IMHO.

 \begin{center}...\end{center} is essentially {\centering ...} except
 that it also starts a new paragraph.

From within a figure or table environment, that new paragraph shows up
as uneeded vertical space, see the example I give lower down.

 

 It's not clear to me at least, that wholesale replacement is the correct
 thing to do: it needs to be looked at on a case-by-case basis I
 think.

Nick, I think you are right about this, the modified patch at the end of
this email makes only the replacements that are necessary just to
replace the center environment within table blocks.

The other \begin{center}'s in the org-e-latex.el file may be changed
some other time, if needed.

 I think that's a safe replacement (_with_ the grouping), and with something I
 forgot about (well seen Nick!): the \par.

I don't think the grouping is necessary because the implied group will
be closed when the table environment is ended.  Likewise, I don't think
the \par is necessary.

If you compile this this latex it illustrates the problem, and the
solution:

%__begin example.tex___
\documentclass[11pt]{article}
\usepackage{float}

\begin{document}

Before.---

\begin{table}[htb]
\caption{\label{tab:progress}Summary}
\begin{center}
\begin{tabular}{ll}
A  B\\
\end{tabular}
\end{center}
\end{table}

After.

Before.---

\begin{table}[htb]
\caption{\label{tab:progress}Summary}
\centering
\begin{tabular}{ll}
A  B\\
\end{tabular}
\end{table}

After.---
\end{document}
%__end example.tex___

 See, for example,
 https://groups.google.com/forum/?fromgroups=#!topic/fr.comp.text.tex/0s4WfsIfmy8
 for the answer of Manuel Pégourié-Gonnard, one reference wrt LaTeX
 questions:

My French, and my browser apparently, is not good enough to understand
that thread.  Sorry.  Please translate if it is still relevant to this
discussion.


   replace the environment by {\centering ... \par}

[answered above]


 Best regards,
   Seb

Myles


From 51686ada4cb2560eb5dfb6b445af547eccff8bff Mon Sep 17 00:00:00 2001
From: Myles English mylesengl...@gmail.com
Date: Tue, 13 Nov 2012 21:04:16 +
Subject: [PATCH] org-e-latex:  Tables get correct amount of vertical space

* contrib/lisp/org-e-latex.el: Replaced a set of \begin{center}
  and \end{center} environment markers with a \centering
  declaration.

Using both \begin{table} and \being{center} environments leads to double
the vertical space around the float, whereas \centering adds none.

TINYCHANGE
---
 contrib/lisp/org-e-latex.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/contrib/lisp/org-e-latex.el b/contrib/lisp/org-e-latex.el
index 165beb3..5635c6a 100644
--- a/contrib/lisp/org-e-latex.el
+++ b/contrib/lisp/org-e-latex.el
@@ -2302,14 +2302,13 @@ This function assumes TABLE has `org' as its `:type' 
attribute.
  (concat
   (format \\begin{%s}%s\n float-env placement)
   (if org-e-latex-table-caption-above caption )))
-   (when org-e-latex-tables-centered \\begin{center}\n)
+   (when org-e-latex-tables-centered \\centering\n)
(format \\begin{%s}%s{%s}\n%s\\end{%s}
table-env
(if width (format {%s} width) )
alignment
contents
table-env)
-   (when org-e-latex-tables-centered \n\\end{center})
(when float-env
  (concat (if org-e-latex-table-caption-above  caption)
  (format \n\\end{%s} float-env
-- 
1.8.0




[O] org-version.inc missing

2012-11-13 Thread davidam
Hi,

I'm trying make texi2pdf to orgguide.texi with some troubles. IMHO someone
has forgotten make git push to org-version.inc

$ git clone git://orgmode.org/org-mode.git

org-mode/doc$ texi2pdf orgguide.texi
This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)
 restricted \write18 enabled.
entering extended mode
(./orgguide.texi (./texinfo.tex Loading texinfo [version 2012-01-03.18]: pdf,
fonts, page headings, tables, conditionals, indexing, sectioning, toc,
environments, defuns, macros, cross references, insertions,
(/usr/share/texlive/texmf-dist/tex/generic/epsf/epsf.tex
This is `epsf.tex' v2.7.4 14 February 2011
) localization, formatting, and turning on texinfo input format.)
./orgguide.texi:6: I can't find file `org-version.inc'.
@temp -@input org-version.inc

@includezzz ...and @input #1 }@expandafter }@temp
  @popthisfilestack
l.6 @include org-version.inc

(Press Enter to retry, or Control-D to exit)
Please type another input file name: ^C./orgguide.texi:6: I can't find file
`org-version.inc'.
@temp -@input org-version.inc

@includezzz ...and @input #1 }@expandafter }@temp
  @popthisfilestack
l.6 @include org-version.inc

(Press Enter to retry, or Control-D to exit)
Please type another input file name:




Re: [O] org-version.inc missing

2012-11-13 Thread Bastien
Hi David,

davi...@es.gnu.org writes:

 I'm trying make texi2pdf to orgguide.texi with some troubles. IMHO someone
 has forgotten make git push to org-version.inc

org-version.inc is generated by the Makefile. 

What does `make pdf' do for you?

-- 
 Bastien



Re: [O] Blank line in table?

2012-11-13 Thread Bastien
Hi Johan,

Johan Ekh ekh.jo...@gmail.com writes:

 Is it possible to get blank lines in a table exported when creating a
 beamer presentation? It is only for creating a nice layout having
 different parts of the table separated with some vertical space. The
 exporter ignores my blank lines.

(setq org-export-table-remove-empty-lines nil)

HTH,

-- 
 Bastien



Re: [O] Blank line in table?

2012-11-13 Thread Johan Ekh
Thanks Bastien!

I will try it. I just noticed that putting a \ in one of the cells in the
blank row made the latex exporter export an empty line too.

BR / Johan


On Tue, Nov 13, 2012 at 10:46 PM, Bastien b...@altern.org wrote:

 Hi Johan,

 Johan Ekh ekh.jo...@gmail.com writes:

  Is it possible to get blank lines in a table exported when creating a
  beamer presentation? It is only for creating a nice layout having
  different parts of the table separated with some vertical space. The
  exporter ignores my blank lines.

 (setq org-export-table-remove-empty-lines nil)

 HTH,

 --
  Bastien



Re: [O] org-collector

2012-11-13 Thread Bastien
Ivanov Dmitry usr...@gmail.com writes:

 I have asked a question:

 http://stackoverflow.com/questions/13297691/emacs-org-mode-totals-table/13298288#13298288

 But nobody there knows the full answer. Any ideas?

Please restate the question so that we can understand it independantly
of stackoverflow -- this way we can keep consistent archives.

Thanks!

-- 
 Bastien



Re: [O] org-version.inc missing

2012-11-13 Thread David Arroyo Menéndez

Thanks!

make pdf is ok!

Bastien b...@altern.org writes:

 Hi David,

 davi...@es.gnu.org writes:

 I'm trying make texi2pdf to orgguide.texi with some troubles. IMHO someone
 has forgotten make git push to org-version.inc

 org-version.inc is generated by the Makefile. 

 What does `make pdf' do for you?



Re: [O] [PATCH] Time specifications: Allow specifying relative times

2012-11-13 Thread Bastien
Hi Ivan,

Ivan Vilata i Balaguer i...@selidor.net writes:

 However, I'm looking at the Git master branch and I see that the patch
 hasn't actually been applied [there][1] yet (and the [original
 thread][2] is from March).  Is there any problem with it?  Am I looking
 at the wrong repo?

 [1]: http://orgmode.org/cgit.cgi/org-mode.git/tree/lisp/org.el#n16359
 [2]: http://comments.gmane.org/gmane.emacs.orgmode/54101

I'm not sure what went wrong on your side but the patch
has been applied here:

http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=001bcb9645bf0a5ea72f09ae502a8410319473c0

HTH,

-- 
 Bastien



Re: [O] Removing the date in a subtree export using the new exporter

2012-11-13 Thread Bastien
Hi Alan,

Nicolas Goaziou n.goaz...@gmail.com writes:

 With another question: should the patch be sent to the list,
 or just to you (or any other process)?

 Please send any patch to the list.

Yes -- please do so.  Not only this is useful so that anyone
can review/test/comment the patch, but patches sent on the list
are stored on the patchwork:

  http://patchwork.newartisans.com/project/org-mode/list/

This helps not forgetting those we cannot process immediately.

Thanks for your contribution!

-- 
 Bastien



Re: [O] Extending org-koma-letter.el

2012-11-13 Thread Nicolas Goaziou
Hello,

Alan Schmitt alan.schm...@polytechnique.org writes:

 I'm resurrecting this old thread because I need to write a
 recommendation letter, which is all ready in org mode. I have put the
 org-koma-letter.el in the contrib/lisp directory, compiled it, and
 required it. I created the association as suggested, but when I export
 to latex, I get some strange results. It seems that the association is
 used (as indicated by the documentclass), but there is no
 \begin{letter} ... \end{letter} generated.

I cannot reproduce it. Also, I think Luis provided a better option for
letters with his Groff backend. You may want to try it.

Anyway, for the record, I'm posting an updated version[1] of the file,
compatible with latest Org (master branch). It may solve your problem.


Regards,

[1] I do not seriously maintain this file. It was a proof of concept.

-- 
Nicolas Goaziou


org-koma-letter.el
Description: KOMA Scrlttr2 backend


Re: [O] things I don't understand about tables

2012-11-13 Thread Jude DaShiell
On Tue, 13 Nov 2012, Nick Dokos wrote:

 Jude DaShiell jdash...@shellworld.net wrote:
 
  On Mon, 12 Nov 2012, Nick Dokos wrote:
  
   Jude DaShiell jdash...@shellworld.net wrote:
   
Why is it when I try putting a date in this table using the calendar I 
get 
no date entered when in a blank field and hear the message:
Before first headline at position 376 in buffer medlog.org

   
   How are you trying to insert the date?
   
   This error is usually produced because some function is trying to do an
   org-back-to-heading, i.e. the function does not expect the table to be
   at top level. In particular, C-c C-d (org-deadline) and C-c C-s 
   (org-schedule)
   *want* a headline and insert the scheduling information after the 
   headline,
   not in the table.
   
   OTOH, I tried entering a date into a table at top level with C-c .
   which is bound to org-time-stamp, and the date gets inserted with no error
   (and S-RET also works to increment the date in subsequent rows as
   Michael Brand mentioned)
   
   Org-mode version 7.9.2 (release_7.9.2-577-gb0a051 @ 
   /home/nick/elisp/org-mode/lisp/)
   
   Nick
   
   
  
  First I try with c-c c-d that didn't get me into the calendar.  Next I try 
  with c-c . and that got me into the calendar and on current date.  
  Unfortunately, c-b c-b failed to move me two days back from the current 
  date.  This is with emacs 24.x on debian.
  
 
 When org-read-date pops up a calendar, you are not in the calendar,
 you are in the minibuffer with the prompt. You can select previous dates
 by using something like -2 or you can use a set of calendar commands
 that are bound to keys in the minibuffer. In particular, you can move
 the cursor in the calendar to the previous day with S-Left. There are
 similar keys for moving forward/backward through days, weeks, months and
 3-month periods. All of these are documented in the manual:
 
(info (org)The date/time prompt)
 
 AFAICT, you cannot go into the calendar: you can switch buffers, but
 even so the calendar buffer does not seem to recognize any keys. Not
 entirely sure that I've got this right (and I certainly don't understand
 what's going on), but it seems to be a correct description of the
 behavior.
 
 Nick
 
 

---
jude jdash...@shellworld.net
Adobe fiend for failing to Flash

The minibuffer is read only when I try to type -2 and S-left generates 
some symbols like = and [ but does not change the highlighted date.





Re: [O] things I don't understand about tables

2012-11-13 Thread Jude DaShiell
On Tue, 13 Nov 2012, Jude DaShiell wrote:

 On Tue, 13 Nov 2012, Nick Dokos wrote:
 
  Jude DaShiell jdash...@shellworld.net wrote:
  
   On Mon, 12 Nov 2012, Nick Dokos wrote:
   
Jude DaShiell jdash...@shellworld.net wrote:

 Why is it when I try putting a date in this table using the calendar 
 I get 
 no date entered when in a blank field and hear the message:
 Before first headline at position 376 in buffer medlog.org
 

How are you trying to insert the date?

This error is usually produced because some function is trying to do an
org-back-to-heading, i.e. the function does not expect the table to be
at top level. In particular, C-c C-d (org-deadline) and C-c C-s 
(org-schedule)
*want* a headline and insert the scheduling information after the 
headline,
not in the table.

OTOH, I tried entering a date into a table at top level with C-c .
which is bound to org-time-stamp, and the date gets inserted with no 
error
(and S-RET also works to increment the date in subsequent rows as
Michael Brand mentioned)

Org-mode version 7.9.2 (release_7.9.2-577-gb0a051 @ 
/home/nick/elisp/org-mode/lisp/)

Nick


   
   First I try with c-c c-d that didn't get me into the calendar.  Next I 
   try 
   with c-c . and that got me into the calendar and on current date.  
   Unfortunately, c-b c-b failed to move me two days back from the current 
   date.  This is with emacs 24.x on debian.
   
  
  When org-read-date pops up a calendar, you are not in the calendar,
  you are in the minibuffer with the prompt. You can select previous dates
  by using something like -2 or you can use a set of calendar commands
  that are bound to keys in the minibuffer. In particular, you can move
  the cursor in the calendar to the previous day with S-Left. There are
  similar keys for moving forward/backward through days, weeks, months and
  3-month periods. All of these are documented in the manual:
  
 (info (org)The date/time prompt)
  
  AFAICT, you cannot go into the calendar: you can switch buffers, but
  even so the calendar buffer does not seem to recognize any keys. Not
  entirely sure that I've got this right (and I certainly don't understand
  what's going on), but it seems to be a correct description of the
  behavior.
  
  Nick
  
  
 
 ---
 jude jdash...@shellworld.net
 Adobe fiend for failing to Flash
 
 The minibuffer is read only when I try to type -2 and S-left generates 
 some symbols like = and [ but does not change the highlighted date.
 
 
 
 

---
jude jdash...@shellworld.net
Adobe fiend for failing to Flash

When I did c-c . and got current date with surrounding virtual calendar 
months, I noticed the cursor was positioned to the left of the = sign on 
line 25.  When I moved it to the right of the = sign I was able to key in 
-2 and then I hit enter and this time the date moved back two days!  
 Thanks much for the help provided.  I don't have to use Windows or excel 
 for this task now.



Re: [O] [PATCH] Time specifications: Allow specifying relative times

2012-11-13 Thread Ivan Vilata i Balaguer
Bastien (2012-11-13 23:02:40 +0100) wrote:

 Ivan Vilata i Balaguer i...@selidor.net writes:

 However, I'm looking at the Git master branch and I see that the
 patch hasn't actually been applied [there][1] yet (and the [original
 thread][2] is from March).  Is there any problem with it?  Am I
 looking at the wrong repo?

 [1]: http://orgmode.org/cgit.cgi/org-mode.git/tree/lisp/org.el#n16359
 [2]: http://comments.gmane.org/gmane.emacs.orgmode/54101

 I'm not sure what went wrong on your side but the patch
 has been applied here:

 http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=001bcb9645bf0a5ea72f09ae502a8410319473c0

Sure I can see the patch, but then how come the version of
``org-parse-time-string`` in the head of both the master and maint
branches is still the one from before the patch was applied?  It's quite
strange...

I apologise if I'm getting confused with git or the way the Org repo is
structured, but maybe the change was accidentally reverted later.

In any case, thanks for your answer!

-- 
Ivan Vilata i Balaguer -- https://elvil.net/




[O] org-e-beamer: Few queries

2012-11-13 Thread Yagnesh Raghava Yakkala

Hello,

I am trying to use new beamer exporter. I have few questions.

o) When trying to export emacs batch mode, it is asking for Output file:
(export script and setup file for batch process are attached)

#!/bin/sh
# batch export

emacs -q --batch -l setup.el \
-f org-e-beamer-export-to-latex org-beamer-template.org

pdflatex -interaction nonstopmode org-beamer-template.tex

# export.sh ends here


setup.el
Description: application/emacs-lisp


--8---cut here---start-8---
okhotsk19:~/git/org-beamer-template$ ./export.sh
Loading /home/yagnesh/.emacs.d/el-get/org-mode/lisp/org-loaddefs.el (source)...
Output file:
--8---cut here---end---8---

By grepping sources, I get this.
grep -nH -e Output file: *.el
org-export.el:2759:  Output file:  pub-dir nil nil nil

couldn't figure out why it is failing.

o) I used to fold headers for convenience by giving an ARCHIVE tag. its not
working in the new exporter.

o) how to make two column frame. (see attached example, in old exporter)

* setup :ARCHIVE:
#+TITLE: Ready made
#+AUTHOR: Yagnesh Raghava Yakkala
#+DATE: \today
#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [presentation]
#+OPTIONS: H:2
#+EXPORT_EXCLUDE_TAGS: noexport note

* Plain
** Place a figure
\centering
#+ATTR_LATEX: width=0.75\textwidth
#+CAPTION:
[[file:path/to/fig.jpg]]

* Two Columns
** one figures with bullets   :B_columns:
:PROPERTIES:
:BEAMER_env: columns
:END:
*** 0.4  :B_column:
:PROPERTIES:
:BEAMER_env: column
:END:
- bullet one
- bullet two
*** 0.6  :B_column:
:PROPERTIES:
:BEAMER_env: column
:END:
#+ATTR_LATEX: width=0.90\textwidth
#+CAPTION:
[[file:path/to/fig.jpg]]

* Third section:note:

Thanks.,
--
ఎందరో మహానుభావులు అందరికి వందనములు
YYR


Re: [O] org-e-beamer: Few queries

2012-11-13 Thread Suvayu Ali
On Wed, Nov 14, 2012 at 09:14:40AM +0900, Yagnesh Raghava Yakkala wrote:
 
 Hello,
 
 I am trying to use new beamer exporter. I have few questions.
 
 o) When trying to export emacs batch mode, it is asking for Output file:
 (export script and setup file for batch process are attached)
 

 #!/bin/sh
 # batch export
 
 emacs -q --batch -l setup.el \
 -f org-e-beamer-export-to-latex org-beamer-template.org
 

I believe you have the order wrong.  Emacs first has to open the file
before you can export it.  Try this:

  $ emacs -q --batch -l setup.el org-beamer-template.org \
  -f org-e-beamer-export-to-latex 

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] things I don't understand about tables

2012-11-13 Thread Nick Dokos
Jude DaShiell jdash...@shellworld.net wrote:

  The minibuffer is read only when I try to type -2 and S-left generates 
  some symbols like = and [ but does not change the highlighted date.
  
 
 When I did c-c . and got current date with surrounding virtual calendar 
 months, I noticed the cursor was positioned to the left of the = sign on 
 line 25.  When I moved it to the right of the = sign I was able to key in 
 -2 and then I hit enter and this time the date moved back two days!  
  Thanks much for the help provided.  I don't have to use Windows or excel 
  for this task now.
 

Is line 25 the minibuffer? And when you say the = sign, is that part of the
live display of what org thinks you mean? There is an ASCII arrow = followed
by the current candidate for a date (I believe that's an overlay: when I try
to move to the right, my cursor skips all the way to the right after the live
display).

I'm not sure what's going on in your case, but in my case, I press

 C-c . -2 RET

and it works: I don't have to move the cursor anywhere before I type the -2.

Nick




Re: [O] org-e-beamer: Few queries

2012-11-13 Thread Yagnesh Raghava Yakkala

Hello Suvayu,

On 11月 14 2012, Suvayu Ali fatkasuvayu+li...@gmail.com wrote:

 On Wed, Nov 14, 2012 at 09:14:40AM +0900, Yagnesh Raghava Yakkala wrote:
 
 Hello,
 
 I am trying to use new beamer exporter. I have few questions.
 
 o) When trying to export emacs batch mode, it is asking for Output file:
 (export script and setup file for batch process are attached)
 

 #!/bin/sh
 # batch export
 
 emacs -q --batch -l setup.el \
 -f org-e-beamer-export-to-latex org-beamer-template.org
 

 I believe you have the order wrong.  Emacs first has to open the file
 before you can export it.  Try this:

   $ emacs -q --batch -l setup.el org-beamer-template.org \
   -f org-e-beamer-export-to-latex 

Wow that works very well. I was blindly looking all over Elisp source.

Thanks a lot.,
-- 
ఎందరో మహానుభావులు అందరికి వందనములు
YYR



Re: [O] Bug? R: Org babel block execution *drastically* slower than in ESS session directly

2012-11-13 Thread Aaron Ecay
I just ran into this problem.  It is caused by the calls to
‘org-babel-import-elisp-from-file’ on lines 310 and 343 of ‘ob-R.el’
(for non-session and session code blocks respectively).  I determined
this by setting ‘debug-on-quit’ to t in Emacs, then hitting C-g when cpu
usage spiked, and examining the backtrace.

It seems like Emacs tries to read in the last value of the R command, to
print it in the minibuffer.  It gets bogged down doing so.  As a
stopgap, putting NULL as the last line of the source block fixes the
problem (the value “returned” by the block is just NULL).  I believe
setting “:results output” (as opposed to “value”) would also make the
bug disappear, since the output will be very small.  This is likely what
made cberry’s test differ from John’s.

I’m not sure what the right strategy would be for a fix.  Two ideas
would be:
1) adding a sanity check to o-b-import-elisp-from-file, which asks the
   user whether to really import very large files (or just ignores such
   files)
2) adding a new :results handling header arg “really-silent” (probably
   with a better name...) that discards the result entirely, not even
   printing it to the minibuffer.

-- 
Aaron Ecay



Re: [O] things I don't understand about tables

2012-11-13 Thread Jude DaShiell
On Tue, 13 Nov 2012, Nick Dokos wrote:

 Jude DaShiell jdash...@shellworld.net wrote:
 
   The minibuffer is read only when I try to type -2 and S-left generates 
   some symbols like = and [ but does not change the highlighted date.
   
  
  When I did c-c . and got current date with surrounding virtual calendar 
  months, I noticed the cursor was positioned to the left of the = sign on 
  line 25.  When I moved it to the right of the = sign I was able to key in 
  -2 and then I hit enter and this time the date moved back two days!  
   Thanks much for the help provided.  I don't have to use Windows or excel 
   for this task now.
  
 
 Is line 25 the minibuffer? And when you say the = sign, is that part of the
 live display of what org thinks you mean? There is an ASCII arrow = 
 followed
 by the current candidate for a date (I believe that's an overlay: when I try
 to move to the right, my cursor skips all the way to the right after the live
 display).
 
 I'm not sure what's going on in your case, but in my case, I press
 
  C-c . -2 RET
 
 and it works: I don't have to move the cursor anywhere before I type the -2.
 
 Nick
 
 
 

---
jude jdash...@shellworld.net
Adobe fiend for failing to Flash

There is a  sign followed by an = sign and I ended up moving to the right 
of the = sign and then was able to key things in.  I think what runs on 
this system is emacs in non-graphical mode.





Re: [O] things I don't understand about tables

2012-11-13 Thread Nick Dokos
Jude DaShiell jdash...@shellworld.net wrote:


 There is a  sign followed by an = sign and I ended up moving to the right 
 of the = sign and then was able to key things in.  I think what runs on 
 this system is emacs in non-graphical mode.
 

The  sign follows the = sign (reading from left to right): it's
supposed to be an ASCII arrow (actually an implication sign: = ).

I tried emacs -nw in an xterm and emacs on the console. In all cases

C-c . -2 RET

works for me with no mucking around with the cursor.

Nick



Re: [O] Bug? R: Org babel block execution *drastically* slower than in ESS session directly

2012-11-13 Thread John Hendy
On Tue, Nov 13, 2012 at 9:27 PM, Aaron Ecay aarone...@gmail.com wrote:

 I just ran into this problem.  It is caused by the calls to
 ‘org-babel-import-elisp-from-file’ on lines 310 and 343 of ‘ob-R.el’
 (for non-session and session code blocks respectively).  I determined
 this by setting ‘debug-on-quit’ to t in Emacs, then hitting C-g when cpu
 usage spiked, and examining the backtrace.


Yes! I'm not crazy! I'm not very familiar with the debug options in emacs
and had a heck of a time setting it up right the last time. Thanks so much
for checking this out.


 It seems like Emacs tries to read in the last value of the R command, to
 print it in the minibuffer.  It gets bogged down doing so.  As a
 stopgap, putting NULL as the last line of the source block fixes the
 problem (the value “returned” by the block is just NULL).  I believe
 setting “:results output” (as opposed to “value”) would also make the
 bug disappear, since the output will be very small.  This is likely what
 made cberry’s test differ from John’s.


Crazy. I really wondered if it had something to do with trying to spit out
the results into the minibuffer. Why is that behavior included?


 I’m not sure what the right strategy would be for a fix.  Two ideas
 would be:
 1) adding a sanity check to o-b-import-elisp-from-file, which asks the
user whether to really import very large files (or just ignores such
files)


Are you sure it's only on file import? I was generating some large output
when I first experienced this. It was only to avoid running that code that
I wrote it to file once and decided to just read it once per session
afterward (thinking reading would be faster than generating the input on
demand). I was generating a grid of interactions with something akin to:

#+begin_src R
dat - expand.grid(var1 = seq(0, 4, by = 200), var2 = seq(0, 4, by
= 200))
#+end_src

I can check this tomorrow if you'd like, but I remember it lagging as it
tried to print all of that into the minibuffer.


 2) adding a new :results handling header arg “really-silent” (probably
with a better name...) that discards the result entirely, not even
printing it to the minibuffer.


I like this, in addition to changing the minibuffer output as it is. It
would be fantastic to have the minibuffer say more than it does already
(something akin to Block execution complete). I have to change to the R
buffer to see if there were any errors. I like how the LaTeX exporter tells
you if PDF export failed. It'd be nice to see something like (in addition
to no results in the minibuffer), Block execution complete but with
errors.

Thanks again, and I'm glad you were able to track this down.


John


 --
 Aaron Ecay



Re: [O] Erroneous No such file or directory with babel and remote dir

2012-11-13 Thread Nick Dokos
Loris Bennett loris.benn...@fu-berlin.de wrote:

 Achim Gratz strom...@nexgo.de writes:
 
  Loris Bennett writes:
  OK, I must have goofed.  What I did after starting the bisection was
 
  - run 'make autoload'
  - open test file in emacs with minimal .emacs
  - test
  - end emacs
  - mark bisection good or bad
 
  I then repeated this for the next commit.
 
  This would be the correct thing to do, yes.
 
  Is something missing here, or did I just incorrectly mark a commit?
 
  I really don't know, I'm just guessing… :-)
 
  It may be more informative if you traced the invocation of the remote
  execution in both a failing and a working version in the debugger and
  look for any differences as the arguments are cobbled together.  Once
  you find where an how these diverge it would be much easier to find the
  code that is responsible for it (if it wasn't glaringly obvious from the
  trace already).
 
 
  Regards,
  Achim.
 
 So just as a reminder:
 
 Back in the days of release_7.01h, the following used to work:
 
 ,--
 | #+begin_src sh :dir /loris@othercomputer:
 | hostname
 | #+end_src
 `--
 
 Currently it produces the error:
 
 ,---
 | apply: Wrong type argument: number-or-marker-p, 
 `---
 
 I have had another go at bisecting this problem and came up with this:
 
 ,-
 | 9c878a8290c071fbe5e97bc33c300ef2f07d6153 is the first bad commit
 | commit 9c878a8290c071fbe5e97bc33c300ef2f07d6153
 | Author: Dan Davison davi...@stats.ox.ac.uk
 | Date:   Mon Aug 30 09:34:05 2010 -0700
 | 
 | babel: Fix temporary file processing in the remote execution case.
 | 
 | * ob.el (org-babel-temp-file): Don't use babel temporary
 | directory in remote case; use make-temp-file with remote file
 | name so that temp file is guaranteed not to exist previously
 | on remote machine.
 | (org-babel-tramp-localname): New function to return local name
 | portion of possibly remote file specification
 | 
 | * ob-R.el (org-babel-R-evaluate-external-process): Respond to
 | changes in `org-babel-temp-file'; pass local file name to
 | remote R process.
 | (org-babel-R-evaluate-session) Respond to
 | changes in `org-babel-temp-file'; pass local file name to
 | remote R process.
 | 
 | :04 04 b31e072cf6b2951e95b7956d907303e7a04a8cfd 
 5f794ada52cceb0614fe7962a399f7e549759003 M  lisp
 `-
 
 Does that help anyone any further?
 

I don't think so: afaict, both 7.01h (which did not contain this patch)
and 7.02 (which did) do the right thing (at least with your simple
script above). Something else broke it.

[I've been wrong about these things before so before Achim asks, I
did

  git tag --contains 9c878a8290c071fbe5e97bc33c300ef2f07d6153

and used its output as a basis of the above statement. I think (hope?)
it's correct.]

 Loris
 
 PS: I am amazed there aren't any more peasants like myself with torches
 and pitchforks beating on the gates of Castle Org about this - remote
 execution is/was such great feature!
 

Agreed, but Dan Davison (the principal contributor of the remoting code)
is gone from Castle Org (as you put it), Eric S. is busy, and nobody
else has stepped up to the plate. I've made fitful attempts to debug it,
but have had no success: I've never looked at the code in detail and I
don't have much time either.

So how about becoming a resident of Castle Org rather than beating on
the gates? There's glory galore if you fix it - and you get to scratch
your itch too :-)

Nick




Re: [O] Erroneous No such file or directory with babel and remote dir

2012-11-13 Thread Nick Dokos
Nick Dokos nicholas.do...@hp.com wrote:

  Back in the days of release_7.01h, the following used to work:
  
  ,--
  | #+begin_src sh :dir /loris@othercomputer:
  | hostname
  | #+end_src
  `--
  
  Currently it produces the error:
  
  ,---
  | apply: Wrong type argument: number-or-marker-p, 
  `---
  

BTW, I get no error with the (more or less) current version of
org I'm using:

Org-mode version 7.9.2 (release_7.9.2-582-g6d099e @ 
/home/nick/elisp/org-mode/lisp/)

I just get the wrong answer: instead of evaluating on the remote, babel
evaluates it locallly.

  I have had another go at bisecting this problem and came up with this:
  
  ,-
  | 9c878a8290c071fbe5e97bc33c300ef2f07d6153 is the first bad commit
  | commit 9c878a8290c071fbe5e97bc33c300ef2f07d6153
  | Author: Dan Davison davi...@stats.ox.ac.uk
  | Date:   Mon Aug 30 09:34:05 2010 -0700
  | 
  | babel: Fix temporary file processing in the remote execution case.
  | 
  | * ob.el (org-babel-temp-file): Don't use babel temporary
  | directory in remote case; use make-temp-file with remote file
  | name so that temp file is guaranteed not to exist previously
  | on remote machine.
  | (org-babel-tramp-localname): New function to return local name
  | portion of possibly remote file specification
  | 
  | * ob-R.el (org-babel-R-evaluate-external-process): Respond to
  | changes in `org-babel-temp-file'; pass local file name to
  | remote R process.
  | (org-babel-R-evaluate-session) Respond to
  | changes in `org-babel-temp-file'; pass local file name to
  | remote R process.
  | 
  | :04 04 b31e072cf6b2951e95b7956d907303e7a04a8cfd 
  5f794ada52cceb0614fe7962a399f7e549759003 M  lisp
  `-
  
  Does that help anyone any further?
  
 
 I don't think so: afaict, both 7.01h (which did not contain this patch)
 and 7.02 (which did) do the right thing (at least with your simple
 script above). Something else broke it.
 

I checked successive versions from 7.01h onwards and found breakage
between release_7.8 and release_7.9. So I bisected and came up
with this as the bad commit:

,
| commit 5cb80c7e5b9bcae180b799d2a49c78d529e029f0
| Author: Eric Schulte eric.schu...@gmx.com
| Date:   Mon Mar 12 13:23:53 2012 -0400
| 
| apply :shebang and :padline to shell script execution
| 
| * lisp/ob-sh.el (org-babel-execute:sh): Pass all params to subroutine.
|   (org-babel-sh-evaluate): Apply :shebang and :padline to shell script
|   execution.
`

Reverting it caused a merge conflict that I didn't have the patience to
resolve.  But I made branches, one with this commit as its tip and one
with its predecessor:

git checkout -b foo 5cb80c7
git checkout -b bar de09874

Testing on foo gives me an error, testing on bar gives the correct
result.  So I'm pretty sure this commit introduced the problem. Eric has
applied a partial fix since then which gets rid of the error but still
gives the wrong answer (not Eric's fault: he followed my suggestion, but
I was treating the symptom, not the disease).

But I think this commit is the place that deserves more scrutiny.

HTH,
Nick



Re: [O] Bug? R: Org babel block execution *drastically* slower than in ESS session directly

2012-11-13 Thread Aaron Ecay
2012ko azaroak 13an, John Hendy-ek idatzi zuen:

[...]
 Crazy. I really wondered if it had something to do with trying to spit
 out the results into the minibuffer. Why is that behavior included?

“:results silent” just means “silent except for the minibuffer”; IDK
why.

 Are you sure it's only on file import? I was generating some large
 output when I first experienced this.

Yes, that’s what I meant (and didn’t explain well).  Org writes R’s
output to a file, and then imports it into Emacs (to print in the
minibuffer).  But it also does an expensive transformation before
printing it – whence the slowdown.

 I have to
 change to the R buffer to see if there were any errors.

I agree that this is sub-optimal.

I seem to remember that ob-R.el is unmaintained (or was at some point in
the past).  Once there is consensus on what a fix should look like, I
can attempt to produce a patch implementing it.  And I’ll take a crack
at error reporting in the minibuffer too.

-- 
Aaron Ecay



Re: [O] Erroneous No such file or directory with babel and remote dir

2012-11-13 Thread Loris Bennett
Nick Dokos nicholas.do...@hp.com writes:

 Loris Bennett loris.benn...@fu-berlin.de wrote:

 Achim Gratz strom...@nexgo.de writes:
 
  Loris Bennett writes:
  OK, I must have goofed.  What I did after starting the bisection was
 
  - run 'make autoload'
  - open test file in emacs with minimal .emacs
  - test
  - end emacs
  - mark bisection good or bad
 
  I then repeated this for the next commit.
 
  This would be the correct thing to do, yes.
 
  Is something missing here, or did I just incorrectly mark a commit?
 
  I really don't know, I'm just guessing… :-)
 
  It may be more informative if you traced the invocation of the remote
  execution in both a failing and a working version in the debugger and
  look for any differences as the arguments are cobbled together.  Once
  you find where an how these diverge it would be much easier to find the
  code that is responsible for it (if it wasn't glaringly obvious from the
  trace already).
 
 
  Regards,
  Achim.
 
 So just as a reminder:
 
 Back in the days of release_7.01h, the following used to work:
 
 ,--
 | #+begin_src sh :dir /loris@othercomputer:
 | hostname
 | #+end_src
 `--
 
 Currently it produces the error:
 
 ,---
 | apply: Wrong type argument: number-or-marker-p, 
 `---
 
 I have had another go at bisecting this problem and came up with this:
 
 ,-
 | 9c878a8290c071fbe5e97bc33c300ef2f07d6153 is the first bad commit
 | commit 9c878a8290c071fbe5e97bc33c300ef2f07d6153
 | Author: Dan Davison davi...@stats.ox.ac.uk
 | Date:   Mon Aug 30 09:34:05 2010 -0700
 | 
 | babel: Fix temporary file processing in the remote execution case.
 | 
 | * ob.el (org-babel-temp-file): Don't use babel temporary
 | directory in remote case; use make-temp-file with remote file
 | name so that temp file is guaranteed not to exist previously
 | on remote machine.
 | (org-babel-tramp-localname): New function to return local name
 | portion of possibly remote file specification
 | 
 | * ob-R.el (org-babel-R-evaluate-external-process): Respond to
 | changes in `org-babel-temp-file'; pass local file name to
 | remote R process.
 | (org-babel-R-evaluate-session) Respond to
 | changes in `org-babel-temp-file'; pass local file name to
 | remote R process.
 | 
 | :04 04 b31e072cf6b2951e95b7956d907303e7a04a8cfd 
 5f794ada52cceb0614fe7962a399f7e549759003 M  lisp
 `-
 
 Does that help anyone any further?
 

 I don't think so: afaict, both 7.01h (which did not contain this patch)
 and 7.02 (which did) do the right thing (at least with your simple
 script above). Something else broke it.

 [I've been wrong about these things before so before Achim asks, I
 did

   git tag --contains 9c878a8290c071fbe5e97bc33c300ef2f07d6153

 and used its output as a basis of the above statement. I think (hope?)
 it's correct.]

 Loris
 
 PS: I am amazed there aren't any more peasants like myself with torches
 and pitchforks beating on the gates of Castle Org about this - remote
 execution is/was such great feature!
 

 Agreed, but Dan Davison (the principal contributor of the remoting code)
 is gone from Castle Org (as you put it), Eric S. is busy, and nobody
 else has stepped up to the plate. I've made fitful attempts to debug it,
 but have had no success: I've never looked at the code in detail and I
 don't have much time either.

 So how about becoming a resident of Castle Org rather than beating on
 the gates? There's glory galore if you fix it - and you get to scratch
 your itch too :-)

OK, I don't have that much time either but, as my Lisp skills are pretty
rudimentary, I've often thought it might be a good idea to take on some
sort of lisp project, so I'll try to give it a go.

Cheers,

Loris

-- 
no sig is good sig







Re: [O] Erroneous No such file or directory with babel and remote dir

2012-11-13 Thread Loris Bennett
Nick Dokos nicholas.do...@hp.com writes:

 Nick Dokos nicholas.do...@hp.com wrote:

  Back in the days of release_7.01h, the following used to work:
  
  ,--
  | #+begin_src sh :dir /loris@othercomputer:
  | hostname
  | #+end_src
  `--
  
  Currently it produces the error:
  
  ,---
  | apply: Wrong type argument: number-or-marker-p, 
  `---
  

 BTW, I get no error with the (more or less) current version of
 org I'm using:

 Org-mode version 7.9.2 (release_7.9.2-582-g6d099e @ 
 /home/nick/elisp/org-mode/lisp/)

 I just get the wrong answer: instead of evaluating on the remote, babel
 evaluates it locallly.

I also get this using 7.9.2-78-gf48a8b-elpa and Emacs 24.2.50.1.

However, I then tested this on Emacs 23.1.1 with the following minimal
.emacs:

,-
| (add-to-list 'load-path ~/elisp/org-mode/lisp)
| (require 'org-install)
| 
| (org-babel-do-load-languages
|  'org-babel-load-languages
|  '((emacs-lisp . nil)
|(R . t)
|(sh . t)))
`-

and got:

,--
| OVERVIEW
| release_7.02
| Org-mode version 7.02 (release_7.02)
| Quit
| byte-code: Beginning of buffer [2 times]
| Loading tramp...done
| executing Sh code block...
| Wrote /tmp/tramp.6477nIt
| Tramp: Opening connection for loris@othercomputer using scp...
| Tramp: Waiting 60s for local shell to come up...
| Tramp: Sending command `ssh node003 -l loris  -q -e none  exit || exit'
| Tramp: Waiting for prompts from remote shell
| Tramp: Found remote shell prompt on `node003'
| Wrote /scp:loris@othercomputer:/tmp/tramp.64770Sz
| Wrote /tmp/tramp.6477N7U.6477AxO
| Wrote /tmp/scor6477a-m
| apply: Wrong type argument: number-or-marker-p, 
`--

So there seem to be two problems, namely

1. Wrong type argument: number-or-marker-p, , which only occurs in my
   minimal set-up post release_7.01h

2. No error, but local execution in the current version of Org.

So before I can get started looking at 2, I need to sort out 1

The way I am testing is 

,--
| git checkout release_7.02
| cd $HOME/elisp/org-mode  make clean
| cd $HOME/elisp/org-mode  make
| emacs -q -l /home/loris/.emacs_minimal /home/loris/tmp/test.org 
`--

Is there something wrong with this?

Cheers,

Loris


  I have had another go at bisecting this problem and came up with this:
  
  ,-
  | 9c878a8290c071fbe5e97bc33c300ef2f07d6153 is the first bad commit
  | commit 9c878a8290c071fbe5e97bc33c300ef2f07d6153
  | Author: Dan Davison davi...@stats.ox.ac.uk
  | Date:   Mon Aug 30 09:34:05 2010 -0700
  | 
  | babel: Fix temporary file processing in the remote execution case.
  | 
  | * ob.el (org-babel-temp-file): Don't use babel temporary
  | directory in remote case; use make-temp-file with remote file
  | name so that temp file is guaranteed not to exist previously
  | on remote machine.
  | (org-babel-tramp-localname): New function to return local name
  | portion of possibly remote file specification
  | 
  | * ob-R.el (org-babel-R-evaluate-external-process): Respond to
  | changes in `org-babel-temp-file'; pass local file name to
  | remote R process.
  | (org-babel-R-evaluate-session) Respond to
  | changes in `org-babel-temp-file'; pass local file name to
  | remote R process.
  | 
  | :04 04 b31e072cf6b2951e95b7956d907303e7a04a8cfd 
  5f794ada52cceb0614fe7962a399f7e549759003 M  lisp
  `-
  
  Does that help anyone any further?
  
 
 I don't think so: afaict, both 7.01h (which did not contain this patch)
 and 7.02 (which did) do the right thing (at least with your simple
 script above). Something else broke it.
 

 I checked successive versions from 7.01h onwards and found breakage
 between release_7.8 and release_7.9. So I bisected and came up
 with this as the bad commit:

 ,
 | commit 5cb80c7e5b9bcae180b799d2a49c78d529e029f0
 | Author: Eric Schulte eric.schu...@gmx.com
 | Date:   Mon Mar 12 13:23:53 2012 -0400
 | 
 | apply :shebang and :padline to shell script execution
 | 
 | * lisp/ob-sh.el (org-babel-execute:sh): Pass all params to subroutine.
 |   (org-babel-sh-evaluate): Apply :shebang and :padline to shell script
 |   execution.
 `

 Reverting it caused a merge conflict that I didn't have the