[O] Re: [BUG] bug in org-publish and a (wrong) patch

2011-04-06 Thread Nick Dokos
Nick Dokos  wrote:

> ...It also
> needs to treat the case of a non-existent symlink target (where
> file-symlink-p returns t).
> 

Scratch that: in that case, it gets the file attributes of the
symlink itself, so no problem.



[O] Re: export org file to html from command-line

2011-04-06 Thread Jambunathan K
Sean Davis  writes:

> I would like to have a way to export a file to html from the
> command-line

,[ C-h f org-export-as-html-batch RET ]
| org-export-as-html-batch is a compiled Lisp function in `org-html.el'.
| 
| (org-export-as-html-batch)
| 
| Call the function `org-export-as-html'.
| This function can be used in batch processing as:
| emacs   --batch
| --load=$HOME/lib/emacs/org.el
| --eval "(setq org-export-headline-levels 2)"
| --visit=MyFile --funcall org-export-as-html-batch
| 
| [back]
`


-- 



[O] [BUG] bug in org-publish and a (wrong) patch

2011-04-06 Thread Nick Dokos
org-publish-cache-ctime-of-src tries (but does not always succeed) to
deal with symlinks: file-symlink-p returns the target as a string, but
if the target is relative to the symlink, that's not going to fly.
e.g. if c is a symlink like this

/a/b/c->../d/f

then (file-symlink-p "/a/b/c") -> "../d/f"
but if the current directory is any place other than /a/b, the target
will not be found, the file attributes are going to be nil and
the function will blow up.

Here is a patch born of about 5 mins of contemplation. It solved my
immediate problem but it is certainly wrong. It breaks absolute targets
(which I think are handled correctly by the original version). I'm not
even sure that it correctly handles *all* relative targets. It also
needs to treat the case of a non-existent symlink target (where
file-symlink-p returns t).

It might be safer also to check if the file attributes are
nil and deal with that, instead of blowing up.

--8<---cut here---start->8---
diff --git a/lisp/org-publish.el b/lisp/org-publish.el
index e944eea..dd192d6 100644
--- a/lisp/org-publish.el
+++ b/lisp/org-publish.el
@@ -1150,7 +1150,7 @@ Returns value on success, else nil."
 (defun org-publish-cache-ctime-of-src (filename)
   "Get the FILENAME ctime as an integer."
   (let ((src-attr (file-attributes (if (stringp (file-symlink-p filename))
-  (file-symlink-p filename)
+  (concat (file-name-directory filename) 
(file-symlink-p filename))
 filename
 (+
  (lsh (car (nth 5 src-attr)) 16)
--8<---cut here---end--->8---

Nick



[O] export org file to html from command-line

2011-04-06 Thread Sean Davis
I'm new to org-mode but would like to use it for preparing docs for
latex and html.  This works perfectly from within emacs (aquamacs,
actually).  I would like to have a way to export a file to html from
the command-line so that I can potentially include and org-to-html
filter for my static website generator.  I have seen org-ruby and it
works, but it does not fully support org-mode.  Any pointers on how I
can go about this?

Thanks,
Sean



Re: [O] xml statement in html and apache error

2011-04-06 Thread Nick Dokos
Richard Riley  wrote:

> 
> I cant really give too many details or suggestions as to why it failed,
> but the default xml string at the top of export to html files was
> causing apache to fail.
> 
> ,
> | Parse error: syntax error, unexpected T_STRING in
> | /home/shamrock/common-files/webs/richardriley.net/projects/emacs/index.html
> | on line 1
> `
> 
> I simply removed the html xml declaration,
> 
> ,
> | org-export-html-xml-declaration is a variable defined in `org-html.el'.
> | Its value is 
> | (("php" . ""))
> `
> 

This looks wrong (even though unrelated to the problem): in my setup I get

--8<---cut here---start->8---
org-export-html-xml-declaration is a variable defined in `org-html.el'.
Its value is
(("html" . "")
 ("php" . "\"; 
?>"))
--8<---cut here---end--->8---

so deleting the html entry should leave you with the second line. You seem
to have a mash of the two entries instead.

> reexported my private little web, reloaded apache and all was
> well. Which was cool considering I hadnt exported it from the org data
> for all of about 2 years!
> 
> Far from thought out, almost certainly not "correct" I am sure, but got
> my web back working.
> 
> Possibly someone else can comment on cause/effect.
> 

Well, I exported a toy project and despite the presence of the xml headers,
my apache is not complaining at all. I also spot-checked a couple of files
on orgmode.org and they have the xml header, but apache seems to deliver
them without a problem. Which version of apache are you running? Mine is
2.2.16.

Nick

PS. The exercise also uncovered an org bug but I'll post that as a
separate message.



[O] Re: Odd behavior with numbered list, footnotes, and LaTeX

2011-04-06 Thread John Hendy
On Wed, Apr 6, 2011 at 1:33 PM, Nicolas Goaziou  wrote:
> Hello,
>
> John Hendy  writes:
>
>> Just stumbled across something very odd I can't figure out. Here's a sample:
>> ,-
>> | #+OPTIONS:   toc:t TeX:t LaTeX:t H:4 f:t todo:nil num:t tags:nil
>> | #+latex_class: article
>> |
>> | * Section
>> | 1. *A section*: a bunch of text is here and it seems like the
>> footnote is doing
>> |   something odd. [fn:1] More text here.
>> | 2. *A section*: a bunch of text is here and it seems like the
>> footnote is doing
>> |  something odd.
>> |
>> | * Footnotes
>> | [fn:1] www.google.com
>> `-
>>
>> It seems that the footnote triggers LaTeX to end the enumerate
>> environment early for some reason. Not only that, but it seems to be
>> inserting \end{enumerate} *inside* the footnote:
>> ,-
>> | \begin{enumerate}
>> | \item \textbf{A section}: a bunch of text is here and it seems like
>> the footnote is doing
>> |   something odd. \footnote{www.google.com
>> | \end{enumerate}
>> | } More text here.
>> |
>> | \begin{enumerate}
>> | \item \textbf{A section}: a bunch of text is here and it seems like
>> the footnote is doing
>> |   something odd.
>> | \end{enumerate}
>> `-
>>
>> Any suggestions?
>
> This has been discussed in a recent thread, and I submitted a patch for
> that problem. I'm still waiting for feedback before applying it.
>

Whoops on missing that... though I hope it gets fixed. I hadn't
updated one of my computers in a few months and know it wasn't giving
the bad behavior on there, so a change must have goofed something.

Thanks for the patch and info.


John

> Regards,
>
> --
> Nicolas Goaziou
>



Re: [O] Using orgmode to take "inline notes" for research

2011-04-06 Thread Jeff Horn
On Wed, Apr 6, 2011 at 12:33 PM, John Hendy  wrote:
> So... if I were just interested in my notes (say I wanted to just push
> the notes to my blog or share them without all the other text), it
> might get odd to see all of those headlines. Can one export just the
> text and hide the headline text altogether? And would this also create
> the appearance of simply paragraphs one after the other, or would
> there be some increased spacing between different chunks?

AFAIK, "inline-tasks" don't have to have headlines. For instance:

,[ org-inlinetask example ]
| *** NOTES
| Test note with a headline word.
| *** END
|
| ***
| Test note with blank headline.
| *** END
`

exports to ASCII as:

,[ ASCII export ]
|  -- NOTES
|  ¦ Test note with a headline word.
|
|  --
|  ¦ Test note with blank headline.
`

> Lastly, it would be fantastic to have a "toggle" on the style used for
> export of these. I would love to be able to have the inline notes
> perhaps indented a little bit, but when exporting them alone, to turn
> that off.

That's out of my depth. Maybe someone else has a suggestion?

> Thanks for the suggestion!

No problem. As a note for others searching on this, I'll just go ahead
and re-iterate that if you don't want a particular inline-task to be
printed, just add the :noexport: tag to the headline.

Sebastian, or others: One is able to add properties to inline-style
headlines correct? John could add an HTML container class property and
use a stylesheet to play with HTML export, including "indentation",
but I don't know if there is any equivalent help from the LaTeX
exporter.

-- 
Jeffrey Horn
http://www.failuretorefrain.com/jeff/



[O] xml statement in html and apache error

2011-04-06 Thread Richard Riley

I cant really give too many details or suggestions as to why it failed,
but the default xml string at the top of export to html files was
causing apache to fail.

,
| Parse error: syntax error, unexpected T_STRING in
| /home/shamrock/common-files/webs/richardriley.net/projects/emacs/index.html
| on line 1
`

I simply removed the html xml declaration,

,
| org-export-html-xml-declaration is a variable defined in `org-html.el'.
| Its value is 
| (("php" . ""))
`

reexported my private little web, reloaded apache and all was
well. Which was cool considering I hadnt exported it from the org data
for all of about 2 years!

Far from thought out, almost certainly not "correct" I am sure, but got
my web back working.

Possibly someone else can comment on cause/effect.

regards

r.



Re: [O] org-kill-line sometimes crashes emacs

2011-04-06 Thread Nick Dokos
Thomas Jack  wrote:

> On Tue, Apr 5, 2011 at 8:20 PM, Nick Dokos  wrote:
> > Yes, I can. What version of emacs are you using?
> >
> > Mine is: GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version
> > 2.22.0) of 2011-03-16. I'll update
> 
> Thanks! Glad it's not just me.

Not me: I'd be gladder if it was just you ;-)

> 
> I'm all the way back on "GNU Emacs 23.1.1 (x86_64-pc-linux-gnu, GTK+
> Version 2.22.0) of 2010-11-26 on crested, modified by Debian".
> 

That's worse than I thought: I was hoping that it was some recent change
that might have affected only 24.0.50 and I was further hoping that it
might have been fixed by now. I'll still update one of these days and try
it again, but the hope has dimmed considerably...

> I still can't figure out the exact conditions under which it happens,
> but so far I've only seen the crash when the link I'm killing is to
> the target headline. That could just be a red herring...
> 

Whatever the color of the herring, emacs should *not* crash noway, nohow :-) 

Nick



Re: [O] org-kill-line sometimes crashes emacs

2011-04-06 Thread Thomas Jack
On Tue, Apr 5, 2011 at 8:20 PM, Nick Dokos  wrote:
> Yes, I can. What version of emacs are you using?
>
> Mine is: GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version
> 2.22.0) of 2011-03-16. I'll update

Thanks! Glad it's not just me.

I'm all the way back on "GNU Emacs 23.1.1 (x86_64-pc-linux-gnu, GTK+
Version 2.22.0) of 2010-11-26 on crested, modified by Debian".

I still can't figure out the exact conditions under which it happens,
but so far I've only seen the crash when the link I'm killing is to
the target headline. That could just be a red herring...



[O] Re: unnumbered subsections in latex export

2011-04-06 Thread Sébastien Vauban
Hi Matt,

Matt Lundin wrote:
> Sébastien Vauban writes:
>>
>> When discussing exporters and features, two things that come up to my mind
>> as missing as a "general Org feature":
>>
>> - bibliography :: works for LaTeX[1], not for HTML export.
>
> Have you tried the contributed module org-exp-bibtex.el? It is not a
> self-contained org-mode module, in that it relies on bibtex2html and an
> external bibtex file, but it does enable bibliographical export to html.

Did not know about it. Will give it a try. Thanks.

>> - acronyms :: idem.
>
>> I want to be able to say, in my Org file, that DNS is an acronym, for
>> example. I'm thinking -- brainstorming! -- at a solution _such as_ adding
>> accolades around the acronyms:
>
>> This paper talks about {DNS} clients and {DNS} servers...
>
>> In LaTeX, this should have to be translated to:
>
>> This paper talks about \acro{DNS} clients and \acro{DNS} servers...
>
> One way to accommodate acronyms would be to create a new link type:
>
> (org-add-link-type
>  "acro" nil
>  (lambda (path desc format)
>(cond 
> ((eq format 'latex)
>  (format "\\acro{%s}{%s}" path desc))
> ((eq format 'html)
>  (format "%s" desc path)
>
> A link such as...
>
> [[acro:DNS][Domain Name System]]
>
> ...would then export to latex as...
>
> \acro{DNS}{Domain Name System}
>
> ...and to html as...
>
> DNS
>
> Having never used acronyms in LaTeX or html before, I have no idea
> whether the above syntax is correct. The point is simply to offer a
> proof of concept.

This is clearly interesting, and maybe part of the final solution. However,
one of the point is that we should be able to:

- define once that DNS = Domain Name System
- have all occurrences of DNS automagically pointing to its definition
- (optionnally) have the first occurrence of DNS automagically expanded.

(I guess that) the above does not meet this, and that's what made my spirit go
in the direction of pre-processing.

But maybe alternatives do exist to meet those "requirements".

Best regards,
  Seb

-- 
Sébastien Vauban




Re: [O] Using orgmode to take "inline notes" for research

2011-04-06 Thread Mark Elston

On 4/6/2011 9:33 AM, John Hendy wrote:
> ...


Inline comments already look pretty good, and I can do something like this:
,-
| *** Notes
| Here's some notes just want to see how this looks. Here's some notes
just want to see
| how this looks.
|
| Here's some notes just want to see how this looks. Here's some notes
just want to see
| how this looks.
| *** END
`-

Then on export I get a nice bold *Notes* followed by my notes:
,---
| *Notes* Here's some notes just want to see how this looks...
| \linebreak is here
| Here's some notes just want to see how this looks...
`-

If I add :export: to that Notes headline (and all of them), then it
breaks them up a bit:
,-
| *Notes*
| \linebreak is here
| Here's some notes just want to see how this looks...
| \linebreak is here
| Here's some notes just want to see how this looks...
`-

So... if I were just interested in my notes (say I wanted to just push
the notes to my blog or share them without all the other text), it
might get odd to see all of those headlines. Can one export just the
text and hide the headline text altogether? And would this also create
the appearance of simply paragraphs one after the other, or would
there be some increased spacing between different chunks?


I do something similar to this but don't put any heading text on the
line.  I *do*, however, use tags for exporting various blocks for
different purposes.  This can be useful here if you want to 'munge'
things a bit on export, though it would likely take some careful post
processing or multiple passes through your doc to get what you want.

This is what I do when creating notes for teaching and handouts for
students from a single org file...


Lastly, it would be fantastic to have a "toggle" on the style used for
export of these. I would love to be able to have the inline notes
perhaps indented a little bit, but when exporting them alone, to turn
that off.


Mark



[O] Re: unnumbered subsections in latex export

2011-04-06 Thread Matt Lundin
Sébastien Vauban 
writes:
>
> When discussing exporters and features, two things that come up to my
> mind as missing as a "general Org feature":
>
> - bibliography :: works for LaTeX[1], not for HTML export.

Have you tried the contributed module org-exp-bibtex.el? It is not a
self-contained org-mode module, in that it relies on bibtex2html and an
external bibtex file, but it does enable bibliographical export to html.

> - acronyms :: idem.

> I want to be able to say, in my Org file, that DNS is an acronym, for
> example. I'm thinking -- brainstorming! -- at a solution _such as_
> adding accolades around the acronyms:

> This paper talks about {DNS} clients and {DNS} servers...

> In LaTeX, this should have to be translated to:

> This paper talks about \acro{DNS} clients and \acro{DNS} servers...

One way to accommodate acronyms would be to create a new link type:

(org-add-link-type
 "acro" nil
 (lambda (path desc format)
   (cond 
((eq format 'latex)
 (format "\\acro{%s}{%s}" path desc))
((eq format 'html)
 (format "%s" desc path)

A link such as...

[[acro:DNS][Domain Name System]]

...would then export to latex as...

\acro{DNS}{Domain Name System}

...and to html as...

DNS

Having never used acronyms in LaTeX or html before, I have no idea
whether the above syntax is correct. The point is simply to offer a
proof of concept.

Best,
Matt



[O] Re: Odd behavior with numbered list, footnotes, and LaTeX

2011-04-06 Thread Nicolas Goaziou
Hello,

John Hendy  writes:

> Just stumbled across something very odd I can't figure out. Here's a sample:
> ,-
> | #+OPTIONS:   toc:t TeX:t LaTeX:t H:4 f:t todo:nil num:t tags:nil
> | #+latex_class: article
> |
> | * Section
> | 1. *A section*: a bunch of text is here and it seems like the
> footnote is doing
> |   something odd. [fn:1] More text here.
> | 2. *A section*: a bunch of text is here and it seems like the
> footnote is doing
> |  something odd.
> |
> | * Footnotes
> | [fn:1] www.google.com
> `-
>
> It seems that the footnote triggers LaTeX to end the enumerate
> environment early for some reason. Not only that, but it seems to be
> inserting \end{enumerate} *inside* the footnote:
> ,-
> | \begin{enumerate}
> | \item \textbf{A section}: a bunch of text is here and it seems like
> the footnote is doing
> |   something odd. \footnote{www.google.com
> | \end{enumerate}
> | } More text here.
> |
> | \begin{enumerate}
> | \item \textbf{A section}: a bunch of text is here and it seems like
> the footnote is doing
> |   something odd.
> | \end{enumerate}
> `-
>
> Any suggestions?

This has been discussed in a recent thread, and I submitted a patch for
that problem. I'm still waiting for feedback before applying it.

Regards,

-- 
Nicolas Goaziou



Re: [O] Using orgmode to take "inline notes" for research

2011-04-06 Thread John Hendy
On Wed, Apr 6, 2011 at 1:16 PM, Samuel Wales  wrote:
> Hi John,
>
> On 2011-04-06, John Hendy  wrote:
>> This sounds very cool. I can't gather from the mailing list thread
>> (which appears to be just you) whether this is implemented or just
>> suggested. Is it possible to actually use this or not?
>
> Others have commented on it.  Can't find links for you now.  It is
> just a proposal.  I cannot implement it.

Ah. Good to know. Whether implemented or just suggested was the
primary thing I wanted to know.


Thanks,
John

>
> Samuel
>
> --
> The Kafka Pandemic:
>  http://thekafkapandemic.blogspot.com/2010/12/welcome-to-kafka-pandemic-two-forces_9182.html
> I support the Whittemore-Peterson Institute (WPI)
> ===
> I want to see the original (pre-hold) Lo et al. 2010 NIH/FDA/Harvard MRV 
> paper.
>



Re: [O] Using orgmode to take "inline notes" for research

2011-04-06 Thread Samuel Wales
Hi John,

On 2011-04-06, John Hendy  wrote:
> This sounds very cool. I can't gather from the mailing list thread
> (which appears to be just you) whether this is implemented or just
> suggested. Is it possible to actually use this or not?

Others have commented on it.  Can't find links for you now.  It is
just a proposal.  I cannot implement it.

Samuel

-- 
The Kafka Pandemic:
  
http://thekafkapandemic.blogspot.com/2010/12/welcome-to-kafka-pandemic-two-forces_9182.html
I support the Whittemore-Peterson Institute (WPI)
===
I want to see the original (pre-hold) Lo et al. 2010 NIH/FDA/Harvard MRV paper.



Re: [O] Using orgmode to take "inline notes" for research

2011-04-06 Thread John Hendy
On Wed, Apr 6, 2011 at 12:27 PM, Samuel Wales  wrote:
> Hi John,
>
> They only solve half of the problem.
>
> Unbreakable bidirectional links using ID markers would solve
> the teleport problem.  Both ends can be moved anyplace,
> including inside stretches of text.  They are a little like
> a generalization of footnotes.  They use org IDs.  You can
> specify various things for export and appearance in the org
> buffer and so on.  ID markers are a proposal in the list
> archives; they can be used for graph-theoretic applications.
> Bidirectional links are simply a pair of ID markers that are
> made to act as links also and that point to each other.

This sounds very cool. I can't gather from the mailing list thread
(which appears to be just you) whether this is implemented or just
suggested. Is it possible to actually use this or not?

>
> However, you still need to figure out how to put notes at
> the top.  I wonder if inline tasks can work for this.  Maybe
> you can put a tag on each to specify that it is a note, then
> somehow export notes first, then everything except notes.
> I'm note sure how to design that to fit into org nicely.
> Maybe there is some way to do this:
>
>  * Here is my whole document (by inclusion)
>    (some kind of syntax here to say insert all :note: headlines)
>
>    Here are the things the notes refer to.  You can
>    teleport to them.
>
>    (some kind of syntax here to say insert all other headlines)
>

This would be pretty neat.

>
> Babel has something similar, but I don't know if it can do
> it.  I have long wanted a way to include the body of a
> headline upon export (maybe it is possible now, dunno) and
> this is a generalization that lets you include all headlines
> with a certain tag or all headlines without it.
>
> We would want it to be useful for more purposes.  Perhaps
> Extensible (i.e. universal) Syntax would allow flexibility here.
> It would prevent having to invent new syntax, because the
> same syntax is used for other features according to the car.

Agreed -- it would be neat to have the syntax/tools available to use
it for whatever, and as a result of such a feature set, it could be
used for this.


Thanks for sharing,
John

>
>  * Here is my whole document (by inclusion)
>    $[include :headlines-from-elisp (org-tags-view nil ":note:")]
>
>    Here are the things the notes refer to.  You can
>    teleport to them.
>
>    $[include :not-headlines-from-elisp (org-tags-view nil ":note:")]
>
>
> Samuel
>



[O] Odd behavior with numbered list, footnotes, and LaTeX

2011-04-06 Thread John Hendy
Hi,


Just stumbled across something very odd I can't figure out. Here's a sample:
,-
| #+OPTIONS:   toc:t TeX:t LaTeX:t H:4 f:t todo:nil num:t tags:nil
| #+latex_class: article
|
| * Section
| 1. *A section*: a bunch of text is here and it seems like the
footnote is doing
|   something odd. [fn:1] More text here.
| 2. *A section*: a bunch of text is here and it seems like the
footnote is doing
|  something odd.
|
| * Footnotes
| [fn:1] www.google.com
`-

It seems that the footnote triggers LaTeX to end the enumerate
environment early for some reason. Not only that, but it seems to be
inserting \end{enumerate} *inside* the footnote:
,-
| \begin{enumerate}
| \item \textbf{A section}: a bunch of text is here and it seems like
the footnote is doing
|   something odd. \footnote{www.google.com
| \end{enumerate}
| } More text here.
|
| \begin{enumerate}
| \item \textbf{A section}: a bunch of text is here and it seems like
the footnote is doing
|   something odd.
| \end{enumerate}
`-

If I remove the footnote, it works fine. With the current export, this
amounts to a PDF with the first item not indented and numbered "1" and
the second indented but also numbered "1".

If I add a footnote to the second item, I get both not indented, both
numbered "1", and the second item reads like this in the PDF:
,-
| 1. Instrumental rationality: a bunch of text is here and it seems like the
| footnote is doing something odd. 2 ORG-LIST-END-MARKER
`---

Any suggestions?


Thanks,
John



[O] Re: [BUG] Markup such as *emphasis* in HTML exported links contain tags like [7.5 (release_7.5.34.g6a369)]

2011-04-06 Thread Bernt Hansen
Christopher Allan Webber  writes:

> An html export of:
>
> #+BEGIN_SRC org
> I am [[http://example.org][so *ERRATICALLY* /excited/ about this *LINK*]]
> #+END_SRC
>
> Results in:
>
> I am http://example.org";>so ERRATICALLY
> excited about this LINK
>
> Whereas it *should* result in:
>
> I am http://example.org";>so ERRATICALLY excited
> about this LINK
>
> Emacs  : GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.20.1)
>  of 2011-03-18 on grumps
> Package: Org-mode version 7.5 (release_7.5.34.g6a369)


I think this has been fixed.

I get:

http://example.org";>so ERRATICALLY excited about this 
LINK

Org-mode version 7.5 (release_7.5-142-g4168)

Regards,
Bernt



Re: [O] Using orgmode to take "inline notes" for research

2011-04-06 Thread Samuel Wales
Hi John,

They only solve half of the problem.

Unbreakable bidirectional links using ID markers would solve
the teleport problem.  Both ends can be moved anyplace,
including inside stretches of text.  They are a little like
a generalization of footnotes.  They use org IDs.  You can
specify various things for export and appearance in the org
buffer and so on.  ID markers are a proposal in the list
archives; they can be used for graph-theoretic applications.
Bidirectional links are simply a pair of ID markers that are
made to act as links also and that point to each other.

However, you still need to figure out how to put notes at
the top.  I wonder if inline tasks can work for this.  Maybe
you can put a tag on each to specify that it is a note, then
somehow export notes first, then everything except notes.
I'm note sure how to design that to fit into org nicely.
Maybe there is some way to do this:

  * Here is my whole document (by inclusion)
(some kind of syntax here to say insert all :note: headlines)

Here are the things the notes refer to.  You can
teleport to them.

(some kind of syntax here to say insert all other headlines)


Babel has something similar, but I don't know if it can do
it.  I have long wanted a way to include the body of a
headline upon export (maybe it is possible now, dunno) and
this is a generalization that lets you include all headlines
with a certain tag or all headlines without it.

We would want it to be useful for more purposes.  Perhaps
Extensible (i.e. universal) Syntax would allow flexibility here.
It would prevent having to invent new syntax, because the
same syntax is used for other features according to the car.

  * Here is my whole document (by inclusion)
$[include :headlines-from-elisp (org-tags-view nil ":note:")]

Here are the things the notes refer to.  You can
teleport to them.

$[include :not-headlines-from-elisp (org-tags-view nil ":note:")]


Samuel



[O] Re: outline path in links

2011-04-06 Thread Michael Brand
Hi all

In the meantime I realized that for a good stability of the document
consistency it is a rather bad idea to have the name of a parent
heading like `Bach' to be part of the key to the item `Prelude' for
the [[*Bach/Prelude]] link mentioned earlier. Therefore I will instead
use :ID: links with the automatically inserted UUID (see `C-h v
org-link-to-org-use-id RET'). Thanks a lot for :ID: links.

Michael


On Thu, Jan 13, 2011 at 19:18, Michael Brand  wrote:
> Hi all
>
> What do you think about having _outline path in links_ as described in
> the following?
>
> I have seen that an outline path like `Bach/Prelude' can be used to
> refile notes into a heading `Prelude' that has a parent heading named
> `Bach'. An outline path like `Chopin/Prelude' refiles into a different
> heading with the same name `Prelude' but with a different parent
> heading named `Chopin'.
>
> Now I wondered if the link type [[*Bach/Prelude]] could be used to
> _link_ to the first outline path above. This link type would be even
> _plainer plain text_ and easier to add to a Org buffer than the link
> type [[#Bach/Prelude]] because the latter requires to manually add the
> property `:CUSTOM_ID: Bach/Prelude'
>
> I think that such an outline path in links could be possible even
> without the need of adding a new variable org-link-use-outline-path
> similar to the existing variable org-refile-use-outline-path: Like
> today the link [[*Orchestersuite/Ouverture]] would still match a
> heading named `Orchestersuite/Ouverture' (both words on the same
> heading level with a literal slash as part of the heading name) but
> additionally the link [[*Bach/Orchestersuite/Ouverture]] then would
> match this heading only if it has a parent heading named `Bach'. This
> would not be the simplest way to implement but in my opinion the
> priority should be to have as less config variables as possible. Even
> better if the code that gives this flexibility could also be used for
> refiling with outline path and the variable
> org-refile-use-outline-path could be dropped.



Re: [O] Using orgmode to take "inline notes" for research

2011-04-06 Thread John Hendy
On Wed, Apr 6, 2011 at 11:33 AM, John Hendy  wrote:
> On Tue, Apr 5, 2011 at 10:21 PM, Jeff Horn  wrote:
>> Have you tried using org-inline-task without a TODO keyword? These
>> super-deep "headlines" aren't treated as headlines, so they don't
>> break doc structure, but they are foldable, and unlike COMMENT keyword
>> headlines, they're printable.



> Yeah, this might be the ticket. Really liking it so far.
>
> So... if I were just interested in my notes (say I wanted to just push
> the notes to my blog or share them without all the other text), it
> might get odd to see all of those headlines. Can one export just the
> text and hide the headline text altogether? And would this also create
> the appearance of simply paragraphs one after the other, or would
> there be some increased spacing between different chunks?

One other suggestion on this (calling Samuel Wales) -- what if I could
get my notes at the top of the document (somehow) if I'd like to just
read though the notes, but use these "bidirectional markers" to jump
back and forth if there's ever confusion about what, exactly, I was
writing about?

I think that would be really slick. Some of this is for study, so I
could see this being quite useful -- read through what you thought was
important at the time, and if you need a refresher on the actual
contents, click the link to "teleport" to the original text (and then
teleport back)?


John

>
> Lastly, it would be fantastic to have a "toggle" on the style used for
> export of these. I would love to be able to have the inline notes
> perhaps indented a little bit, but when exporting them alone, to turn
> that off.
>
> That's a lot of requests! I think as-is, I could already make this
> work pretty darn well. I was aware of these, but was thinking they
> were just for tasks and headlines, not able to contain text.
>
> Thanks for the suggestion!
>
>
> John
>
>
>>
>> On Tue, Apr 5, 2011 at 10:02 PM, John Hendy  wrote:
>>> Hi,
>>>
>>>
>>> One thing I really like to use orgmode for is research. Lately,
>>> there's a mass of stuff on-line that I've been reading though and am
>>> about to start reading through a series of articles and had the idea
>>> to yank them into org for "inline notes."
>>>
>>> My current experiment has been:
>>> - wget the website page
>>> - run a custom script of simple sed stuff to get the major stuff
>>> converted ( &  -> /, "e; -> ", etc.)
>>> - turn things into headlines where applicable
>>> - manually tweak the rest
>>>
>>> What I'd like to do is find some way to take notes in the article and
>>> would like some suggestions from anyone who's done this. On one hand,
>>> I see the idea of keeping a separate headline for notes, and for a
>>> series of articles, my file might look like this:
>>> ,---
>>> | * Article 1
>>> | ** Notes on article 1
>>> | * Article 2
>>> | ** Notes on article 2
>>> `---
>>>
>>> One advantage to this is that I could very easily add :noexport: to my
>>> notes and print off a hard copy of the article if I want it, and it
>>> would also be easy to tag my notes :notes: and then replace-string to
>>> turn the Article :export: into :noexport: and :notes: into :export:.
>>> Then I'd have an easy to print copy of my notes for each article.
>>>
>>> On the other hand, I like quoting when I use notes, and could see it
>>> as advantageous to have something like:
>>> ,---
>>> | * Article 1
>>> | It goes along and says x, y, and z.
>>> | --- Me: that's interesting and here are my thoughts.
>>> |
>>> | It continues along saying all kinds of other things and my comments
>>> are interjected whenever I want.
>>> `---
>>>
>>> I think that might be more useful for studying things later, as I get
>>> to see an "annotated" version with my thoughts at the time I read it.
>>> What it *doesn't* allow for is the easy printing of both the article
>>> and the notes separately if I want.
>>>
>>> Would someone suggest a way that I might be able to have the best of
>>> both worlds? Some of my own not-at-all-hashed-out-ideas included:
>>> - using footnotes since org has easy ways to jump from one to another,
>>> but this would be tough when it came to actual footnotes, which there
>>> will definitely be plenty of.
>>>
>>> - highlighting the text I want to quote and then using refile somehow
>>> to send it off to my notes section with my comments. This would be
>>> cool if I could, at the same time, add an org-mode link to and from
>>> the notes and original section, but also if I could turn that link off
>>> when I export to PDF so I don't have hypertext to a non-existent link
>>> if I don't export my notes as well.
>>>
>>> Part of the reason that keeping notes/article separate is that I have
>>> others interested in the articles and, if I need to send them a copy,
>>> I want to get my junk out of there and have the original. I suppose I
>>> could just keep two copies, though?
>>>
>>> I think this idea could be useful to others and actually wouldn't
>>> doubt if someone has an awesom

Re: [O] Using orgmode to take "inline notes" for research

2011-04-06 Thread Eric Schulte
>>
>> Using the following code, you can control whether notes enclosed in
>> "notes" blcks will be exported by changing the value of the
>> *export-my-notes* variable, when it is nil your notes will not be
>> exported, when t they will be exported as quoted text.
>>
>> #+begin_src emacs-lisp
>>  (defvar *export-my-notes* nil)
>>
>>  (defun org-exp-block-process-notes (body &rest headers)
>>(if *export-my-notes*
>>(format "\n#+begin_quote\n%s\n#+end_quote\n" body)
>>""))
>>
>>  (org-export-blocks-add-block '(notes org-exp-block-process-notes nil))
>> #+end_src
>
> So, do I put my notes between the end of the (defun org-exp...) and
> (org-export-blocks...)?
>

No,

sorry I should have been more clear, add the above elisp to your Emacs
initialization (or just evaluate it in your scratch buffer), and then
after doing so whenever you export a buffer containing a begin/end_notes
block, the block will be removed during export.  Then later if you want
to export the notes along with the article text, you can evaluate the
following elisp code to set *export-my-notes* to t, and re-export to
find the notes embedded in the exported document.

#+begin_src emacs-lisp
  (setq *export-my-notes* t)
#+end_src

Hope this clears things up -- Eric

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



Re: [O] Re: export options toc:t depends on num:t

2011-04-06 Thread John Hendy
On Wed, Apr 6, 2011 at 4:20 AM, Aankhen  wrote:
> On Wed, Apr 6, 2011 at 10:18, Jambunathan K  wrote:
>> John Hendy  writes:
>> [snip]
>>> Maybe this is obvious to most, but I was puzzled by it. It seems that
>>> ,---
>>> | #+options: toc:t
>>> `---
>>>
>>> will not function when paired with:
>>> ,---
>>> | #+options: toc:t num:nil
>>> `---
>> [snip]
>>
>> Is this a LaTeX specific behaviour? I don't see anything odd with HTML
>> export.
>
> It likely is specific to LaTeX.  The starred versions of the
> sectioning commands suppress the entry in the TOC as well.  It’s
> possible to manually add the entry regardless, so maybe that needs to
> be special-cased in the exporter.  It’d look like this:
>
> ,
> | \phantomsection                 % to make PDF bookmarks work properly
> | \section*{Introduction}
> | \addcontentsline{toc}{section}{Introduction}
> `
>
> Alternatively, use the regular sectioning commands but add this before
> \begin{document}:
>
> ,
> | \setcounter{secnumdepth}{0}
> `

This works great and is easy to implement. Thanks!


John

>
> Aankhen
>



Re: [O] Using orgmode to take "inline notes" for research

2011-04-06 Thread John Hendy
On Tue, Apr 5, 2011 at 10:21 PM, Jeff Horn  wrote:
> Have you tried using org-inline-task without a TODO keyword? These
> super-deep "headlines" aren't treated as headlines, so they don't
> break doc structure, but they are foldable, and unlike COMMENT keyword
> headlines, they're printable. The only problem I've run into is have a
> lot to say in an inline note. In that case, one could just insert
> plaintext between the pseudo-headings of the inline note (try it to
> see what I mean). I haven't tried printing these long notes, but I
> imagine it would work.

Yeah, this might be the ticket. Really liking it so far. I see your
point about exporting long-ish comments, and I will definitely have
those. It looks pretty darn good to me, though. One thing I'm not sure
of is how to perhaps format them differently depending on if I want
just the notes, or if I want inline comments.

Inline comments already look pretty good, and I can do something like this:
,-
| *** Notes
| Here's some notes just want to see how this looks. Here's some notes
just want to see
| how this looks.
|
| Here's some notes just want to see how this looks. Here's some notes
just want to see
| how this looks.
| *** END
`-

Then on export I get a nice bold *Notes* followed by my notes:
,---
| *Notes* Here's some notes just want to see how this looks...
| \linebreak is here
| Here's some notes just want to see how this looks...
`-

If I add :export: to that Notes headline (and all of them), then it
breaks them up a bit:
,-
| *Notes*
| \linebreak is here
| Here's some notes just want to see how this looks...
| \linebreak is here
| Here's some notes just want to see how this looks...
`-

So... if I were just interested in my notes (say I wanted to just push
the notes to my blog or share them without all the other text), it
might get odd to see all of those headlines. Can one export just the
text and hide the headline text altogether? And would this also create
the appearance of simply paragraphs one after the other, or would
there be some increased spacing between different chunks?

Lastly, it would be fantastic to have a "toggle" on the style used for
export of these. I would love to be able to have the inline notes
perhaps indented a little bit, but when exporting them alone, to turn
that off.

That's a lot of requests! I think as-is, I could already make this
work pretty darn well. I was aware of these, but was thinking they
were just for tasks and headlines, not able to contain text.

Thanks for the suggestion!


John


>
> On Tue, Apr 5, 2011 at 10:02 PM, John Hendy  wrote:
>> Hi,
>>
>>
>> One thing I really like to use orgmode for is research. Lately,
>> there's a mass of stuff on-line that I've been reading though and am
>> about to start reading through a series of articles and had the idea
>> to yank them into org for "inline notes."
>>
>> My current experiment has been:
>> - wget the website page
>> - run a custom script of simple sed stuff to get the major stuff
>> converted ( &  -> /, "e; -> ", etc.)
>> - turn things into headlines where applicable
>> - manually tweak the rest
>>
>> What I'd like to do is find some way to take notes in the article and
>> would like some suggestions from anyone who's done this. On one hand,
>> I see the idea of keeping a separate headline for notes, and for a
>> series of articles, my file might look like this:
>> ,---
>> | * Article 1
>> | ** Notes on article 1
>> | * Article 2
>> | ** Notes on article 2
>> `---
>>
>> One advantage to this is that I could very easily add :noexport: to my
>> notes and print off a hard copy of the article if I want it, and it
>> would also be easy to tag my notes :notes: and then replace-string to
>> turn the Article :export: into :noexport: and :notes: into :export:.
>> Then I'd have an easy to print copy of my notes for each article.
>>
>> On the other hand, I like quoting when I use notes, and could see it
>> as advantageous to have something like:
>> ,---
>> | * Article 1
>> | It goes along and says x, y, and z.
>> | --- Me: that's interesting and here are my thoughts.
>> |
>> | It continues along saying all kinds of other things and my comments
>> are interjected whenever I want.
>> `---
>>
>> I think that might be more useful for studying things later, as I get
>> to see an "annotated" version with my thoughts at the time I read it.
>> What it *doesn't* allow for is the easy printing of both the article
>> and the notes separately if I want.
>>
>> Would someone suggest a way that I might be able to have the best of
>> both worlds? Some of my own not-at-all-hashed-out-ideas included:
>> - using footnotes since org has easy ways to jump from one to another,
>> but this would be tough when it came to actual footnotes, which there
>> will definitely be plenty of.
>>
>> - highlighting the text I want to quote and then using refile somehow
>> to send it off to my notes section with my comments. This would be
>> cool if I cou

Re: [O] Using orgmode to take "inline notes" for research

2011-04-06 Thread John Hendy
On Wed, Apr 6, 2011 at 12:02 AM, Eric Schulte  wrote:
> Erik Iverson  writes:
>
>> If you export to HTML, you should be able to export your notes with a
>> CSS class to style your notes as differently from the text as you
>> like.
>>
>
> I like the following for offsetting quotes, may work well for notes...
>
> #+begin_src css
>  blockquote {
>    border-left: 1px solid gray;
>    padding-left: 4px; }
> #+end_src

I like formats like this as well and have been "cheating" to do this
in LaTeX more or less like this:

#+attr_latex: align=l|p{0.95\textwidth}
| \,| The text that I want quoted, which ends up looking good but
needs to be on one insanely long line of an org-mode table|

Is there a better way to send a quote into the table form (indented
with a nice vertical line to the left) but not need to have the quote
on one huge line of an actual table (from org -> LaTeX, that is...
obviously the above works if using html)?


John



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



Re: [O] Re: Using orgmode to take "inline notes" for research

2011-04-06 Thread John Hendy
On Tue, Apr 5, 2011 at 11:14 PM, Samuel Wales  wrote:
> I agree this is interesting.
>
> Another option is an annotation mechanism with unbreakable
> bidirectional links -- ID markers work for this.  You can stick the
> markers anywhere.

Heck yes -- this sounds *awesome*. Could you give an example? I'd be
interested in this regardless, as what I might export could, indeed,
have an insanely good use for links like this to go back and forth
between various places.

>
> If the thing to be annotated is read-only, I have other ideas.

Nope -- I grab the html, futz with it, massage it into a usable
org-mode file, and then use that for notes and export to PDF.


Thanks,
John

>
> Samuel
>
> --
> The Kafka Pandemic:
>  http://thekafkapandemic.blogspot.com/2010/12/welcome-to-kafka-pandemic-two-forces_9182.html
> I support the Whittemore-Peterson Institute (WPI)
> ===
> I want to see the original (pre-hold) Lo et al. 2010 NIH/FDA/Harvard MRV 
> paper.
>
>



Re: [O] Using orgmode to take "inline notes" for research

2011-04-06 Thread John Hendy
On Tue, Apr 5, 2011 at 11:10 PM, Erik Iverson  wrote:
> If you export to HTML, you should be able to export your notes with a CSS
> class to style your notes as differently from the text as you like.

Great idea. Unfortunately, I'm almost entirely a LaTeX -> PDF guy.
Though, if I ever wanted blog interaction, I definitely might look
into this more, though I'm usually just needing pretty "bland" html
code for blogger at that point.

One question... if I were to do this, how would I "signal" that a
certain portion of the text (my notes) should get a different css
applied to them than the rest of the document that they are
interspersed into? Would I have some sort of  tag wherever I have
notes?


Thanks,
John

>
> On 04/05/2011 10:32 PM, Eric Schulte wrote:
>>
>> Hi John,
>>
>> Interesting use case, I definitely see the utility.  I think that blocks
>> may be an appropriate solution, for example if you enclose your notes in
>> "notes" blocks, then it should be easy to control whether or not they
>> are exported...
>>
>> Using the following code, you can control whether notes enclosed in
>> "notes" blcks will be exported by changing the value of the
>> *export-my-notes* variable, when it is nil your notes will not be
>> exported, when t they will be exported as quoted text.
>>
>> #+begin_src emacs-lisp
>>   (defvar *export-my-notes* nil)
>>
>>   (defun org-exp-block-process-notes (body&rest headers)
>>     (if *export-my-notes*
>>         (format "\n#+begin_quote\n%s\n#+end_quote\n" body)
>>         ""))
>>
>>   (org-export-blocks-add-block '(notes org-exp-block-process-notes nil))
>> #+end_src
>>
>> Hope this Helps -- Eric
>>
>> This works for me with the attached Org-mode file.
>>
>>
>>
>>
>>
>> John Hendy  writes:
>>
>>> Hi,
>>>
>>>
>>> One thing I really like to use orgmode for is research. Lately,
>>> there's a mass of stuff on-line that I've been reading though and am
>>> about to start reading through a series of articles and had the idea
>>> to yank them into org for "inline notes."
>>>
>>> My current experiment has been:
>>> - wget the website page
>>> - run a custom script of simple sed stuff to get the major stuff
>>> converted (  &    ->  /,"e; ->  ", etc.)
>>> - turn things into headlines where applicable
>>> - manually tweak the rest
>>>
>>> What I'd like to do is find some way to take notes in the article and
>>> would like some suggestions from anyone who's done this. On one hand,
>>> I see the idea of keeping a separate headline for notes, and for a
>>> series of articles, my file might look like this:
>>> ,---
>>> | * Article 1
>>> | ** Notes on article 1
>>> | * Article 2
>>> | ** Notes on article 2
>>> `---
>>>
>>> One advantage to this is that I could very easily add :noexport: to my
>>> notes and print off a hard copy of the article if I want it, and it
>>> would also be easy to tag my notes :notes: and then replace-string to
>>> turn the Article :export: into :noexport: and :notes: into :export:.
>>> Then I'd have an easy to print copy of my notes for each article.
>>>
>>> On the other hand, I like quoting when I use notes, and could see it
>>> as advantageous to have something like:
>>> ,---
>>> | * Article 1
>>> | It goes along and says x, y, and z.
>>> | --- Me: that's interesting and here are my thoughts.
>>> |
>>> | It continues along saying all kinds of other things and my comments
>>> are interjected whenever I want.
>>> `---
>>>
>>> I think that might be more useful for studying things later, as I get
>>> to see an "annotated" version with my thoughts at the time I read it.
>>> What it *doesn't* allow for is the easy printing of both the article
>>> and the notes separately if I want.
>>>
>>> Would someone suggest a way that I might be able to have the best of
>>> both worlds? Some of my own not-at-all-hashed-out-ideas included:
>>> - using footnotes since org has easy ways to jump from one to another,
>>> but this would be tough when it came to actual footnotes, which there
>>> will definitely be plenty of.
>>>
>>> - highlighting the text I want to quote and then using refile somehow
>>> to send it off to my notes section with my comments. This would be
>>> cool if I could, at the same time, add an org-mode link to and from
>>> the notes and original section, but also if I could turn that link off
>>> when I export to PDF so I don't have hypertext to a non-existent link
>>> if I don't export my notes as well.
>>>
>>> Part of the reason that keeping notes/article separate is that I have
>>> others interested in the articles and, if I need to send them a copy,
>>> I want to get my junk out of there and have the original. I suppose I
>>> could just keep two copies, though?
>>>
>>> I think this idea could be useful to others and actually wouldn't
>>> doubt if someone has an awesome setup for something like this already.
>>>
>>>
>>> Thanks for any suggestions!
>>> John
>>>
>>>
>>
>
>



Re: [O] Using orgmode to take "inline notes" for research

2011-04-06 Thread John Hendy
2011/4/5 Eric Schulte :
> Hi John,
>
> Interesting use case, I definitely see the utility.  I think that blocks
> may be an appropriate solution, for example if you enclose your notes in
> "notes" blocks, then it should be easy to control whether or not they
> are exported...

Definitely a candidate! Of all things, I had not thought about using
blocks for this.

>
> Using the following code, you can control whether notes enclosed in
> "notes" blcks will be exported by changing the value of the
> *export-my-notes* variable, when it is nil your notes will not be
> exported, when t they will be exported as quoted text.
>
> #+begin_src emacs-lisp
>  (defvar *export-my-notes* nil)
>
>  (defun org-exp-block-process-notes (body &rest headers)
>    (if *export-my-notes*
>        (format "\n#+begin_quote\n%s\n#+end_quote\n" body)
>        ""))
>
>  (org-export-blocks-add-block '(notes org-exp-block-process-notes nil))
> #+end_src

So, do I put my notes between the end of the (defun org-exp...) and
(org-export-blocks...)?

>
> Hope this Helps -- Eric
>
> This works for me with the attached Org-mode file.
>

I'm assuming I need to add your code above to the attached? As-is, it
export, but it just puts your "Notes on lorem" in between the two
paragraphs.

Thanks for the suggestion!
John

>
>
> John Hendy  writes:
>
>> Hi,
>>
>>
>> One thing I really like to use orgmode for is research. Lately,
>> there's a mass of stuff on-line that I've been reading though and am
>> about to start reading through a series of articles and had the idea
>> to yank them into org for "inline notes."
>>
>> My current experiment has been:
>> - wget the website page
>> - run a custom script of simple sed stuff to get the major stuff
>> converted ( &  -> /, "e; -> ", etc.)
>> - turn things into headlines where applicable
>> - manually tweak the rest
>>
>> What I'd like to do is find some way to take notes in the article and
>> would like some suggestions from anyone who's done this. On one hand,
>> I see the idea of keeping a separate headline for notes, and for a
>> series of articles, my file might look like this:
>> ,---
>> | * Article 1
>> | ** Notes on article 1
>> | * Article 2
>> | ** Notes on article 2
>> `---
>>
>> One advantage to this is that I could very easily add :noexport: to my
>> notes and print off a hard copy of the article if I want it, and it
>> would also be easy to tag my notes :notes: and then replace-string to
>> turn the Article :export: into :noexport: and :notes: into :export:.
>> Then I'd have an easy to print copy of my notes for each article.
>>
>> On the other hand, I like quoting when I use notes, and could see it
>> as advantageous to have something like:
>> ,---
>> | * Article 1
>> | It goes along and says x, y, and z.
>> | --- Me: that's interesting and here are my thoughts.
>> |
>> | It continues along saying all kinds of other things and my comments
>> are interjected whenever I want.
>> `---
>>
>> I think that might be more useful for studying things later, as I get
>> to see an "annotated" version with my thoughts at the time I read it.
>> What it *doesn't* allow for is the easy printing of both the article
>> and the notes separately if I want.
>>
>> Would someone suggest a way that I might be able to have the best of
>> both worlds? Some of my own not-at-all-hashed-out-ideas included:
>> - using footnotes since org has easy ways to jump from one to another,
>> but this would be tough when it came to actual footnotes, which there
>> will definitely be plenty of.
>>
>> - highlighting the text I want to quote and then using refile somehow
>> to send it off to my notes section with my comments. This would be
>> cool if I could, at the same time, add an org-mode link to and from
>> the notes and original section, but also if I could turn that link off
>> when I export to PDF so I don't have hypertext to a non-existent link
>> if I don't export my notes as well.
>>
>> Part of the reason that keeping notes/article separate is that I have
>> others interested in the articles and, if I need to send them a copy,
>> I want to get my junk out of there and have the original. I suppose I
>> could just keep two copies, though?
>>
>> I think this idea could be useful to others and actually wouldn't
>> doubt if someone has an awesome setup for something like this already.
>>
>>
>> Thanks for any suggestions!
>> John
>>
>>
>
> --
> Eric Schulte
> http://cs.unm.edu/~eschulte/
>
>



[O] [BUG] Markup such as *emphasis* in HTML exported links contain tags like [7.5 (release_7.5.34.g6a369)]

2011-04-06 Thread Christopher Allan Webber
An html export of:

#+BEGIN_SRC org
I am [[http://example.org][so *ERRATICALLY* /excited/ about this *LINK*]]
#+END_SRC

Results in:

I am http://example.org";>so ERRATICALLY
excited about this LINK

Whereas it *should* result in:

I am http://example.org";>so ERRATICALLY excited
about this LINK

Emacs  : GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2011-03-18 on grumps
Package: Org-mode version 7.5 (release_7.5.34.g6a369)
-- 
𝓒𝓱𝓻𝓲𝓼𝓽𝓸𝓹𝓱𝓮𝓻 𝓐𝓵𝓵𝓪𝓷 𝓦𝓮𝓫𝓫𝓮𝓻



Re: [O] Bug: datetree capture from agenda [7.5 (release_7.5.135.g7021f.dirty)]

2011-04-06 Thread Carsten Dominik

On Apr 6, 2011, at 12:50 PM, Philip Rooke wrote:

> Carsten Dominik  writes:
> 
> Thanks Carsten,
> 
>> I can see that it might be nice to simply add some text
>> under the date headline in a date tree, in order to build
>> up a long journal entry from little snippets.
> 
> Yes, this is exactly what I do over the course of the day and I find it
> very useful.  The trouble I run into is that, all too often, I forget or
> don't have time to add an entry on the day the noteworthy event
> happened.  I use the agenda capture action (k c) in this situation since
> the date I am on in the agenda is picked up automatically by the
> template and the right date headline is created at the right place in
> the journal.  Currently I have to then cut/paste the note, which is the
> bit I was trying to avoid.
> 
>> However, you are trying to *mix* headline entries and plain entries
>> under the same date node in the tree, and this seems to be impossible.
> 
> Sorry, my fault, the full version of journal template I currently use
> ends up creating entries like:
> 
> *** 2011-04-06 Wednesday
> 
>Try and clarify journal/note taking use case for Carsten
>[2011-04-06 Wed 10:03]
> 
>Apologise for confusing Carsten as I don't actually use headline
>entries in the journal, plain only
>[2011-04-06 Wed 10:05]
> 
>> Wouldn't a better strategy be to have the "plain" section be started with a 
>> time,
> 
> Well, as you see above I actually do like to have the time of the entry,
> but the only way I thought I could do that was using the %U keyword in
> the template (which is clumsy as it then duplicates the date/day).
> 
>> 
>> (the %<%H:%M> requires the current git release...)
> 
> ... which, coincidently, seems to have appeared this morning :-)

Yes, but even before that you could have done
%(format-time-string "%H:%M")

Cheers

- Carsten




Re: [O] Bug: datetree capture from agenda [7.5 (release_7.5.135.g7021f.dirty)]

2011-04-06 Thread Carsten Dominik

On Apr 6, 2011, at 12:50 PM, Philip Rooke wrote:

> Carsten Dominik  writes:
> 
> Thanks Carsten,
> 
>> I can see that it might be nice to simply add some text
>> under the date headline in a date tree, in order to build
>> up a long journal entry from little snippets.
> 
> Yes, this is exactly what I do over the course of the day and I find it
> very useful.  The trouble I run into is that, all too often, I forget or
> don't have time to add an entry on the day the noteworthy event
> happened.  I use the agenda capture action (k c) in this situation since
> the date I am on in the agenda is picked up automatically by the
> template and the right date headline is created at the right place in
> the journal.  Currently I have to then cut/paste the note, which is the
> bit I was trying to avoid.
> 
>> However, you are trying to *mix* headline entries and plain entries
>> under the same date node in the tree, and this seems to be impossible.
> 
> Sorry, my fault, the full version of journal template I currently use
> ends up creating entries like:
> 
> *** 2011-04-06 Wednesday
> 
>Try and clarify journal/note taking use case for Carsten
>[2011-04-06 Wed 10:03]
> 
>Apologise for confusing Carsten as I don't actually use headline
>entries in the journal, plain only
>[2011-04-06 Wed 10:05]
> 
>> Wouldn't a better strategy be to have the "plain" section be started with a 
>> time,
> 
> Well, as you see above I actually do like to have the time of the entry,
> but the only way I thought I could do that was using the %U keyword in
> the template (which is clumsy as it then duplicates the date/day).
> 
>> 
>> (the %<%H:%M> requires the current git release...)
> 
> ... which, coincidently, seems to have appeared this morning :-)
> 
> That means I can use something like:
> 
> (setq org-capture-templates
>  '(("e" "Journal entry" entry (file+datetree "/tmp/journal.org")
> "* %<%H:%M>\n  %?")
>("l" "Journal late entry" entry (file+datetree "/tmp/journal.org")
> "* Retrospectively added %<%Y-%m-%d %H:%M>\n  %?")))
> 
> Used from an agenda action the retrospective date headline/notes are
> created and filed in the right place, giving something like:
> 
> * 2011
> ** 2011-04 April
> *** 2011-04-05 Tuesday
>  Retrospectively added 2011-04-06 11:35
> Checked with Bastien about committing doc string changes
> *** 2011-04-06 Wednesday
>  11:33
> Updated Org to latest version in order to get new capture keyword
> expansion capability
>  11:36
> Problem solved. Brilliant, that works.  Carsten never ceases to
> amaze...
> 
> Thank you.

You're welcome.

- Carsten






Re: [O] Bug: datetree capture from agenda [7.5 (release_7.5.135.g7021f.dirty)]

2011-04-06 Thread Philip Rooke
Carsten Dominik  writes:

Thanks Carsten,

> I can see that it might be nice to simply add some text
> under the date headline in a date tree, in order to build
> up a long journal entry from little snippets.

Yes, this is exactly what I do over the course of the day and I find it
very useful.  The trouble I run into is that, all too often, I forget or
don't have time to add an entry on the day the noteworthy event
happened.  I use the agenda capture action (k c) in this situation since
the date I am on in the agenda is picked up automatically by the
template and the right date headline is created at the right place in
the journal.  Currently I have to then cut/paste the note, which is the
bit I was trying to avoid.

> However, you are trying to *mix* headline entries and plain entries
> under the same date node in the tree, and this seems to be impossible.

Sorry, my fault, the full version of journal template I currently use
ends up creating entries like:

*** 2011-04-06 Wednesday

Try and clarify journal/note taking use case for Carsten
[2011-04-06 Wed 10:03]

Apologise for confusing Carsten as I don't actually use headline
entries in the journal, plain only
[2011-04-06 Wed 10:05]

> Wouldn't a better strategy be to have the "plain" section be started with a 
> time,

Well, as you see above I actually do like to have the time of the entry,
but the only way I thought I could do that was using the %U keyword in
the template (which is clumsy as it then duplicates the date/day).

>
> (the %<%H:%M> requires the current git release...)

... which, coincidently, seems to have appeared this morning :-)

That means I can use something like:

(setq org-capture-templates
  '(("e" "Journal entry" entry (file+datetree "/tmp/journal.org")
 "* %<%H:%M>\n  %?")
("l" "Journal late entry" entry (file+datetree "/tmp/journal.org")
 "* Retrospectively added %<%Y-%m-%d %H:%M>\n  %?")))

Used from an agenda action the retrospective date headline/notes are
created and filed in the right place, giving something like:

* 2011
** 2011-04 April
*** 2011-04-05 Tuesday
 Retrospectively added 2011-04-06 11:35
 Checked with Bastien about committing doc string changes
*** 2011-04-06 Wednesday
 11:33
 Updated Org to latest version in order to get new capture keyword
 expansion capability
 11:36
 Problem solved. Brilliant, that works.  Carsten never ceases to
 amaze...

Thank you.

Phil




[O] Re: Using orgmode to take "inline notes" for research

2011-04-06 Thread Sébastien Vauban
Hi Jeff,

Jeff Horn wrote:
> Have you tried using org-inline-task without a TODO keyword? These
> super-deep "headlines" aren't treated as headlines, so they don't
> break doc structure, but they are foldable, and unlike COMMENT keyword
> headlines, they're printable.

I second this approach, and add the following: you can tag the "inline tasks"
as well, and doing so, choose to export them or not, on a wish-basis.

Best regards,
  Seb

-- 
Sébastien Vauban




[O] Re: Why are special properties like CLOSED etc. not in the properties drawer?

2011-04-06 Thread Marcel van der Boom

On di 05-apr-2011 10:52
Bernt Hansen  wrote:

> I don't think there should be a requirement for having
> a drawer when you mark a task done just to record the CLOSED date.
> Having an option to enable this behaviour would be fine with me.

Agreed, such an option would be welcomed by me too obviously.

marcel

-- 
Marcel van der Boom  -- http://hsdev.com/mvdb.vcf
HS-Development BV-- http://www.hsdev.com
So! web applications -- http://make-it-so.info
Cobra build  -- http://cobra.mrblog.nl



Re: [O] [BUG] Crash with LaTeX exporter

2011-04-06 Thread Giovanni Ridolfi
Jambunathan K  writes:

Hi, Jambunathan,

> Exporting the below table to LaTeX throws an error. Let me know if you
> need any additional info.
>
>
> *** Table.el Table with no Spanning
> +---+---+
> |Term   |Percentage |
> +---+---+
> |Quarter|25%|
> |One-Fourth |   |
> +---+---+
> |Half   |50%|
> |One-by-Two |   |
> +---+---+
> |Three-Quarters |75%|
> |Three-Fourths  |   |
> +---+---+
> |Full   |100%   |
> |Whole  |   |
> +---+---+

Skimming the archive list can be found that the exporter of 
table.el-tables has some problems[1-2].

More recently on Fri, 11 Feb 2011 14:16:42 +0100 Bastien suggested 
to convert to org-table before exporting.

http://lists.gnu.org/archive/html/emacs-orgmode/2011-02/msg00566.html


cheers, 
Giovanni

[1]
http://lists.gnu.org/archive/html/emacs-orgmode/2011-03/msg01889.html
[2]
http://lists.gnu.org/archive/html/emacs-orgmode/2011-01/msg00314.html
  (David Maus, on Sun, 09 Jan 2011 14:42:46 +0100 
replying to... you)
>At Sun, 19 Dec 2010 19:37:25 +0530,
> Jambunathan K wrote:
;-)



Re: [O] Re: export options toc:t depends on num:t

2011-04-06 Thread Aankhen
On Wed, Apr 6, 2011 at 10:18, Jambunathan K  wrote:
> John Hendy  writes:
> [snip]
>> Maybe this is obvious to most, but I was puzzled by it. It seems that
>> ,---
>> | #+options: toc:t
>> `---
>>
>> will not function when paired with:
>> ,---
>> | #+options: toc:t num:nil
>> `---
> [snip]
>
> Is this a LaTeX specific behaviour? I don't see anything odd with HTML
> export.

It likely is specific to LaTeX.  The starred versions of the
sectioning commands suppress the entry in the TOC as well.  It’s
possible to manually add the entry regardless, so maybe that needs to
be special-cased in the exporter.  It’d look like this:

,
| \phantomsection % to make PDF bookmarks work properly
| \section*{Introduction}
| \addcontentsline{toc}{section}{Introduction}
`

Alternatively, use the regular sectioning commands but add this before
\begin{document}:

,
| \setcounter{secnumdepth}{0}
`

Aankhen



[O] [PATCH] org-latex: Fix export of table.el tables with captions

2011-04-06 Thread Lawrence Mitchell
* lisp/org-latex.el (org-export-latex-convert-table.el-table): Fix
format-string for insertion of captions.

This fixes a bug introduced in caa5da1 since when the caption itself
is not placed inside the caption command.
---
 lisp/org-latex.el |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index d60e174..b8be87a 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -1991,7 +1991,7 @@ The conversion is made depending of STRING-BEFORE and 
STRING-AFTER."
   (setq tbl (concat "\\begin{center}\n" tbl "\\end{center}")))
 (when floatp
   (setq tbl (concat "\\begin{table}\n"
-   (format "\\caption%s{%s}%s\n"
+   (format "\\caption%s{%s%s}\n"
(if shortn (format "[%s]" shortn) "")
(if label (format "\\label{%s}" label) "")
(or caption ""))
-- 
1.7.4.rc2.18.gb20e9





[O] Re: [BUG] Crash with LaTeX exporter

2011-04-06 Thread Lawrence Mitchell
Jambunathan K wrote:
> [1. text/plain]


> Exporting the below table to LaTeX throws an error. Let me know if you
> need any additional info.

> [2. text/x-verbatim]


> *** Table.el Table with no Spanning
> +---+---+
> |Term   |Percentage |
> +---+---+
> |Quarter|25%|
> |One-Fourth |   |
> +---+---+
> |Half   |50%|
> |One-by-Two |   |
> +---+---+
> |Three-Quarters |75%|
> |Three-Fourths  |   |
> +---+---+
> |Full   |100%   |
> |Whole  |   |
> +---+---+
> [3. text/plain]

A more minimal table demonstrating the problem is:

+---+---+
|foo|bar|
+---+---+
|baz|33%|
+---+---+

This is because the percent signs are escaped in the table that
table.el sees, but the column width is not updated
appropriately.  The export process converts "%" into "\%" so that
table.el sees the following table:

+---+---+
|foo|bar|
+---+---+
|baz|33\%|
+---+---+

And so column/row calculations are incorrect.  Since table.el's
export correctly deals with escaping of percent signs, one could
just remove the escapes from the table.

It's possible that something like the below would fix things.

diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index b8be87a..d591358 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -1963,6 +1963,9 @@ The conversion is made depending of STRING-BEFORE and 
STRING-AFTER."
  floatp (or label caption))
 (and (get-buffer "*org-export-table*")
 (kill-buffer (get-buffer "*org-export-table*")))
+(save-excursion
+  (while (search-forward "\\%" nil t)
+   (replace-match "%" nil t)))
 (table-generate-source 'latex "*org-export-table*" "caption")
 (setq tbl (with-current-buffer "*org-export-table*"
(buffer-string)))

Patchwork maintainers, please don't pick this up, it's a horrible
fix :P.

Lawrence

-- 
Lawrence Mitchell 




[O] HTML export > Resizing an activated inline image

2011-04-06 Thread Francesco Pizzolante
Hi,

When you want to resize an inline image, you have to write something like the
following:

--8<---cut here---start->8---
#+ATTR_HTML: width=50%
[[./images/toto.png]]
--8<---cut here---end--->8---

This generates the following HTML code:

--8<---cut here---start->8---

--8<---cut here---end--->8---

Now, I would like my image to be activated and the link should point to the
image itself. So, I'm trying the following:

--8<---cut here---start->8---
#+ATTR_HTML: width=50%
[[./images/toto.png][file:./images/toto.png]]
--8<---cut here---end--->8---

But this adds the width to the anchor and not to the image:

--8<---cut here---start->8---

--8<---cut here---end--->8---

Any idea on the way to the get the following HTML code from Org?

--8<---cut here---start->8---

--8<---cut here---end--->8---

Thanks for your help.

Francesco



Re: [O] Bug: datetree capture from agenda [7.5 (release_7.5.135.g7021f.dirty)]

2011-04-06 Thread Carsten Dominik
Hi Philip,

thank you for this very detailed report and recipe.

First of all, the date tree target currently is meant only
for entry-type captures.  If you use a plain capture type,
it will go to the end of the buffer and the localization
by the date tree is ignored.

I can see that it might be nice to simply add some text
under the date headline in a date tree, in order to build
up a long journal entry from little snippets.  However, you
are trying to *mix* headline entries and plain entries
under the same date node in the tree, and this seems to
be impossible.  If you first add a headline entry and
then plain text, that plane text will structurally belong
to the headline that you just created.

Wouldn't a better strategy be to have the "plain" section be started with a 
time, for example

(setq org-capture-templates
'(("h" "Journal headline" entry (file+datetree "/tmp/journal.org"))
("n" "Journal note" plain (file+datetree "/tmp/journal.org") "* 
%<%H:%M>\n  %?")))

(the %<%H:%M> requires the current git release...)

Another way to phrase my question is:  What is your use case for this mix?

- Carsten

On 5.4.2011, at 23:50, Philip Rooke wrote:

> 
> Remember to cover the basics, that is, what you expected to happen and
> what in fact did happen.  You don't know how to make a good report?  See
> 
>http://orgmode.org/manual/Feedback.html#Feedback
> 
> Your bug report will be posted to the Org-mode mailing list.
> 
> Launch Emacs with no startup files
> 
> $ emacs -Q
> 
> ; evaluate these 2 forms in the *scratch* buffer
> 
> (require 'org-install)
> (setq org-capture-templates
> '(("h" "Journal headline" entry (file+datetree "/tmp/journal.org"))
>   ("n" "Journal note" plain (file+datetree "/tmp/journal.org"
> 
> ; follow this sequence
> 
> M-x org-agenda
> a ; for current week or day agenda
> k c   ; agenda action for capture
> h ; to add a headline entry in journal for today
> [...] ; add some text and C-c C-c to save
> k c   
> n ; add a note in journal for today
> [...] ; add some text and save
> b ; back one week
> k c 
> h ; add a headline entry in journal for one week ago
> [...] 
> b ; go back one more week
> k c
> n ; add a note in journal for two weeks ago
> [...]
> 
> Look at the journal file created.
> 
> I would expect to see a date tree with a note entry under the
> date two weeks ago, a headline entry under the date one week ago
> and a note and headline entry under today's date.
> 
> What I see is the date tree correctly constructed.  The note and
> headline under today's date are correct filed.  The headline
> entry from one week ago is correctly filed.  The date headline
> from two weeks ago is correctly created but the text of the note
> entry itself is wrongly appended at the end of the file under
> today's date.
> 
> That doesn't seem right to me.
> 
> Thanks,
> 
> Phil
> 
> Emacs  : GNU Emacs 24.0.50.3 (x86_64-apple-darwin10.6.0, NS 
> apple-appkit-1038.35)
> of 2011-02-17 on bo
> Package: Org-mode version 7.5 (release_7.5.135.g7021f.dirty)
> 
> current state:
> ==
> (setq
> org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
> org-speed-command-hook '(org-speed-command-default-hook 
> org-babel-speed-command-hook)
> org-metaup-hook '(org-babel-load-in-session-maybe)
> org-capture-templates '(("h" "Journal headline" entry (file+datetree 
> "~/tmp/journal.org"))
>("n" "Journal note" plain (file+datetree 
> "~/tmp/journal.org")))
> org-after-todo-state-change-hook '(org-clock-out-if-current)
> org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup)
> org-export-latex-format-toc-function 'org-export-latex-format-toc-default
> org-tab-first-hook '(org-hide-block-toggle-maybe 
> org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe)
> org-src-mode-hook '(org-src-babel-configure-edit-buffer 
> org-src-mode-configure-edit-buffer)
> org-confirm-shell-link-function 'yes-or-no-p
> org-export-first-hook '(org-beamer-initialize-open-trackers)
> org-agenda-before-write-hook '(org-agenda-add-entry-text)
> org-babel-pre-tangle-hook '(save-buffer)
> org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers 
> org-cycle-show-empty-lines
> org-optimize-window-after-visibility-change)
> org-export-preprocess-before-normalizing-links-hook 
> '(org-remove-file-link-modifiers)
> org-mode-hook '((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-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
> org-babel-execute-safely-maybe)
> org-confirm-elisp-link-functi

[O] seeking paid org-mode consultant

2011-04-06 Thread green.green758
Hi,

Is anyone out there willing to give me private org mode support / advice
consultation?  I can pay via pay pal, personal check in the mail or am open
to other payment forms.

Here is the ideal person:

-  very familiar with org-mode
-  low hourly rate
- able to view my desktop remotely
- familiar with mac os-x and its interaction with org-mode
- knowledgeable of unix/linux and emacs
- able to hold my hand while I move from MacMail to terminal mailer such as
one that lives in emacs, mutt, etc.
- available live (e.g. via phone / skype) from a time that significantly
overlaps with approx 10am to 12pm California time (that's approx 6pm to 8am
GMT).
- familiar with GTD workflow / philosophy etc
- proficient in English

You don't have to fit the above perfectly.

If you are interested, please email me back, tell me a little about
yourself.  Send me your resume / CV if easy.  And an estimate of your hourly
rate in US $.

I am a technically proficient research scientist at a major US university.
For example, I am proficient enough in unix to know what "awk -F/, '{print
$1 " " $3}' foo.csv" means or able to transpose a matrix in R and able to
write my own emacs macros.

You might say, hey, rather than pay money, I could post my questions to this
mailing list?  However, etiquette requires due diligence -- searching,
experimentation, manual reading etc *before* posting.  For me, this is a
slow process.  I am finding that these days I just have too many demands on
my time to perform the due diligence.  Result: months go by and I just don't
ask the question and am stuck with using only the simplest of all org-mode
capabilities  I think I have uncovered various bugs but can't report them
because ensuring that they are a bug requires a lot of time.  For this
reason I am hoping to use money to help me break through these time-related
barriers.

Thanks!

Enthusiastic Org-Mode Newbie

p.s. I searched the manual and faq for the word "consult" and also did some
cursory searching on this mailing list before posting.