Re: [O] exporting subtree moves point

2011-09-13 Thread Carsten Dominik

On 13.9.2011, at 11:00, Eric S Fraga wrote:

> Hello,
> 
> I often export just a sub-tree ("C-c C-e 1 p" say).  At the end of the
> export, my point has moved to the enclosing headline and mark is at the
> end of the contents of that sub-tree.  This is a little annoying in that
> I am often making small changes to see the effect on the final exported
> document, especially when playing around with tikz.  Therefore, I find
> myself having to move back manually to where I was before the export.
> 
> Is there an easy way to get back to where I was beyond setting a
> bookmark or register location manually?  Or is there a way to have org
> put me back to where I was (save-excursion of some sort maybe)?  


Hi Eric,

I have just pushed a fix for this issue.  The code to do this was already
there, but it did not work for the subtree restriction.

- Carsten

> 
> If I remember to set a mark myself, I can get back to there by C-x
> C-SPC.  Maybe I should just advise the export command?
> 
> Suggestions welcome!
> 
> Thanks,
> eric
> 
> -- 
> : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
> : using Org-mode version 7.7 (release_7.7.280.gdbf0)
> 




Re: [O] .emacs file in windows

2011-09-13 Thread Loris Bennett
Hi Bob,

Bob Qualls  writes:

> I would like to add the suggested "Activiation" code to the .emacs
> file but I can't figure out which one it is.  I downloaded the
> emacs-23.1-bin-i386.zip file for windows.

You have to create it yourself in your home directory.  Have a look
here:
 
http://www.gnu.org/software/emacs/windows/Installing-Emacs.html#Installing-Emacs

Regards

Loris
-- 
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin Email loris.benn...@fu-berlin.de




[O] [PATCH] org-capture, removing whitespace from new captures

2011-09-13 Thread paulusm
I found myself manually "cleaning" most CAPTURE buffers of whitespace
prior to committing them with C-c C-c.  The attached patch adds a new
property :whitespace-cleanup to the org-capture-templates.

--
Paul.



diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index a7dc92b..ae5af6d 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -205,6 +205,9 @@ properties are:
  capture was invoked, kill the buffer again after capture
  is finalized.
 
+ :whitespace-cleanup When set, call `whitespace-cleanup' prior to
+ widening the buffer.
+
 The template defines the text to be inserted.  Often this is an
 org-mode entry (so the first line should start with a star) that
 will be filed as a child of the target headline.  It can also be
@@ -329,7 +332,8 @@ calendar|  %:type %:date"
((const :format "%v " :clock-keep) (const t))
((const :format "%v " :clock-resume) (const t))
((const :format "%v " :unnarrowed) (const t))
-   ((const :format "%v " :kill-buffer) (const t
+   ((const :format "%v " :kill-buffer) (const t))
+   ((const :format "%v " :whitespace-cleanup) (const 
t
 
 (defcustom org-capture-before-finalize-hook nil
   "Hook that is run right before a capture process is finalized.
@@ -544,6 +548,9 @@ captured item after finalizing."
  (org-clock-in)))
   (message "Interrupted clock has been resumed")))
 
+  (when (org-capture-get :whitespace-cleanup 'local)
+(whitespace-cleanup))
+
   (let ((beg (point-min))
(end (point-max))
(abort-note nil))



[O] .emacs file in windows

2011-09-13 Thread Bob Qualls
I would like to add the suggested "Activiation" code to the .emacs file but
I can't figure out which one it is.  I downloaded the
emacs-23.1-bin-i386.zip file for windows.


Re: [O] [babel] Collection of code block snippets

2011-09-13 Thread David Maus
Hi Martyn,

At Sat, 10 Sep 2011 09:09:17 +0100,
Martyn Jago wrote:
> I'll do some work on testing against version 23 and 22 and maybe put
> together a how-to get ERT on those earlier systems (on linux).

Just read this through Org mode's patch tracker[1] and coincidentally
started to work on the test framework, too. To get a recent ERT
running on Emac22 we need to backport parts of simple.el as of Emacs23
-- doing this is scheduled for the upcoming weekend in my Org mode.

> For fun I hacked together a test results parser using org babel, which
> calls your script from within a shell block, passing the results to a
> parser block. Output is in the form of org mode headings and
> sub-headings. I've attached it in case you were interested (org babel
> was just great for doing this).

This is great. This would be useful for non-babel tests, too. There
are some tests for link escaping and link export -- I'm going to
extend the latter (that's why I started to work on the testing
framework in the first place).

Best,
  -- David

[1] http://patchwork.newartisans.com
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de


pgp1GJFkpx8Kr.pgp
Description: PGP signature


Re: [O] FYI: Org mode testing framework, Emacs 23 and 22

2011-09-13 Thread David Maus
At Tue, 13 Sep 2011 08:48:49 -0600,
Eric Schulte wrote:
> This test has been updated so that it no longer calls the left-char
> function.  Please update to the latest git head and this test should
> pass.

All tests pass on Emacs 23.

>
> So am I right in thinking that as of right this commit [1] we are
> passing all tests on Emacs 22 through Emacs24?

No Emacs23 through Emacs24: Backporting simple.el is scheduled for the
upcoming weekend.

Best,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de


pgp8Li97WP53Z.pgp
Description: PGP signature


Re: [O] Open Drawer using keys or even better automatically

2011-09-13 Thread suvayu ali
Hi Markus,

On Tue, Sep 13, 2011 at 11:50 PM, Markus Grebenstein
 wrote:
> Dear List,
>
> after converting my whole thesis from Scrivener to Orgmode I'm missing just
> one feature:
> Synopsis
>
> The method proposed in the list using the VISIBILITY property is not
> suitable for me since I want to have the synopsis at the level of the text
> it describes and I want to be able to have some introduction text also
> besides the synopsis.
>
>
> Therefore I have been wondering wether there is any chance to generate a
> sparse tree that opens all specific drawers e.g. :SYNOPSYIS: or
> alternatively to have the sparse tree (only showing the headlines) and open
> the drawers using keybindings.
>

I am a little confused. Do you mean the final form of your thesis is
in org-mode format, or do you intend to export it to pdf (for
submission) or html (maybe for publishing on your webpage)?

If you intend to export it then it is trivial when using the latex
backend (although I don't know how but I'm sure its possible for html
too). All you need to do is write your synopsis within the abstract
environment. You can also have an outline/toc with various levels of
detail by setting the toc: option in the #+OPTIONS: header and
configuring org-export-latex-classes.

If you need more specific help, let me know I could share latex
snippets from my thesis. To give you an idea how an org document might
look after latex export, here is a link to my master's thesis:


On the other hand if you are looking for something to help you during
the writing of the document, you might want to look at org-toc in
contrib/ or speedbar.

> Thanks in advance and best regards,
>
> Markus
>

Hope that helps, and GL

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Adding Timestamps

2011-09-13 Thread Ben Finney
Chris Niven  writes:

> Is there any way to sum timestamps in org-mode?

What would that mean?

What is the result of the sum of:

<2011-09-12 08:45>
<2011-09-12 16:23>
<2011-09-14 03:02>

?

-- 
 \“I took a course in speed waiting. Now I can wait an hour in |
  `\ only ten minutes.” —Steven Wright |
_o__)  |
Ben Finney




[O] Open Drawer using keys or even better automatically

2011-09-13 Thread Markus Grebenstein

Dear List,

after converting my whole thesis from Scrivener to Orgmode I'm missing  
just one feature:

Synopsis

The method proposed in the list using the VISIBILITY property is not  
suitable for me since I want to have the synopsis at the level of the  
text it describes and I want to be able to have some introduction text  
also besides the synopsis.



Therefore I have been wondering wether there is any chance to generate  
a sparse tree that opens all specific drawers e.g. :SYNOPSYIS: or  
alternatively to have the sparse tree (only showing the headlines) and  
open the drawers using keybindings.


Thanks in advance and best regards,

Markus




Re: [O] [bug] equations in latex equation environment with leading +/- misinterpreted

2011-09-13 Thread Nicolas Goaziou
Eric S Fraga  writes:

> but behaviour that I can accept, especially as the easy solution is to
> simply enclose the equation in a latex block:
>
> * equation with leading minus sign
>   The following equation
> #+begin_latex
>   \begin{equation}
>   \label{eq:test}
>   y = 3 x
>   - 5
>   + 4
>   \end{equation}
> #+end_latex
>
> This works just fine and is probably for the best in any case.  Using a
> latex block allows for latex specific editing (C-c ').  Should have done
> this in the first place!

Technically, this isn't the same. The LaTeX block would be removed
during an HTML export while the plain LaTeX code would be changed into
an image (or "Mathjaxified", whatever that means).

That's annoying because I tend to think that writing plain LaTeX
environments (without any block marker) should be deprecated.

Indeed, while there's a need for short mathematical LaTeX snippets,
LaTeX environments can imply constructs that :

 - are not always related to mathematics (and should therefore be
   handled by Org blocks)
 - are too large to be called "snippets" (and should therefore be
   handled by Org blocks)

Also, I don't know what to think about an object that you can inline on
the right side but not on the left one (and I admit that's what annoys
me the most, at the moment).

Regards,

-- 
Nicolas Goaziou



Re: [O] Having problems with annotations of generated pdfs :(

2011-09-13 Thread suvayu ali
On Tue, Sep 13, 2011 at 1:55 PM, Piter_  wrote:
> I am exporting my thesis from orgmode to latex. Than I go in this way
> dvi -> ps -> pdf.

For my thesis I used this:

(setq org-latex-to-pdf-process
  '("pdflatex -interaction nonstopmode %b"
"/usr/bin/bibtex %b"
"pdflatex -interaction nonstopmode %b"
"pdflatex -interaction nonstopmode %b"))

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [bug] equations in latex equation environment with leading +/- misinterpreted

2011-09-13 Thread Eric S Fraga
Nicolas Goaziou  writes:

> Hello,
>
> Eric S Fraga  writes:
>
>> the attached org file illustrates a problem with the latex exporter in
>> which any line within a \begin{equation}...\end{equation} that begins
>> with a + or - is interpreted as a list item.
>>
>> It's easy enough to avoid this problem by either reformatting the lines
>> in question or by enclosing the equation block in a LATEX org block.
>> Therefore, there's no urgency in addressing this bug.
>
> [...]
>
>> * equation with leading minus sign
>>   The following equation
>
>>   \begin{equation}
>>   \label{eq:test}
>>   y = 3 x
>>   - 5
>>   + 4
>>   \end{equation} illustrates a problem in \LaTex export where the
>>   leading arithmetic operators are interpreted as list entries.
>
> I understand your concern, but, as far as I can tell, that's not a bug.
>
> Lists have precedence over LaTeX snippets. In other words, you're asking
> to start a list here, and Org starts one.

Okay, I understand.  "Unintended behaviour" instead of "bug" ;-) but
behaviour that I can accept, especially as the easy solution is to
simply enclose the equation in a latex block:

--8<---cut here---start->8---
* equation with leading minus sign
  The following equation
#+begin_latex
  \begin{equation}
  \label{eq:test}
  y = 3 x
  - 5
  + 4
  \end{equation}
#+end_latex
--8<---cut here---end--->8---

This works just fine and is probably for the best in any case.  Using a
latex block allows for latex specific editing (C-c ').  Should have done
this in the first place!

Sorry for the noise!

Thanks,
eric
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.7 (release_7.7.282.g0037)



Re: [O] embed an iframe in html export (html5 presentation)?

2011-09-13 Thread Matt Price
ah, so sweet.  that's great, thanks Christian!

On Tue, Sep 13, 2011 at 2:17 PM, Christian Moe  wrote:
> No problem:
>
> #+begin_html
> http://www.foo.org/bar.html";>
> #+end_html
>
> For Google maps, use the code they provide (click the link button).
>
> hth,
> Christian
>
> On 9/13/11 3:32 PM, Matt Price wrote:
>>
>> Does anyone know whether I can embed an iframe pointing to another web
>> page (e.g. a google map) in an org-mode export (preferably a
>> presentation)?  If so, I'll use it in the future...
>>
>> Thanks,
>>
>> Matt
>>
>>
>
>



Re: [O] embed an iframe in html export (html5 presentation)?

2011-09-13 Thread Christian Moe

No problem:

#+begin_html
http://www.foo.org/bar.html";>
#+end_html

For Google maps, use the code they provide (click the link button).

hth,
Christian

On 9/13/11 3:32 PM, Matt Price wrote:

Does anyone know whether I can embed an iframe pointing to another web
page (e.g. a google map) in an org-mode export (preferably a
presentation)?  If so, I'll use it in the future...

Thanks,

Matt







Re: [O] [Bug] Exporting subtree with code

2011-09-13 Thread Maximilian Matthé
Eric Schulte  writes:


>>
>> Hi,
>>
>> I just pulled the new version, but now I get another error message,
>> here's the message lock
>>
>
> I just pushed up another fix which should resolve this problem.

> Cheers -- Eric

Thanks Eric, the error message is gone, I can now export the subtree
again :)

Regards, Max




Re: [O] [bug] equations in latex equation environment with leading +/- misinterpreted

2011-09-13 Thread Nicolas Goaziou
Hello,

Eric S Fraga  writes:

> the attached org file illustrates a problem with the latex exporter in
> which any line within a \begin{equation}...\end{equation} that begins
> with a + or - is interpreted as a list item.
>
> It's easy enough to avoid this problem by either reformatting the lines
> in question or by enclosing the equation block in a LATEX org block.
> Therefore, there's no urgency in addressing this bug.

[...]

--8<---cut here---start->8---
> * equation with leading minus sign
>   The following equation
>   \begin{equation}
>   \label{eq:test}
>   y = 3 x
>   - 5
>   + 4
>   \end{equation} illustrates a problem in \LaTex export where the
>   leading arithmetic operators are interpreted as list entries.
--8<---cut here---end--->8---

I understand your concern, but, as far as I can tell, that's not a bug.

Lists have precedence over LaTeX snippets. In other words, you're asking
to start a list here, and Org starts one.

Also, that this kind of line won't appear automatically[1] (during
filling), so Org assumes it's here on purpose.


Regards,

[1] Now, if it does, that's indeed a bug.

-- 
Nicolas Goaziou



Re: [O] Having problems with annotations of generated pdfs :(

2011-09-13 Thread Achim Gratz
Piter_  writes:
> I am not sure this is the best place to ask but I will give it a try.
> I am exporting my thesis from orgmode to latex. Than I go in this way
> dvi -> ps -> pdf.
> I cant do text search in generated file and acrobat reader annotate
> tool does not work properly on it.
> I would thank for any suggestion what to do.

Use texi2pdf or pdflatex.


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

Samples for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra




Re: [O] [Bug] Exporting subtree with code

2011-09-13 Thread Eric Schulte
>>
>> I just pushed up a fix for this issue.  Thanks for reporting and
>>please let me know if the problem persists with the latest version of
>>Org-mode from git head.
>>
>> Best -- Eric
>>
>
> Hi,
>
> I just pulled the new version, but now I get another error message,
> here's the message lock
>

I just pushed up another fix which should resolve this problem.

What is happening is that the latex export is processing the buffer
twice.  On the first pass through the code block is evaluated, its
results inserted, and its body removed.  On the second pass through the
code block processing is choking on a block with no body.  The
processing should now be robust to blocks with no bodies, however a
better fix would be to find out why the buffer is processed twice on
latex export and change that behavior.

Cheers -- Eric

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



Re: [O] [Bug] Exporting subtree with code

2011-09-13 Thread Maximilian Matthé
Eric Schulte  writes:

> maxi.mat...@googlemail.com (Maximilian Matthé) writes:
>
>> Hi guys,
>>
>> I found a bug (or I'm doing something wrong): See this org file:
>>
>> 
>>
>> * 1
>> * 2
>> ** 2.1
>> ** 2.2
>> Exporting this subtree to latex (C-c C-e 1 d) raises
>> "wrong type argument: arrayp"
>>
>> #+BEGIN_SRC python :results output :export results
>> print 1
>> print 2
>> #+END_SRC
>>
>> #+results:
>> : 1
>> : 2
>>
>> 
>>
>> I can export and process the whole file to latex und pdf with no errors,
>> but when I try to export the subtree 2.2 I get the given error. What's
>> going on here?
>>
>
> I just pushed up a fix for this issue.  Thanks for reporting and please
> let me know if the problem persists with the latest version of Org-mode
> from git head.
>
> Best -- Eric
>

Hi,

I just pulled the new version, but now I get another error message,
here's the message lock

,
| SUBTREE
| Export buffer: 
| Export subtree: 
| Mark set
| Exporting to PDF...
| Exporting to LaTeX...
| OVERVIEW
| Loading reftex...done
| Compiling label environment definitions...done
| Scanning entire document...
| Scanning file /home/mmatthe/temp/bla.tex
| Scanning section 1 ...
| Scanning section 2 ...
| Scanning document... done
| Applying style hooks... done
| Loading reftex...done
| org-babel-exp processing...
| Loading reftex...done
| org-babel-exp processing...
| org-babel-get-src-block-info: Wrong type argument: char-or-string-p, nil
`
 I attach the file I'm using (it's the same).
Regards, Max



bla.org
Description: Binary data


Re: [O] [Bug] Exporting subtree with code

2011-09-13 Thread Eric Schulte
maxi.mat...@googlemail.com (Maximilian Matthé) writes:

> Hi guys,
>
> I found a bug (or I'm doing something wrong): See this org file:
>
> 
>
> * 1
> * 2
> ** 2.1
> ** 2.2
> Exporting this subtree to latex (C-c C-e 1 d) raises
> "wrong type argument: arrayp"
>
> #+BEGIN_SRC python :results output :export results
> print 1
> print 2
> #+END_SRC
>
> #+results:
> : 1
> : 2
>
> 
>
> I can export and process the whole file to latex und pdf with no errors,
> but when I try to export the subtree 2.2 I get the given error. What's
> going on here?
>

I just pushed up a fix for this issue.  Thanks for reporting and please
let me know if the problem persists with the latest version of Org-mode
from git head.

Best -- Eric

>
> Regards, Max
>
>

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



Re: [O] Use id property as anchor in the Table of Contents

2011-09-13 Thread Pere Quintana Seguí
2011/9/13 Olaf Dietsche :
> You might try this *untested* patch. It is against git master.

:D Thanks!!!

> How did you create ID properties for all entries? Have you exported your
> org-files to icalendar?

Most of them have ID properties because I often link them internally.
When I create the link with C-c l, org adds the id.

For those that do not have ID, I'll create them manually with
org-id-get-create. With a keyboard macro this will be fast.

> And please, don't forget to backup your files!

Of course! Fortunately I version control my ~/org folder with Bazaar.

With this patch, what happens if there is no id in a heading, does it
create it automatically?

At work I'm using stable versions of Org-mode. This weekend I'll try
the git version at home and test your patch.

Thanks



Re: [O] FYI: Org mode testing framework, Emacs 23 and 22

2011-09-13 Thread Eric Schulte
David Maus  writes:

> At Sun, 11 Sep 2011 15:02:08 -0600,
> Eric Schulte wrote:
>>
>> >
>> > The test result with failing tests for Emacs23 is attached.
>> >
>> > ,
>> > | Passed: 101
>> > | Failed: 8 (8 unexpected)
>> > | Total:  109/109
>> > |
>> > | Started at:   2011-09-11 19:53:46+0200
>> > | Finished.
>> > | Finished at:  2011-09-11 19:53:51+0200
>> > `
>> >
>> > 7 of the 8 are fortran-tests, the 8th is
>> > `org-babel-get-inline-src-block-matches'.
>> >
>>
>> I would imagine that the fortran tests are failing because you do not
>> have the gfortran executable in your path.  I had to apt-get install
>> fortran for these tests to pass.
>
> m( indeed. After installing gfortran all but one run trough:
>
> ,
> | Selector: "\\(org\\|ob\\)"
> | Passed: 108
> | Failed: 1 (1 unexpected)
> | Total:  109/109
> |
> | Started at:   2011-09-13 05:45:38+0200
> | Finished.
> | Finished at:  2011-09-13 05:45:45+0200
> |
> | F test-org-babel/org-babel-get-inline-src-block-matches
> |(void-function left-char)
> `
>

This test has been updated so that it no longer calls the left-char
function.  Please update to the latest git head and this test should
pass.

So am I right in thinking that as of right this commit [1] we are
passing all tests on Emacs 22 through Emacs24?

Thanks -- Eric

>
> This is with
>
> GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0) of
> 2010-12-11 on raven, modified by Debian
>
> Best,
>   -- David
> --
> OpenPGP... 0x99ADB83B5A4478E6
> Jabber dmj...@jabber.org
> Email. dm...@ictsoc.de


Footnotes: 
[1]  dbf0e6d5bcbe94c8ee57d68889d3c25bf9cdef55

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



[O] embed an iframe in html export (html5 presentation)?

2011-09-13 Thread Matt Price
Does anyone know whether I can embed an iframe pointing to another web
page (e.g. a google map) in an org-mode export (preferably a
presentation)?  If so, I'll use it in the future...

Thanks,

Matt



Re: [O] [Bug] Exporting subtree with code

2011-09-13 Thread Maximilian Matthé
maxi.mat...@googlemail.com (Maximilian Matthé) writes:

I'm using org-mode version 
Org-mode version 7.7 (release_7.7.280.gdbf0)

Thanks for your help!

> Hi guys,
>
> I found a bug (or I'm doing something wrong): See this org file:
>
> 
>
> * 1
> * 2
> ** 2.1
> ** 2.2
> Exporting this subtree to latex (C-c C-e 1 d) raises
> "wrong type argument: arrayp"
>
> #+BEGIN_SRC python :results output :export results
> print 1
> print 2
> #+END_SRC
>
> #+results:
> : 1
> : 2
>
> 
>
> I can export and process the whole file to latex und pdf with no errors,
> but when I try to export the subtree 2.2 I get the given error. What's
> going on here?
>
> Regards, Max




[O] [Bug] Exporting subtree with code

2011-09-13 Thread Maximilian Matthé
Hi guys,

I found a bug (or I'm doing something wrong): See this org file:



* 1
* 2
** 2.1
** 2.2
Exporting this subtree to latex (C-c C-e 1 d) raises
"wrong type argument: arrayp"

#+BEGIN_SRC python :results output :export results
print 1
print 2
#+END_SRC

#+results:
: 1
: 2



I can export and process the whole file to latex und pdf with no errors,
but when I try to export the subtree 2.2 I get the given error. What's
going on here?

Regards, Max




[O] Having problems with annotations of generated pdfs :(

2011-09-13 Thread Piter_
Hi all.
I am not sure this is the best place to ask but I will give it a try.
I am exporting my thesis from orgmode to latex. Than I go in this way
dvi -> ps -> pdf.
I cant do text search in generated file and acrobat reader annotate
tool does not work properly on it.
I would thank for any suggestion what to do.
Thanks.
Petro.



Re: [O] Use id property as anchor in the Table of Contents

2011-09-13 Thread Olaf Dietsche
Pere Quintana Seguí  writes:

> 2011/9/8 Bernt Hansen 
>>
>> Pere Quintana Seguí  writes:
>>
>> > Hi,
>> >
>> > I'm using Org-mode to publish my website. One of my site's pages has
>> > a lot of sections and the number of sections is increasing rapidly.
>> >
>> > My problem is that the HTML exporter, in the Table of Contents, is
>> > using the section numbers as anchors. As the section numbers change
>> > with time, I can't get stable links across versions of the document.
>> >
>> > As many of the sections (headings) have id properties, I'd like the
>> > HTML exporter to use them as anchor for the Table of Contents, when
>> > available.
>> >
>> > Is this possible? I didn't find an answer in the manual.
>> >
>> > As an example. This is the document I'm working on:
>> > http://pere.quintanasegui.com/diccionari-tecnologia.html#sec-2-78
>> >
>> > As you can see, section 2.78, called RSS, has the anchor sec-2-78. If
>> > the anchor was its id "04E3903E-EAF1-499F-98CD-9E3E4BA0806A", the
>> > link would remain the same in the future. I don't mind if the URL is
>> > not human readable. Sec-2-78 isn't human readable too.
>>
>> Hi Pere,
>>
>> You can manually provide CUSTOM_ID properties.  These ids are used in
>> the TOC.
>>
>> e.g.
>>
>> * Reminders
>>  :PROPERTIES:
>>  :CUSTOM_ID: Reminders
>>  :END:
>>
>> for
>>
>> http://doc.norang.ca/org-mode.html#Reminders
>
> OK, thanks for the tip. That's an option, but unfortunately it is not
> automatic.
>
>> I don't know if there is a way to use the ID property automatically.
>
> Unfortunately I don't know lisp, so I can't modify org-mode to provide
> this feature :'(
>
> If anyone is willing, I would be very grateful.

You might try this *untested* patch. It is against git master.

How did you create ID properties for all entries? Have you exported your
org-files to icalendar?

And please, don't forget to backup your files!

diff --git a/lisp/org-html.el b/lisp/org-html.el
index fde563b..806bbb9 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -1438,8 +1438,9 @@ lang=\"%s\" xml:lang=\"%s\">
 	 (replace-regexp-in-string
 	  "\\." "-" (format "sec-%s" snumber)))
    (setq href (org-solidify-link-text
-	   (or (cdr (assoc href
-			   org-export-preferred-target-alist)) href)))
+	   (or (cdr (assoc href org-export-preferred-target-alist))
+		   (cdr (assoc href org-export-id-target-alist))
+		   href)))
    (push
 (format
  (if todo
@@ -2413,7 +2414,8 @@ When TITLE is nil, just close all open levels."
 			 (assoc target org-export-target-aliases)))
 	 (extra-class (and title (org-get-text-property-any 0 'html-container-class title)))
 	 (preferred (and target
-			 (cdr (assoc target org-export-preferred-target-alist
+			 (or (cdr (assoc target org-export-preferred-target-alist))
+			 (cdr (assoc target org-export-id-target-alist)
 	 (l org-level-max)
 	 (num (plist-get opt-plist :section-numbers))
 	 snumber snu href suffix)

Regards, Olaf


[O] exporting subtree moves point

2011-09-13 Thread Eric S Fraga
Hello,

I often export just a sub-tree ("C-c C-e 1 p" say).  At the end of the
export, my point has moved to the enclosing headline and mark is at the
end of the contents of that sub-tree.  This is a little annoying in that
I am often making small changes to see the effect on the final exported
document, especially when playing around with tikz.  Therefore, I find
myself having to move back manually to where I was before the export.

Is there an easy way to get back to where I was beyond setting a
bookmark or register location manually?  Or is there a way to have org
put me back to where I was (save-excursion of some sort maybe)?  

If I remember to set a mark myself, I can get back to there by C-x
C-SPC.  Maybe I should just advise the export command?

Suggestions welcome!

Thanks,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.7 (release_7.7.280.gdbf0)



Re: [O] Bug? Non org timestamp in a todo is interpreted as timestamp in agenda view

2011-09-13 Thread Rainer Stengele
Am 12.09.2011 17:07, schrieb Eric S Fraga:
> Rainer Stengele  writes:
> 
>> Hi all
>>
>> Having a todo like this:
>>
>>  INARBEIT Test 2011/06/10 00:00:00
>>  SCHEDULED: <2011-09-12 Mo>
>>
>>
>> results in this agenda entry:
>>
>>   ADMIN:   0:00..Scheduled:  INARBEIT Test 2011/06/10 :00
>>
>>
>> The time stamp "2011/06/10 00:00:00", neither an active nor an inactive org 
>> timestamp,
>> because neither "<>" nor "[]" is used,
>> is interpreted as time stamp and used strangely in the agenda entry,
>> showing up as if the entry was clocked at 0:00 o'clock.
>>
>> This looks like unintended behaviour!?
>>
>> Best,
>> Rainer
> 
> Check out:
> 
> ,[ C-h v org-agenda-search-headline-for-time RET ]
> | org-agenda-search-headline-for-time is a variable defined in 
> `org-agenda.el'.
> | Its value is t
> | 
> | Documentation:
> | Non-nil means search headline for a time-of-day.
> | If the headline contains a time-of-day in one format or another, it will
> | be used to sort the entry into the time sequence of items for a day.
> | Some people have time stamps in the headline that refer to the creation
> | time or so, and then this produces an unwanted side effect.  If this is
> | the case for your, use this variable to turn off searching the headline
> | for a time.
> | 
> | You can customize this variable.
> | 
> | [back]
> `
> 
> HTH,
> eric

Eric,

thanks!

Best, Rainer