Re: [O] Mobileorg- Automatic pushing and pulling

2013-04-27 Thread Yagnesh Raghava Yakkala

Hello Thomas,

On Apr 28 2013, t...@tsdye.com (Thomas S. Dye) wrote:

> Aloha Feng Shu,
>
> Hmm. The links to an mobileorg FAQ here
> http://mobileorg.ncogni.to/support/ and here
> https://github.com/richard/mobileorg/wiki/frequently-asked-questions are

I think https://github.com/ksexton/mobileorg/wiki/_pages is the updated
link although I don't see exact answer to your question.

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


Re: [O] M-RET slow

2013-04-27 Thread Bastien
Hi Samuel,

Samuel Wales  writes:

> If I run it using M-:, it is fast.  If I run it using a key binding,
> it is a bit slow (about 1s).

Then this is about `org-meta-return', not `org-insert-heading'.

What is the value of `org-catch-invisible-edits' in your config?

-- 
 Bastien



Re: [O] How to analyze clocking reports (e. g. with spreadsheet application)?

2013-04-27 Thread Martin Beck
 
 

Gesendet: Sonntag, 28. April 2013 um 01:27 Uhr
Von: "Richard Lawrence" 
An: emacs-orgmode@gnu.org
Betreff: Re: [O] How to analyze clocking reports (e. g. with spreadsheet application)?

Hi Martin,

Martin  writes:

> I'm using the org-mode clocking features (in org-mode 7.9.4) extensively
> to document how much time I spent with which task and when.
>
> I wonder how I can export the data (e. g. to MS Excel) for further analysis;
> * time consumed by different projects
> * interruptions and "jumping" from task to task
> * time consumed by tasks with a special tag
> etc.

Have you looked at this section in the manual? I don't use many of
these features myself, but I think Org itself can tell you many of these
things without exporting the data to a separate tool:

http://orgmode.org/org.html#The-clock-table

Hi Richard,

 

thanks for the pointer to the manual page. I had seen that, but for the beginning (as my structure of tasks, projects and tags is not very well "designed" yet,

I need some more sophisticated way to find out how my working time is spent.

(I'm not yet familiar with elisp and org-tables, so the easiest way for me would be to export all data to e. g. csv and then analyze them with MS Excel (e. g. a pivot table and maybe some self-made VBA "intelligence" to sort or group them...)

 

What is great in org-mode is the hierarchichal structure of tasks and sub-tasks. The drawback is however, that as long as all hierarchies of sub-tasks are listed in the clocking table, the time is counted manyfold in the "real value" and in all tasks which contain that value.

 

I wonder if anybody else already has put some thoughts in how to export and analyze those data..

 

Kind regards

 

Martin

 






Re: [O] org-kill-line

2013-04-27 Thread Jisang Yoo
If you are referring to org-kill-line, it is indeed odd that C-k in
org mode kills screen lines in visual line mode while C-k in text mode
always kills logical lines.

It seems temporarily turning off visual-line-mode while running the
macro involving org-kill-line is a workaround.

Or define a version of org-kill-line which only uses kill-line:

(defun my-org-kill-logical-line (&optional arg)
  "Kill line, to tags or end of line."
  (interactive "P")
  (cond
   ((or (not org-special-ctrl-k)
(bolp)
(not (org-at-heading-p)))
(if (and (get-char-property (min (point-max) (point-at-eol)) 'invisible)
 org-ctrl-k-protect-subtree)
(if (or (eq org-ctrl-k-protect-subtree 'error)
(not (y-or-n-p "Kill hidden subtree along with headline? ")))
(user-error "C-k aborted as it would kill a hidden subtree")))
(call-interactively
 'kill-line))
   ((looking-at (org-re ".*?\\S-\\([ \t]+\\(:[[:alnum:]_@#%:]+:\\)\\)[ \t]*$"))
(kill-region (point) (match-beginning 1))
(org-set-tags nil t))
   (t (kill-region (point) (point-at-eol)

That has just one line of difference from org-kill-line. You can then put

(define-key org-mode-map (kbd "C-S-k") 'my-org-kill-logical-line)

and use C-S-k in macros.



>
> I don't like the use of kill-visual-line in org-kill-mode as it creates
> non-predictable behavior when recording keyboard macros, as the display
> width will influence the result of running the macro. Does anyone have a
> suggestion of how to get around this? Right now I redefined kill-visual-line
> to kill-line, as I didn't want to touch the org-mode sources, but it seems
> to be an overkill (pun intended :-).



Re: [O] Mobileorg- Automatic pushing and pulling

2013-04-27 Thread Thomas S. Dye
Aloha Feng Shu,

Hmm. The links to an mobileorg FAQ here
http://mobileorg.ncogni.to/support/ and here
https://github.com/richard/mobileorg/wiki/frequently-asked-questions are
broken.

All the best,
Tom

Feng Shu  writes:

> Marvin Doyley  writes:
>
>> Hi there,
>>
>> Does anybody knows how to configure emacs to push and pull notes
>> automatically. 
>
> Please read org-mobile FAQ!
>
>>
>> Thanks
>> M

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



Re: [O] Mobileorg- Automatic pushing and pulling

2013-04-27 Thread Feng Shu
Marvin Doyley  writes:

> Hi there,
>
> Does anybody knows how to configure emacs to push and pull notes
> automatically. 

Please read org-mobile FAQ!

>
> Thanks
> M

-- 



Re: [O] How to analyze clocking reports (e. g. with spreadsheet application)?

2013-04-27 Thread Richard Lawrence
Hi Martin,

Martin  writes:

> I'm using the org-mode clocking features (in org-mode 7.9.4) extensively 
> to document how much time I spent with which task and when.
>
> I wonder how I can export the data (e. g. to MS Excel) for further analysis;
> * time consumed by different projects
> * interruptions and "jumping" from task to task
> * time consumed by tasks with a special tag
> etc.

Have you looked at this section in the manual?  I don't use many of
these features myself, but I think Org itself can tell you many of these
things without exporting the data to a separate tool:

http://orgmode.org/org.html#The-clock-table

-- 
Best,
Richard




[O] How to analyze clocking reports (e. g. with spreadsheet application)?

2013-04-27 Thread Martin
I'm using the org-mode clocking features (in org-mode 7.9.4) extensively 
to document how much time I spent with which task and when.

I wonder how I can export the data (e. g. to MS Excel) for further analysis;
* time consumed by different projects
* interruptions and "jumping" from task to task
* time consumed by tasks with a special tag
etc.

I searched the internet and this list, but I did not find any description 
from someone who has already 
done that (however I'm quite sure that I'm not the first one with this idea).

Any hints on how to do it or tutorials/reports from others are welcome.

Martin




Re: [O] Exporting large documents

2013-04-27 Thread Carsten Dominik
Hi Achim,

this is an interesting experiment, thank you!

I think it would also be interesting to use elp to see which
function are taking up the non-linear time.

- Carsten

On 27.4.2013, at 21:28, Achim Gratz  wrote:

> I've been looking at export runtimes for large documents with the new
> exporter.  The example I've used is the orgmanual.org from Tom.  I first
> exported each subtree standalone, then the document as a whole to
> texinfo.  The startup of Emacs takes about 1 s of user time and 1.5 s of
> wall time, these have not been subtracted in the table below.  The table
> shows the individual runtimes for each subtree export, their total and
> the last line is for the export of the full document.
> 
> |user |   sys |   wall |  util |
> |-+---++---|
> |   4.856 | 0.048 |   5.52 | 88.5% |
> |  13.748 | 0.160 |  15.04 | 92.4% |
> |  15.004 | 0.036 |  16.06 | 93.5% |
> |   8.464 | 0.068 |  10.37 | 82.1% |
> |   8.420 | 0.088 |  13.29 | 63.9% |
> |   5.568 | 0.052 |   8.03 | 69.8% |
> |   7.648 | 0.064 |   9.26 | 83.1% |
> |  12.020 | 0.056 |  14.16 | 85.2% |
> |   7.796 | 0.044 |  11.00 | 71.1% |
> |  27.352 | 0.068 |  33.71 | 81.3% |
> |   6.564 | 0.044 |   7.00 | 94.2% |
> |  17.124 | 0.108 |  19.17 | 89.8% |
> |   6.124 | 0.068 |   6.79 | 91.0% |
> |  10.632 | 0.068 |  11.73 | 91.1% |
> |  15.932 | 0.052 |  17.33 | 92.2% |
> |   6.836 | 0.080 |   7.61 | 90.8% |
> |   3.964 | 0.040 |   4.54 | 88.1% |
> |   5.076 | 0.160 |   6.01 | 87.0% |
> |   3.488 | 0.060 |   4.06 | 87.1% |
> |   3.532 | 0.056 |   4.14 | 86.4% |
> |   3.516 | 0.044 |   4.20 | 84.5% |
> |   3.576 | 0.064 |   4.17 | 87.0% |
> |   3.552 | 0.064 |   4.12 | 87.6% |
> |   6.528 | 0.176 |  10.73 | 62.3% |
> |-+---++---|
> | 207.320 | 1.768 | 248.04 | 84.3% |
> | 386.384 | 0.392 | 415.94 | 92.9% |
> 
> As you can see, the export gets slower (a lot) the larger the scope of
> the export gets.  I would hope that something can be done about it, I've
> earlier tried to profile the export (posted over in the Orgmanual
> thread), but I don't think the result was conclusive.
> 
> So as an additional experiment, I just used the preamble and
> Introduction of orgmanual.org and then doubled the copies of the
> Introduction subtress with each iteration.  I runtime was linear in
> size, you'd expect to see the runtimes about double on each iteration,
> too.
> 
> |user |   sys |   wall |  util | size |
> |-+---++---+--|
> |   2.500 | 0.064 |   3.14 | 81.5% |  18K |
> |   3.740 | 0.056 |   4.37 | 86.7% |  33K |
> |   6.224 | 0.112 |   6.98 | 90.6% |  63K |
> |  11.524 | 0.060 |  12.53 | 92.4% | 122K |
> |  22.860 | 0.084 |  24.35 | 94.2% | 241K |
> |  48.760 | 0.100 |  51.87 | 94.1% | 479K |
> | 110.804 | 0.124 | 120.64 | 91.9% | 955K |
> | 280.084 | 0.360 | 304.48 | 92.1% | 1.9M |
> | 868.712 | 0.768 | 930.24 | 93.4% | 3.8M |
> 
> Octave thinks that y = 1.725 x^2 + 1.025 x + 0.009 is a good fit to that
> data, so O(N^2) behaviour overall as suspected.
> 
> 
> Regards,
> Achim.
> -- 
> +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
> 
> Factory and User Sound Singles for Waldorf rackAttack:
> http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
> 
> 




[O] Exporting large documents

2013-04-27 Thread Achim Gratz
I've been looking at export runtimes for large documents with the new
exporter.  The example I've used is the orgmanual.org from Tom.  I first
exported each subtree standalone, then the document as a whole to
texinfo.  The startup of Emacs takes about 1 s of user time and 1.5 s of
wall time, these have not been subtracted in the table below.  The table
shows the individual runtimes for each subtree export, their total and
the last line is for the export of the full document.

|user |   sys |   wall |  util |
|-+---++---|
|   4.856 | 0.048 |   5.52 | 88.5% |
|  13.748 | 0.160 |  15.04 | 92.4% |
|  15.004 | 0.036 |  16.06 | 93.5% |
|   8.464 | 0.068 |  10.37 | 82.1% |
|   8.420 | 0.088 |  13.29 | 63.9% |
|   5.568 | 0.052 |   8.03 | 69.8% |
|   7.648 | 0.064 |   9.26 | 83.1% |
|  12.020 | 0.056 |  14.16 | 85.2% |
|   7.796 | 0.044 |  11.00 | 71.1% |
|  27.352 | 0.068 |  33.71 | 81.3% |
|   6.564 | 0.044 |   7.00 | 94.2% |
|  17.124 | 0.108 |  19.17 | 89.8% |
|   6.124 | 0.068 |   6.79 | 91.0% |
|  10.632 | 0.068 |  11.73 | 91.1% |
|  15.932 | 0.052 |  17.33 | 92.2% |
|   6.836 | 0.080 |   7.61 | 90.8% |
|   3.964 | 0.040 |   4.54 | 88.1% |
|   5.076 | 0.160 |   6.01 | 87.0% |
|   3.488 | 0.060 |   4.06 | 87.1% |
|   3.532 | 0.056 |   4.14 | 86.4% |
|   3.516 | 0.044 |   4.20 | 84.5% |
|   3.576 | 0.064 |   4.17 | 87.0% |
|   3.552 | 0.064 |   4.12 | 87.6% |
|   6.528 | 0.176 |  10.73 | 62.3% |
|-+---++---|
| 207.320 | 1.768 | 248.04 | 84.3% |
| 386.384 | 0.392 | 415.94 | 92.9% |

As you can see, the export gets slower (a lot) the larger the scope of
the export gets.  I would hope that something can be done about it, I've
earlier tried to profile the export (posted over in the Orgmanual
thread), but I don't think the result was conclusive.

So as an additional experiment, I just used the preamble and
Introduction of orgmanual.org and then doubled the copies of the
Introduction subtress with each iteration.  I runtime was linear in
size, you'd expect to see the runtimes about double on each iteration,
too.

|user |   sys |   wall |  util | size |
|-+---++---+--|
|   2.500 | 0.064 |   3.14 | 81.5% |  18K |
|   3.740 | 0.056 |   4.37 | 86.7% |  33K |
|   6.224 | 0.112 |   6.98 | 90.6% |  63K |
|  11.524 | 0.060 |  12.53 | 92.4% | 122K |
|  22.860 | 0.084 |  24.35 | 94.2% | 241K |
|  48.760 | 0.100 |  51.87 | 94.1% | 479K |
| 110.804 | 0.124 | 120.64 | 91.9% | 955K |
| 280.084 | 0.360 | 304.48 | 92.1% | 1.9M |
| 868.712 | 0.768 | 930.24 | 93.4% | 3.8M |

Octave thinks that y = 1.725 x^2 + 1.025 x + 0.009 is a good fit to that
data, so O(N^2) behaviour overall as suspected.


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

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




[O] Problem in org-capture-templates

2013-04-27 Thread Igor Sosa Mayor
[sorry for having send this emails several times... I made a mistake in
the subject...]

Hi,

i'm experiencing since some weeks a very strange bug (maybe). I have
this simple template:

(setq org-capture-templates
'(("e" "email (persönlich)" entry (file+headline "~/Documents/org/privat.org" 
"Emails")
"* TODO %^{Wem} schreiben
   SCHEDULED: %t
  :PROPERTIES:
  :Effort:   0:02
  :END:
%?")))

I get asked for the pesron I want write to, but the problem is that
I can not write a name with a blank space (say: `Barack Obama') because
I get an error `no match'.

This was working without problems for years. I have org 8.0.2 (but this
happened also with the last 7.9 version). Emacs: 24.3.1.

Thanks in advance

-- 
:: Igor Sosa Mayor :: joseleopoldo1...@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/  ::
:: jabberid: rogorido  ::::



[O] orgstruct minor mode working strangely

2013-04-27 Thread Igor Sosa Mayor
Hi,

Orgstruct minor mode is working with the mail-mode a little strange.

If I write a simple list where every item is smaller than a line, I can
use M-RET and a new item is inserted as expected.

But if the item goes over one line, the second line is not indented and
moreover M-RET does not work anymore.

org-version: 8.0.2; emacs: 24.3.1

thanks in advance

-- 
:: Igor Sosa Mayor :: joseleopoldo1...@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/  ::
:: jabberid: rogorido  ::::



[O] Mobileorg- Automatic pushing and pulling

2013-04-27 Thread Marvin Doyley
Hi there,

Does anybody knows how to configure emacs to push and pull notes
automatically.

Thanks
M


[O] [0] Problem in org-capture-templates

2013-04-27 Thread Igor Sosa Mayor
Hi,

i'm experiencing since some weeks a very strange bug (maybe). I have
this simple template:

(setq org-capture-templates
'(("e" "email (persönlich)" entry (file+headline "~/Documents/org/privat.org" 
"Emails")
"* TODO %^{Wem} schreiben
   SCHEDULED: %t
  :PROPERTIES:
  :Effort:   0:02
  :END:
%?")))

I get asked for the pesron I want write to, but the problem is that
I can not write a name with a blank space (say: `Barack Obama') because
I get an error `no match'.

This was working without problems for years. I have org 8.0.2 (but this
happened also with the last 7.9 version). Emacs: 24.3.1.

Thanks in advance

-- 
:: Igor Sosa Mayor :: joseleopoldo1...@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/  ::
:: jabberid: rogorido  ::::



Re: [O] [RFC] Org version of the Org manual

2013-04-27 Thread Achim Gratz
Hi Nicolas,

the change in org-macro.el to use a literal replacement string is still
missing in mainline Org.  Is there something wrong with that patch or
should I apply it?


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

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada




Re: [O] M-RET slow

2013-04-27 Thread Samuel Wales
Hi Nicolas,

On 4/26/13, Nicolas Goaziou  wrote:
> I pushed a speed-up for `org-insert-heading'. Is it speed acceptable
> now?

If I run it using M-:, it is fast.  If I run it using a key binding,
it is a bit slow (about 1s).

C-RET is fast using a key binding.

So perhaps there is some interaction with hooks?

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY can get it.



Re: [O] [babel] Specified colnames

2013-04-27 Thread Eric Schulte
>
> OK. That's true I've set:
>
> --8<---cut here---start->8---
>   ;; keep lower-case
>   (setq org-babel-results-keyword "results")
> --8<---cut here---end--->8---
>

If you like you could let-bind this around any future tests.

>
> since we've got nice keyword fontification -- as Carsten once said, he only
> choose uppercase keywords, a while ago, when it was much more difficult to
> clearly view the distinction between text, code and results (before the nice
> fontification we now have). Otherwise, he'd have chosen lower-case keywords.
>
> Because of that feature, which I completely had out of my mind, I'm thinking
> at another thing that could help reduce the size of the tests. Currently, we
> copy once the code block, and once the code block + its results.
>
> Maybe we could have a function to locate (via a regexp for
> #+results/#+RESULTS) the results, and only check (for strict or loose
> equality [1]) on the results.
>
> So, something along those lines:
>
> --8<---cut here---start->8---
> (should
>  (equal (results-part (org-babel-execute-src-block "code block only"))
> "results only"))
> --8<---cut here---end--->8---
>
> No duplication of the input...
>
> Does this make sense?
>

Yes, that would be an improvement, see the other tests in that file for
examples of similar functionality.

>
>> In the future more flexible tests (such as regular expression searches)
>> rather than strict equality should be preferable.
>>
>> Thanks for contributing this test!
>
> My pleasure.
>
> Best regards,
>   Seb
>

Cheers,

>
> [1] Regexp match

-- 
Eric Schulte
http://cs.unm.edu/~eschulte



Re: [O] [babel] Specified colnames

2013-04-27 Thread Sebastien Vauban
Eric,

Eric Schulte wrote:
>> Here the patch you asked for.
>
> I've applied this patch.

Thanks a lot for reviewing my test, and fixing it!

> Please review the changes I had to make for it to work correctly. Your
> version wasn't working because when org-babel-execute-src-block was called
> the point was not inside of the code block.

Isn't there something to fix, in order to avoid an uncontrolled error to be
generated, such as the one I had?

> My changes search forward in the text to place the point at the beginning of
> the code block before executing.

OK!

> I also had to uppercase RESULTS for the string equality to return true.

OK. That's true I've set:

--8<---cut here---start->8---
  ;; keep lower-case
  (setq org-babel-results-keyword "results")
--8<---cut here---end--->8---

since we've got nice keyword fontification -- as Carsten once said, he only
choose uppercase keywords, a while ago, when it was much more difficult to
clearly view the distinction between text, code and results (before the nice
fontification we now have). Otherwise, he'd have chosen lower-case keywords.

Because of that feature, which I completely had out of my mind, I'm thinking
at another thing that could help reduce the size of the tests. Currently, we
copy once the code block, and once the code block + its results.

Maybe we could have a function to locate (via a regexp for
#+results/#+RESULTS) the results, and only check (for strict or loose
equality [1]) on the results.

So, something along those lines:

--8<---cut here---start->8---
(should
 (equal (results-part (org-babel-execute-src-block "code block only"))
"results only"))
--8<---cut here---end--->8---

No duplication of the input...

Does this make sense?

> In the future more flexible tests (such as regular expression searches)
> rather than strict equality should be preferable.
>
> Thanks for contributing this test!

My pleasure.

Best regards,
  Seb

[1] Regexp match

-- 
Sebastien Vauban




Re: [O] worg-new-exporter successful publish locally

2013-04-27 Thread Achim Gratz
Jay Kerns writes:
> The new Worg branch publishes for me without error under Org-mode
> version 8.0.1 (release_8.0.1-24-g92f372).  I updated the existing
> emacs.el (underlying Worg, IIUC) to the Org 8.0 exporting/publishing
> syntax. You can see the latest draft in
>
> worgtest-init.el
>
> which lives in the top-level directory.

Great, thank you.

I've just pushed a change that removes the hardcoded pathnames in this
file and replaces them with three variables.  Set these variables either
directly on the command line or in a local init file (name it whatever
you like and don't push it to Worg) like this:

--8<---cut here---start->8---
;; worgtest-local-init.el
;;
;; all paths must end with a slash
(setq worg-base "/path/to/Worg/"
  worg-htmlroot "/path/to/htmlroot/"
  worg-add-load-path (list "/path/to/auctex-11.86/"
   "/path/to/htmlize-1.39/"
   "/path/to/org/"))
--8<---cut here---end--->8---

emacs -batch -Q -l worgtest-local-init.el -l worgtest-init.el -f publish-worg

I've also deactivated vc during export (makes it about half a minute
faster) and moved the require for org before the defcustoms stuff,
otherwise I'd get the error

Symbol's function definition is void: org-get-file-contents

This exports OK with Emacs 24.3, freshly compiled today.


Worg: the "Invalid time specification" error is back.  I can push, but
nothing gets published at the moment.


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] [babel] Specified colnames

2013-04-27 Thread Eric Schulte
>
> Here the patch you asked for.
>
> Best regards,
>   Seb
>

I've applied this patch.  Please review the changes I had to make for it
to work correctly.  Your version wasn't working because when
org-babel-execute-src-block was called the point was not inside of the
code block.  My changes search forward in the text to place the point at
the beginning of the code block before executing.

I also had to uppercase RESULTS for the string equality to return true.
In the future more flexible tests (such as regular expression searches)
rather than strict equality should be preferable.

Thanks for contributing this test!

>
> From aa7230ff485df5d9775429b53487aefcc7cd911d Mon Sep 17 00:00:00 2001
> From: Sebastien Vauban 
> Date: Thu, 25 Apr 2013 15:24:58 +0200
> Subject: [PATCH] Test support of explicitly specified colnames
>
> * test-ob.el (test-ob/specific-colnames): Add test checking that given column
> names are well present in the output table.
>
> ---
>  testing/lisp/test-ob.el |   32 
>  1 files changed, 32 insertions(+), 0 deletions(-)
>
> diff --git a/testing/lisp/test-ob.el b/testing/lisp/test-ob.el
> index bbbfbc4..d51e183 100644
> --- a/testing/lisp/test-ob.el
> +++ b/testing/lisp/test-ob.el
> @@ -1106,6 +1106,38 @@ Paragraph"
>  (widen)
>  (should (should (re-search-forward "^: 3" nil t)
>  
> +(ert-deftest test-ob/specific-colnames ()
> +  "Test passing specific column names."
> +  (should
> +   (equal "#+name: input-table
> +| id | var1 |
> +|+--|
> +|  1 | bar  |
> +|  2 | baz  |
> +
> +#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)
> +echo \"$data\"
> +#+end_src
> +
> +#+results:
> +| Rev | Author |
> +|-+|
> +|   1 | bar|
> +|   2 | baz|
> +
> +"
> +   (org-test-with-temp-text "#+name: input-table
> +| id | var1 |
> +|+--|
> +|  1 | bar  |
> +|  2 | baz  |
> +
> +#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)
> +echo \"$data\"
> +#+end_src
> +"
> +(org-babel-execute-src-block)
> +(buffer-string)
>  
>  (provide 'test-ob)
>  
> -- 
> 1.7.9

-- 
Eric Schulte
http://cs.unm.edu/~eschulte



Re: [O] [BUG] New exporter exports TOC twice

2013-04-27 Thread Sebastien Vauban
Hi Carsten,

Carsten Dominik wrote:
> On 27.4.2013, at 10:52, Sebastien Vauban  wrote:
>> Carsten Dominik wrote:
>>> On 24.4.2013, at 13:50, Nicolas Goaziou  wrote:
 Thorsten Jolitz  writes:
 
> Exporting a Worg file with this header (#+TOC: headlines 2) 
> exports the TOC twice in HTML export and ASCII export. 
 
 If you don't specify a toc item in the OPTIONS line, Org will use the
 value of `org-export-with-toc', which is non-nil by default.
 
 So, your example is equivalent to:
 
 #+OPTIONS: toc:t
 #+TOC: headline 2
 
 Hence you get two tables of contents.
>>> 
>>> Hmm, I understand the reasoning here - but my feeling says that
>>> the presence of one or more #+TOC lines in a file should probably
>>> overrule both #+OPTIONS: toc: and the content of org-export-with-toc.
>>> So in that case, your would then only get one TOC, at the
>>> location of that line.
>>> 
>>> What do you think?  Are there good reasons for not doing it
>>> as I propose?
>> 
>> Maybe what I'll say is stupid, but, in LaTeX, there's the minitoc package for
>> having a big TOC at the beginning of the document (default) + TOC per 
>> chapter,
>> which can be limited to less (or more) sublevels.
>> 
>> Maybe allowing to insert extra TOC here and there would allow one to make
>> something like that available to other backends?  Though, as of today, I 
>> don't
>> think the TOC is limitable per org-level-1 headline...
>
> I am not saying multiple tocs should not be allowed.  I am all for that.
> However, I think that by inserting a #+TOC line, the user indicates
> desire for local control.  Therefore, org-export-with-toc should be ignored,
> and, by extension, also #+OPTIONS: toc (because this is really a local way
> to set org-export-with-toc).

OK, that's another point of view. I clearly have no objection for that
behavior.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] worg-new-exporter successful publish locally

2013-04-27 Thread Jay Kerns
HI Thorsten,

On Sat, Apr 27, 2013 at 4:40 AM, Thorsten Jolitz  wrote:
> Jay Kerns  writes:
>
> Hi Jay,
>
> I started this page, so I kind of 'own' it, but the local variable has
> been added later, not by me, probably by Eric Schulte, because he is
> mentioned as second author.
>
> ,---
> | - org-contrib/babel/header-args.org
> |   - Error: local variables in header-args.org and header-args.html
> | - eval: org-babel-default-header-args:Python
> | - if I hit "n" then Emacs hangs until C-g
> | - Status: moved to FIXME
> `---
>
> --
> cheers,
> Thorsten

Sounds good - thanks for the background info. IIRC I didn't modify
that file because I really didn't know anything else to do other than
delete the bit at the bottom which seemed to be causing the trouble,
so instead, it appeared better to ask people more competent than me to
take a look at it.  Certainly Eric (CC:'ed now) would be one of those,
among many, many others.  :-)

-- 
Jay



Re: [O] [PATCH] fix appointment warn time

2013-04-27 Thread Bastien
Ivan Kanis  writes:

> April, 26 at 19:01 Bastien wrote:
>
>>> The patch adds a function that goes at the beginning of the header to
>>> get the property. As a bonus it turns the string into a number.
>>>
>>> Please let me know if the patch is accepted or needs improvement.
>>
>> Can you try the attached patch instead?
>
> It works great and it looks less expensive. Thank you!

Great -- thanks for testing this.

Still, I need to really understand what real problem it fixes...
is it because some of your functions needs to check the property
or is it during regular use of Org?  Sorry if I missed this in
one of your previous message... and thanks in advance!

-- 
 Bastien



Re: [O] Exporting caption with raw results from inline source blocks

2013-04-27 Thread Andreas Leha
"Sebastien Vauban" 
writes:

> Hi Eric,
>
> Eric Schulte wrote:
>> Nicolas Goaziou  writes:
>>> Eric Schulte  writes:
>>>
 I'm loath to add /another/ results keyword, but perhaps it would be nice
 to be able to specify that you want the results processed (e.g,
 stripping the newline), but you don't want them to be wrapped as an
 example.  An alternate approach which may be preferable would be to
 expose a defcustom along the lines of org-babel-inline-result-wrapper,
 which could be used by org-babel-examplize-region instead of "=%s=".
>>>
>>> What about always removing trailing newline characters in _inline_ src
>>> blocks results?
>>
>> That is certainly an option.  It could be argued that the point of "raw"
>> is to not change the output at all
>
> That was one point I tried to attract attention onto: since short, we already
> modify the "raw" output (by "cycling" on tables-alike results). We don't have
> anymore a real "raw" results which would completely stay untouched.
>

I'd also vote for not modifying raw results -- at least in the inline
case.

In the case of the added linebreak, I think it is easy to add from
inside the code block it if I want it, but hard to remove.  For me it
seems really weird that I have to post-process a 'raw' result to get a
'really raw' result.
Also the added newline is inconsistent with the non-raw result, which
gets exported as \texttt{11} and not \texttt{11\\}.
And the added '\n' breaks (at least) inline results in captions.
Does not adding the '\n' break anything at all?


Having said all that, I am also ok with the org-babel-inline-result-wrap
defcustom.  Thanks for implementing that, Eric.

Regards,
Andreas




Re: [O] [BUG] New exporter exports TOC twice

2013-04-27 Thread Carsten Dominik

On 27.4.2013, at 10:52, Sebastien Vauban  wrote:

> Hi Carsten,
> 
> Carsten Dominik wrote:
>> On 24.4.2013, at 13:50, Nicolas Goaziou  wrote:
>>> Thorsten Jolitz  writes:
>>> 
 Exporting a Worg file with this header (#+TOC: headlines 2) 
 exports the TOC twice in HTML export and ASCII export. 
>>> 
>>> If you don't specify a toc item in the OPTIONS line, Org will use the
>>> value of `org-export-with-toc', which is non-nil by default.
>>> 
>>> So, your example is equivalent to:
>>> 
>>> #+OPTIONS: toc:t
>>> #+TOC: headline 2
>>> 
>>> Hence you get two tables of contents.
>> 
>> Hmm, I understand the reasoning here - but my feeling says that
>> the presence of one or more #+TOC lines in a file should probably
>> overrule both #+OPTIONS: toc: and the content of org-export-with-toc.
>> So in that case, your would then only get one TOC, at the
>> location of that line.
>> 
>> What do you think?  Are there good reasons for not doing it
>> as I propose?
> 
> Maybe what I'll say is stupid, but, in LaTeX, there's the minitoc package for
> having a big TOC at the beginning of the document (default) + TOC per chapter,
> which can be limited to less (or more) sublevels.
> 
> Maybe allowing to insert extra TOC here and there would allow one to make
> something like that available to other backends?  Though, as of today, I don't
> think the TOC is limitable per org-level-1 headline...
> 

Hi Sebastien,

I am not saying multiple tocs should not be allowed.  I am all for that.
However, I think that by inserting a #+TOC line, the user indicates
desire for local control.  Therefore, org-export-with-toc should be ignored,
and, by extension, also #+OPTIONS: toc (because this is really a local way
to set org-export-with-toc).

- Carsten




Re: [O] bug in latex export?

2013-04-27 Thread Suvayu Ali
On Sat, Apr 27, 2013 at 12:05:37PM +0200, renato wrote:
> Hi, don't know if this has allready been reported, but I just upgraded
> to 8.0 and I stumped into this...
> 
> this in the .org file
> 
> \begin{theoremwithname}[hei]
> theorem
> \begin{align*}
> 2+2
> \end{align*}
> \end{theoremwithname}

I think only basic macros are supported.  You could just wrap the above
in a #+begin_latex..#+end_latex block.

-- 
Suvayu

Open source is the future. It sets us free.



[O] bug in latex export?

2013-04-27 Thread renato
Hi, don't know if this has allready been reported, but I just upgraded
to 8.0 and I stumped into this...

this in the .org file

\begin{theoremwithname}[hei]
theorem
\begin{align*}
2+2
\end{align*}
\end{theoremwithname}

gets latex-exported to this (note that after \endtheoremwithname
everything is replicated with escape characters):

\begin{theoremwithname}[hei]
theorem
\begin{align*}
2+2
\end{align*}
\end{theoremwithname}$\backslash$begin\{align*\}
2+2
$\backslash$end\{align*\}
$\backslash$end\{theoremwithname\}
\begin{align*}
2+2
\end{align*}
\end{theoremwithname}


which obviously brings to uncompilable latex code. BTW in the preamble
I have this that defines the environment theoremwithname:

#+LATEX_HEADER: 
\newtheoremstyle{withname}{}{}{\itshape}{}{\bfseries}{.}{.5em}{\thmname{#3} 
\thmnumber{#2}} 
#+LATEX_HEADER: \theoremstyle{withname}
#+LATEX_HEADER: \newtheorem{theoremwithname}[equation]{Teorema}


cheers,
renato


signature.asc
Description: PGP signature


[O] [PATCH] Re: Can't export LaTeX source code blocks

2013-04-27 Thread Sebastien Vauban
"Sebastien Vauban" wrote:
> Thomas S. Dye wrote:
>> "Sebastien Vauban" writes:
>>
> The code block is NEVER exported. I don't understand why?

 I'm not sure either.
>>
>> I took a quick look at ob-latex.el. The code there sets `:exports
>> results' and then, IIUC, goes on its way without checking if :exports
>> has been set in the buffer.
>>
>> It looks to me like ob-latex.el would need to be revised.
>
> I don't have the impression that the error lies in `ob-latex' as the other
> `ob-LANG' files don't either make any special check -- while all graphics-only
> languages do, as well, have the default of "results" for ":exports".
>
> I have the impression the problem is to search in `ob-core'
> (`org-babel-execute-src-block') or `ob-exp'... But that's not yet clear to me
> where that could be.

I think I found it. That was a priority order problem for implementing the
hierarchy of header arguments inheritage in `ob-core'.

Best regards,
  Seb

>From 3339c0f7d296fc68a206b0f69270da3a91025840 Mon Sep 17 00:00:00 2001
From: Sebastien Vauban 
Date: Sat, 27 Apr 2013 11:40:25 +0200
Subject: [PATCH 2/2] Fix priority order for inheriting header arguments

* ob-core.el (org-babel-parse-src-block-match): Fix order of list of header
arguments.

---
 lisp/ob-core.el |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 9baff0c..73dca8f 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -1,6 +1,6 @@
 ;;; ob-core.el --- working with code blocks in org-mode
 
-;; Copyright (C) 2009-2012  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2013  Free Software Foundation, Inc.
 
 ;; Authors: Eric Schulte
 ;; Dan Davison
@@ -1323,8 +1323,8 @@ may be specified in the properties of the current outline 
entry."
   (buffer-string)))
  (org-babel-merge-params
   org-babel-default-header-args
-   (org-babel-params-from-properties lang)
   (if (boundp lang-headers) (eval lang-headers) nil)
+   (org-babel-params-from-properties lang)
   (org-babel-parse-header-arguments
 (org-no-properties (or (match-string 4) ""
  switches
-- 
1.7.9

-- 
Sebastien Vauban




Re: [O] Can't export LaTeX source code blocks

2013-04-27 Thread Sebastien Vauban
Hello Thomas,

Thomas S. Dye wrote:
> "Sebastien Vauban" writes:
>
 The code block is NEVER exported. I don't understand why?
>>>
>>> I'm not sure either.
>>>
>>> This is not a problem from the exporter as `org-export-execute-babel-code'
>>> on your ECM makes the src block disappear.
>>
>> The only buggy behavior is the first one: the fact that the "code" block
>> disappears, as you say.
>
> I took a quick look at ob-latex.el. The code there sets `:exports
> results' and then, IIUC, goes on its way without checking if :exports
> has been set in the buffer.
>
> It looks to me like ob-latex.el would need to be revised.

I don't have the impression that the error lies in `ob-latex' as the other
`ob-LANG' files don't either make any special check -- while all graphics-only
languages do, as well, have the default of "results" for ":exports".

I have the impression the problem is to search in `ob-core'
(`org-babel-execute-src-block') or `ob-exp'... But that's not yet clear to me
where that could be.

FYI, I have collected extra information about the problem: it is the file-wide
property which is not taken into account (only in the case of the LaTeX code
blocks, though).

If we put the header argument ":exports both" on the code block itself, I get
the expected result...

--8<---cut here---start->8---
#+TITLE: ECM skeleton.org
#+PROPERTY: tangle skeleton.cls
#+PROPERTY: exports both

* ECM LaTeX KO

Code block:

#+name: ecm-code-block-1
#+begin_src latex
\DescribeMacro{\dummyMacro}
This macro does nothing.\index{doing nothing|usage}
#+end_src

Results block:

#+results: ecm-code-block-1
#+BEGIN_LaTeX
\DescribeMacro{\dummyMacro}
This macro does nothing.\index{doing nothing|usage}
#+END_LaTeX

* ECM LaTeX okay

#+name: ecm-code-block-2
#+begin_src latex :exports both
\DescribeMacro{\dummyMacro}
This macro does nothing.\index{doing nothing|usage}
#+end_src

Results block:

#+results: ecm-code-block-2
#+BEGIN_LaTeX
\DescribeMacro{\dummyMacro}
This macro does nothing.\index{doing nothing|usage}
#+END_LaTeX
--8<---cut here---end--->8---

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [BUG] New exporter exports TOC twice

2013-04-27 Thread Sebastien Vauban
Hi Carsten,

Carsten Dominik wrote:
> On 24.4.2013, at 13:50, Nicolas Goaziou  wrote:
>> Thorsten Jolitz  writes:
>> 
>>> Exporting a Worg file with this header (#+TOC: headlines 2) 
>>> exports the TOC twice in HTML export and ASCII export. 
>> 
>> If you don't specify a toc item in the OPTIONS line, Org will use the
>> value of `org-export-with-toc', which is non-nil by default.
>> 
>> So, your example is equivalent to:
>> 
>>  #+OPTIONS: toc:t
>>  #+TOC: headline 2
>> 
>> Hence you get two tables of contents.
>
> Hmm, I understand the reasoning here - but my feeling says that
> the presence of one or more #+TOC lines in a file should probably
> overrule both #+OPTIONS: toc: and the content of org-export-with-toc.
> So in that case, your would then only get one TOC, at the
> location of that line.
>
> What do you think?  Are there good reasons for not doing it
> as I propose?

Maybe what I'll say is stupid, but, in LaTeX, there's the minitoc package for
having a big TOC at the beginning of the document (default) + TOC per chapter,
which can be limited to less (or more) sublevels.

Maybe allowing to insert extra TOC here and there would allow one to make
something like that available to other backends?  Though, as of today, I don't
think the TOC is limitable per org-level-1 headline...

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [BUG] New exporter exports TOC twice

2013-04-27 Thread Carsten Dominik

On 24.4.2013, at 13:50, Nicolas Goaziou  wrote:

> Hello,
> 
> Thorsten Jolitz  writes:
> 
>> Exporting a Worg file with this header (#+TOC: headlines 2) 
>> 
>> ,-
>> | #+OPTIONS: H:3 num:nil \n:nil @:t ::t |:t ^:{} -:t f:t *:t TeX:t LaTeX:t
>> | skip:nil d:(HIDE) tags:not-in-toc
>> | #+TOC:headlines 2
>> | #+STARTUP:align fold nodlcheck hidestars oddeven lognotestate 
>> hideblocks
>> | #+SEQ_TODO:   TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@)
>> | #+TAGS:   Write(w) Update(u) Fix(f) Check(c) noexport(n)
>> | #+TITLE:  Header arguments and result types in Org Babel
>> | #+AUTHOR: Thorsten Jolitz, Eric Schulte
>> | #+EMAIL:  tj[at]data-driven[dot]de
>> | #+LANGUAGE:   en
>> | #+LINK_UP:index.php
>> | #+LINK_HOME:  http://orgmode.org/worg/
>> | #+EXPORT_EXCLUDE_TAGS: noexport
>> | 
>> | For a complete header argument reference see the Org-mode manual's page
>> | which lists all
>> | 
>> [[http://orgmode.org/manual/Specific-header-arguments.html][Specific-header-arguments]].
>> | This page holds ancillary notes and tricks which have not made it into
>> | the manual.
>> | 
>> | * Generally use =verbatim= when using =drawer=, =raw= or =org=
>> | We often want to add =verbatim= (which inhibits interpretation as a
>> | value, which can often result in a list or table result), when
>> | inserting results directly into the buffer using =drawer=, =raw= or
>> | =org= which don't do tabular interpretation. [...]
>> `-
>> 
>> exports the TOC twice in HTML export and ASCII export. 
> 
> If you don't specify a toc item in the OPTIONS line, Org will use the
> value of `org-export-with-toc', which is non-nil by default.
> 
> So, your example is equivalent to:
> 
>  #+OPTIONS: toc:t
>  #+TOC: headline 2
> 
> Hence you get two tables of contents.


Hmm, I understand the reasoning here - but my feeling says that
the presence of one or more #+TOC lines in a file should probably
overrule both #+OPTIONS: toc: and the content of org-export-with-toc.
So in that case, your would then only get one TOC, at the
location of that line.

What do you think?  Are there good reasons for not doing it
as I propose?

- Carsten


Re: [O] worg-new-exporter successful publish locally

2013-04-27 Thread Thorsten Jolitz
Jay Kerns  writes:

Hi Jay,

I started this page, so I kind of 'own' it, but the local variable has
been added later, not by me, probably by Eric Schulte, because he is
mentioned as second author.

,---
| - org-contrib/babel/header-args.org
|   - Error: local variables in header-args.org and header-args.html
| - eval: org-babel-default-header-args:Python
| - if I hit "n" then Emacs hangs until C-g
| - Status: moved to FIXME
`---

-- 
cheers,
Thorsten




Re: [O] worg-new-exporter successful publish locally

2013-04-27 Thread Carsten Dominik

On 27.4.2013, at 08:59, Bastien  wrote:

> Hi Jay,
> 
> Jay Kerns  writes:
> 
>> The new Worg branch publishes for me without error under Org-mode
>> version 8.0.1 (release_8.0.1-24-g92f372).
> 
> *Wow*!  That was super fast!  Thanks a lot for leading this project,
> quite an achievement.  I won't have time to test over the week-end but
> I hope a few people will, so that I can make the switch on monday when
> I have a good connection (not at home right now.)

Hi Jay,

I just want to second Bastien's amazement.  Thanks a lot for going through this!

- Carsten




Re: [O] Org-mode outside Org-mode

2013-04-27 Thread Thorsten Jolitz
Samuel Wales  writes:

Hi Samuel,

>> If you structure your Emacs Lisp files the 'outshine way', you can
>> convert them into complete Org files fast and easily using 'outorg.el'.

> With what I am talking about, you can:
>
>   - put your Org notes in your main Org agenda files exactly where you want 
> them
>   - efficiently use planning information to create daily/weekly agenda entries
>   - bounce to and from the exact location in your source code to the
> exact Org entry
>
> Therefore, the category of tools I suggested to you -- which consists
> of annotation-like mechanisms -- is a completely different way of
> tackling the problem of dealing with source code and Org
> simultaneously.
>
> Yet it is a way of dealing with them simultaneously, which is the
> reason I suggested putting them in your document also, if you felt
> like it.

I think I missed this mail. When you have a worked out system for such
a tool-chain, it would definitely be nice to describe it in the
'Org-mode outside Org-mode' tutorial on Worg. Maybe even giving the
whole thing a name like 'Source-file annotation with Org-mode' or so. 

Feel free to add a new item for this in the tutorial. When you don't
have write access to Worg, you could send it to me and I add it to the
article. 

-- 
cheers,
Thorsten




Re: [O] [PATCH] fix appointment warn time

2013-04-27 Thread Ivan Kanis
April, 26 at 19:01 Bastien wrote:

>> The patch adds a function that goes at the beginning of the header to
>> get the property. As a bonus it turns the string into a number.
>>
>> Please let me know if the patch is accepted or needs improvement.
>
> Can you try the attached patch instead?

It works great and it looks less expensive. Thank you!
-- 
Sand fleas eating the Internet cables.
-- BOFH excuse #59



Re: [O] How to save the state of Agenda buffer in Emacs?

2013-04-27 Thread Bastien
Hi Sergey,

Sergey Pashinin  writes:

> Each of us has his own commands set
> in "org-agenda-custom-commands" variable.  But how can I detect
> what commands were used to create the current state of Agenda
> buffer (looking only at this buffer, maybe any local varibales?).

You cannot directly access to the custom command itself, but

M-: (get-text-property (point) 'org-redo-cmd) RET

will give you the name of the internal agenda command used.
This property tells the `r' keybinding what to redo.

-- 
 Bastien



[O] How to save the state of Agenda buffer in Emacs?

2013-04-27 Thread Sergey Pashinin

Hello org-mode guys,

Each of us has his own commands set
in "org-agenda-custom-commands" variable.  But how can I detect
what commands were used to create the current state of Agenda
buffer (looking only at this buffer, maybe any local varibales?).

I want to save it and recreate later without dependence on
current ".emacs" configuration