[O] [BUG] problem exporting example block to html

2011-06-05 Thread Nick Dokos
Exporting the following to html:

--8---cut here---start-8---

* foo

#+begin_example
#+TITLE: foo
* One

One

* Two

Euler says:

#+begin_latex
\[
\int_0^\infty e^{-x^2} dx = {{\sqrt{\pi}} \over {2}}
\]
#+end_latex
#+end_example
--8---cut here---end---8---

deletes the latex section. The problem is that in
org-export-preprocess-string, by the time that we get to
org-export-select-backend-specific-text(), the example has been wrapped in
BEGIN_HTML/END_HTML and the begin_example/end_example have been translated
into pre//pre. org-export-select-backend-specific-text() then blindly
deletes the latex section since it does not belong to the html backend,
not realizing that it is part of a literal example.

There is also a bug in the latex backend: although the example, including
most of the latex section, is wrapped inside a verbatim environment,
the #+end_latex line has been eaten up - I haven't checked by whom.

GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.22.0) of 
2011-04-13
Org-mode version 7.5 (baseline.265.gcfb05)

Nick



[O] Corrections for org mode manual

2011-06-05 Thread Julian Gehring
Hey,

while reading through the org mode manual I found some lines that could
require minor corrections.

I attached a patch file with corrections
('0001-add-corrections-to-org-manual.patch'), as well as one with
suggestions ('0001-add-suggestions-to-org-manual.patch') that are more
of a matter of style.

If there are any questions or comments, please let me know. I will have
a look at the remaining chapters as soon as possible.

Best
Julian
From 18eb49c49439c7664e4179e28f4213954c5e7c8c Mon Sep 17 00:00:00 2001
From: Julian Gehring julian.gehr...@googlemail.com
Date: Sat, 4 Jun 2011 23:07:41 +0200
Subject: [PATCH] add corrections to org manual

---
 doc/org.texi |   32 +---
 1 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index eb97759..182219e 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -4025,7 +4025,7 @@ called ``habits''.  A habit has the following properties:
 You have enabled the @code{habits} module by customizing the variable
 @code{org-modules}.
 @item
-The habit is a TODO, with a TODO keyword representing an open state.
+The habit is a TODO item, with a TODO keyword representing an open state.
 @item
 The property @code{STYLE} is set to the value @code{habit}.
 @item
@@ -4941,7 +4941,7 @@ optional.  The individual parts have the following meaning:
 @var{property}@r{The property that should be edited in this column.}
 @r{Special properties representing meta data are allowed here}
 @r{as well (@pxref{Special properties})}
-@var{title} @r{The header text for the column. If omitted, the property}
+@var{title}   @r{The header text for the column. If omitted, the property}
 @r{name is used.}
 @{@var{summary-type}@}  @r{The summary type.  If specified, the column values for}
 @r{parent nodes are computed from the children.}
@@ -6131,7 +6131,7 @@ not started at exactly the right moment.
 @kindex ;
 
 Calling @code{org-timer-set-timer} from an Org-mode buffer runs a countdown
-timer.  Use @key{;} from agenda buffers, @key{C-c C-x ;} everwhere else.
+timer.  Use @kbd{;} from agenda buffers, @kbd{C-c C-x ;} everwhere else.
 
 @code{org-timer-set-timer} prompts the user for a duration and displays a
 countdown timer in the modeline.  @code{org-timer-default-timer} sets the
@@ -6999,7 +6999,7 @@ Lift the restriction.
 @cindex agenda dispatcher
 @cindex dispatching agenda commands
 The views are created through a dispatcher, which should be bound to a
-global key---for example @kbd{C-c a} (@pxref{Installation}).  In the
+global key---for example @kbd{C-c a} (@pxref{Activation}).  In the
 following we will assume that @kbd{C-c a} is indeed how the dispatcher
 is accessed and list keyboard access to commands accordingly.  After
 pressing @kbd{C-c a}, an additional letter is required to execute a
@@ -8396,7 +8396,7 @@ version of some agenda views to carry around.  Org-mode can export custom
 agenda views as plain text, HTML@footnote{You need to install Hrvoje Niksic's
 @file{htmlize.el}.}, Postscript, PDF@footnote{To create PDF output, the
 ghostscript @file{ps2pdf} utility must be installed on the system.  Selecting
-a PDF file with also create the postscript file.}, and iCalendar files.  If
+a PDF file will also create the postscript file.}, and iCalendar files.  If
 you want to do this only occasionally, use the command
 
 @table @kbd
@@ -8940,8 +8940,8 @@ If the syntax for the label format conflicts with the language syntax, use a
 @code{-l} switch to change the format, for example @samp{#+BEGIN_SRC pascal
 -n -r -l ((%s))}.  See also the variable @code{org-coderef-label-format}.
 
-HTML export also allows examples to be published as text areas, @xref{Text
-areas in HTML export}.
+HTML export also allows examples to be published as text areas (@xref{Text
+areas in HTML export}).
 
 Because the @code{#+BEGIN_...} and @code{#+END_...} patterns need to be added
 so often, shortcuts are provided using the Easy Templates facility
@@ -9641,8 +9641,8 @@ language, but with additional support for tables.
 @table @kbd
 @orgcmd{C-c C-e h,org-export-as-html}
 @cindex property, EXPORT_FILE_NAME
-Export as HTML file @file{myfile.html}.  For an Org file @file{myfile.org},
-the ASCII file will be @file{myfile.html}.  The file will be overwritten
+Export as HTML file.  For an Org file @file{myfile.org},
+the HTML file will be @file{myfile.html}.  The file will be overwritten
 without warning.  If there is an active region@footnote{This requires
 @code{transient-mark-mode} be turned on.}, only the region will be
 exported. If the selected region is a single tree@footnote{To select the
@@ -10057,8 +10057,8 @@ sections.
 @table @kbd
 @orgcmd{C-c C-e l,org-export-as-latex}
 @cindex property EXPORT_FILE_NAME
-Export as @LaTeX{} file @file{myfile.tex}.  For an Org file
-@file{myfile.org}, the ASCII file will be @file{myfile.tex}.  The file will
+Export as @LaTeX{} file.  

Re: [O] [Orgmode] S5 export

2011-06-05 Thread Rustom Mody
Hey Eric!

Thanks for epresent -- just heard of it and tried it.
Nice on the whole but it seems to mark my file as read -- Intended?

Rusi


Re: [O] git useage question

2011-06-05 Thread Rustom Mody
Jude DaShiell wrote:
 The only place microemacs might be by now could be some orphan version of
the simtel archives.  Taken down but last I
 knew not entirely removed from the internet.

Does not seem to match the data here
http://git.kernel.org/?p=editors/uemacs/uemacs.git;a=summary
Note the dates (and the owner)


Re: [O] [OT] feature request: changing the way numeric priorities are calculated

2011-06-05 Thread Jambunathan K

Samuel

Someone has gotta speak.

1. Please quote the relevant text in your replies.

2. If you really intend to help may be you should add more words to your
   text. I feel your replies are Latin to me. I do think many feel
   likewise. Save your precious key strokes for the nth problem that you
   yourself will report in the future but wouldn't condescend to debug
   yourself.

Jambunathan K.
-- 



Re: [O] [OT] feature request: changing the way numeric priorities are calculated

2011-06-05 Thread Jambunathan K
Jambunathan K kjambunat...@gmail.com writes:

 Samuel

 Someone has gotta speak.

 1. Please quote the relevant text in your replies.

 2. If you really intend to help may be you should add more words to your
text. I feel your replies are Latin to me. I do think many feel
likewise. Save your precious key strokes for the nth problem that you
yourself will report in the future but wouldn't condescend to debug
yourself.


So refrain from replying to other's maladies.

 Jambunathan K.



Re: [O] git useage question

2011-06-05 Thread Jude DaShiell
uemacs is not microemacs those are two entirely different products and 
Daniel Lawrence was responsible for microemacs.  Not only that for 
screen reader users in dos, uemacs wrote to the screen incorrectly and 
too fast for screen readers to speak.  

On Sun, 5 Jun 2011, Rustom Mody wrote:

 Jude DaShiell wrote:
  The only place microemacs might be by now could be some orphan version of
 the simtel archives.  Taken down but last I
  knew not entirely removed from the internet.
 
 Does not seem to match the data here
 http://git.kernel.org/?p=editors/uemacs/uemacs.git;a=summary
 Note the dates (and the owner)
 





[O] inlining an external css file

2011-06-05 Thread Rustom Mody
I am trying to inline a css file into the org generated html

In my org file

#+STYLE: style123
#+INCLUDE:  mystyle.css
#+STYLE: /style456

The html generated shows
style123
/style456

ie the INCLUDE seems to have been silently skipped


[O] TAB not working on example line : ?

2011-06-05 Thread Xin Shi
Hello Experts,

I'm using orgmode 7.5 on Emacs 23.3. The TAB key used to work on version
7.3, where a line like the following:

* Section One

  The text

 : this is the example line   -- If I use TAB here, this line
will be aligned to The text in the above line.

However, in the 7.5, it's no longer working this way.

Any suggestions or explanations?

Thanks!

Xin


Re: [O] [Orgmode] S5 export

2011-06-05 Thread Eric Schulte
Rustom Mody rustompm...@gmail.com writes:

 Hey Eric!

 Thanks for epresent -- just heard of it and tried it.
 Nice on the whole but it seems to mark my file as read -- Intended?

 Rusi

Hi Rusi,

I've noticed the marking of presented buffers as modified as well.  I
believe this is a result of one of the Org-mode functions called to
prettify the buffer (e.g., adding latex equation and image overlays).

I've just pushed up a change which unsets this flag at the beginning of
a presentation.  This way, if you edit during a presentation then the
buffer will appear to be modified, but if you are only presenting (not
editing) then the buffer should appear unmodified when the presentation
is ended.

Cheers -- Eric

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



Re: [O] [babel] [PATCH] Fix sh block execution in session

2011-06-05 Thread Eric Schulte
Hi Julien,

Thanks for this patch, the current method of waiting for output in shell
code blocks could certainly use improvement.  After a series of simple
tests I can confirm that this does appear to work for me.  I have a
couple of questions.

1. do you have a minimal example of a shell code block which works after
   your patch but not before?

2. I assume that the changes to ob-comit were required for your ob-sh
   changes to work and were not intended to affect other languages?

3. When switching the order of the prompt and eoe check in ob-comint,
   did you try *only* looking for the eoe indicator?  It seems to me
   that once that is present the check for a followup prompt may not be
   required and it may make sense to simply remove that code.

All in all I agree that the ob-sh changes look like an improvement and
should be applied.  I'm less sure of the changes to ob-comint, simply
because I don't understand the mechanism through which swapping the
regexp checks changes behavior.  However if the ob-sh changes depend
upon the ob-comint changes there is no point in applying them piecemeal.

Situations like this (innocuous looking changes with potentially
wide-ranging potential implications) make me wish Babel had a more
mature and better-maintained test suite.

Thanks -- Eric

Julien Barnier jul...@nozav.org writes:

 Hi,

 When evaluating shell code blocks in org-babel, the execution seems to hang
 indefinitely. The following patch is trying to fix this problem by modifying
 the way shell code is send to comint and the way the end-of-evaluation
 indicator is looking for.

 As I am far from an emacs lisp expert and as the patch modifies the widely use
 org-babel-comint-with-output function, it certainly needs some testing. I've
 made some tests with shell and R code blocks, but I'm not sure it's enough.

 Thanks !

 Julien


 Fix sh block execution in a session

 * lisp/ob-sh.el (org-babel-sh-evaluate) : when sending input to comint, wait
 until previous line execution is finished
 * lisp/ob-comint.el (org-babel-comint-with-output) : when looking for
 end-of-evaluation indicator, search forward for the indicator before searching
 forward for the prompt
 ---
  lisp/ob-comint.el |4 ++--
  lisp/ob-sh.el |8 +++-
  2 files changed, 9 insertions(+), 3 deletions(-)

 diff --git a/lisp/ob-comint.el b/lisp/ob-comint.el
 index d12ed47..21ff0f6 100644
 --- a/lisp/ob-comint.el
 +++ b/lisp/ob-comint.el
 @@ -93,9 +93,9 @@ or user `keyboard-quit' during execution of body.
 (goto-char comint-last-input-end)
 (not (save-excursion
(and (re-search-forward
 -comint-prompt-regexp nil t)
 +(regexp-quote ,eoe-indicator) nil t)
 (re-search-forward
 -(regexp-quote ,eoe-indicator) nil t)
 +comint-prompt-regexp nil t)
  (accept-process-output (get-buffer-process (current-buffer)))
  ;; thought the following this would allow async
  ;; background running, but I was wrong...
 diff --git a/lisp/ob-sh.el b/lisp/ob-sh.el
 index 10c08d4..b2d1591 100644
 --- a/lisp/ob-sh.el
 +++ b/lisp/ob-sh.el
 @@ -170,7 +170,13 @@ return the value of the last statement in BODY.
   (session org-babel-sh-eoe-output t body)
 (mapc
  (lambda (line)
 -  (insert line) (comint-send-input nil t) (sleep-for 0.25))
 +  (insert line)
 +  (comint-send-input nil t)
 +  (while (save-excursion
 +   (goto-char comint-last-input-end)
 +   (not (re-search-forward
 + comint-prompt-regexp nil t)))
 +(accept-process-output (get-buffer-process (current-buffer)
  (append
   (split-string (org-babel-trim body) \n)
   (list org-babel-sh-eoe-indicator

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



Re: [O] TAB not working on example line : ?

2011-06-05 Thread Nicolas Goaziou
Hello,

Xin Shi shixin...@gmail.com writes:

 I'm using orgmode 7.5 on Emacs 23.3. The TAB key used to work on version
 7.3, where a line like the following:

 * Section One

   The text

  : this is the example line   -- If I use TAB here, this line
 will be aligned to The text in the above line.

 However, in the 7.5, it's no longer working this way.

According to the manual (11.3 Literal examples) :

For simplicity when using small examples, you can also start the
example lines with a colon followed by a space. There may also be
additional whitespace before the colon

This means indent function shouldn't remove the spaces you inserted at
the beginning of the line. I guess it allows examples to stand out this
way.

Regards,

-- 
Nicolas Goaziou



Re: [O] Academic Reference Workflows and recommendation of Bibdesk

2011-06-05 Thread Christian Moe

On 6/4/11 12:54 AM, Chao LU wrote:

Dear All,

Here I'd like to discuss my workflow for Academic reference and
recommend you Bibdesk.

I use iTune to manage all my mp3 files. Mp3 format has the ability to
store all the metadata into the file itself, and iTune offers a way to
modify and display certain kind of music according to the metadata.
Inspired by this, I was looking for similar way to organize all the
academic references and even to build a personal digital library. I've
tried a lot of softwares, Mendeley, Zotero, Papers, Endnote, Org-mode,
Yep, BibDesk...

My feeling is that, Org could get this done, but BibDesk does a better
job.


Then you should probably use BibDesk? It depends on whether it's more 
important for you to use the best tool for each part of the job, or to 
do as many parts of the job as possible in the same Org environment. 
If the job is managing references, then the best tool is likely to be 
a dedicated reference manager.


Org-mode has ample general-purpose functionality that can be used to 
manage academic references (and recent changes to org-bibtex have made 
this option more attractive). But it was not designed as a dedicated 
tool for this purpose.


Org-mode integrates quite smoothly with BibTeX, and it can be 
integrated with stand-alone reference managers (I don't have an 
overview, but I know about various partial solutions for Zotero, such 
as Fireforg and Erik Hetzner's Zotero-plain).



To check in an entry such as org-manual-7.5.pdf to the library, one
could do:

Library.org
-
#+LINK: pdf file:./Emacs/%s.pdf
#+LINK: txt file:./Emacs/%s.txt

 (...snip...)

Location: [[pdf:org-manual-7.5]]

Then use org-attach to get the file settle down in the right place.



It seems superfluous to define two different link types for pdf and 
text files when the links don't do anything differently and don't save 
typing.


And if you have archived the file, then the link is in principle 
superfluous (especially if you have one attachment per ID'd entry), 
since you can open the current entry's attachment(s) with `C-c C-a o'.



However this process is quite time consuming, and non-intuitive. I
prefer the features provided in iTune, Papers2, Bibtex, which could
provide thumbnail and quicklooks of the files.


Those are two different issues.


*2. the Bibdesk way:*
Now I'd like to recommend BibDesk here.

First of all it's free, open resource. Its database file is just an
bibtex file, so all the records is in plain text, even the thumbnails
are stored inside this bibtex file. like below,
===
Bdsk-File-1 = {YnBsaXN0MDDUAQIDBAUIJidUJHRvcFgkb2JqZWN0c1gk(It's
very long png source code, so I abridged here)}
===

Second, Bibdesk has a much more intuitive UI, and thumbnails are
provided. It also support keywords, smart groups...


Tags?


Moreover, Bibdesk has a great feature called autofile, which could
attach the file to certain directories (and build the directories
structures you want as well!) Here is the example:


In Org, you can specify the attachment directory of your choice in the 
ATTACH_DIR property of the entry. If the path does not exist, it will 
be created when an attachment is made. You can set the ATTACH_DIR 
property with `C-c C-a s'. This seems to do everything the autofile 
feature you describe can do, perhaps at the expense of a couple of 
extra keystrokes of typing per entry.




  I do think that BibDesk has great features to investigate, such as
create the record from the bibtex and embed the picture inside the
bibtex itself.


As Matt Lundin already mentioned, Eric Schulte has recently provided a 
user-friendly way to convert between BibTeX and Org records. See 
org-bibtex.el in the development version or


https://github.com/eschulte/org-bibtex/blob/master/org-bibtex.el

If you need thumbnails, someone could probably cobble up a way to add 
them with, say, ImageMagick (for PDFs at least; and for .txt or .html 
documents, maybe text excerpts would be just as helpful?).



But if you like both Bibdesk and Org-mode, the more interesting 
question is probably how you can integrate the two.


Yours,
Christian



Re: [O] TAB not working on example line : ?

2011-06-05 Thread Xin Shi
Thank you Nicolas!

Xin


On Sun, Jun 5, 2011 at 11:46 AM, Nicolas Goaziou n.goaz...@gmail.comwrote:

 Hello,

 Xin Shi shixin...@gmail.com writes:

  I'm using orgmode 7.5 on Emacs 23.3. The TAB key used to work on version
  7.3, where a line like the following:
 
  * Section One
 
The text
 
   : this is the example line   -- If I use TAB here, this
 line
  will be aligned to The text in the above line.
 
  However, in the 7.5, it's no longer working this way.

 According to the manual (11.3 Literal examples) :

For simplicity when using small examples, you can also start the
example lines with a colon followed by a space. There may also be
additional whitespace before the colon

 This means indent function shouldn't remove the spaces you inserted at
 the beginning of the line. I guess it allows examples to stand out this
 way.

 Regards,

 --
 Nicolas Goaziou



Re: [O] Academic Reference Workflows and recommendation of Bibdesk

2011-06-05 Thread Eric Schulte

 As Matt Lundin already mentioned, Eric Schulte has recently provided a
 user-friendly way to convert between BibTeX and Org records. See
 org-bibtex.el in the development version or

 https://github.com/eschulte/org-bibtex/blob/master/org-bibtex.el


This functionality has now been moved into the core of Org-mode, so if
you are running the latest Org-mode these bibtex functions are already
loaded on your system, simply tab complete function names starting with
org-bibtex- to see the available options.

Best -- Eric

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



Re: [O] git useage question

2011-06-05 Thread Achim Gratz
Jude DaShiell jdash...@shellworld.net writes:

 I wouldn't be writing this if the documentation were reasonable.  Once 
 org-mode gets cloned, how is git properly used to update the cloned 
 instance on a machine?

If you set up the clone correctly (assuming you use a local branch for
keeping your customizations to the Makefile), all you need to do is

$ git pull  make clean  make install

But there's literally hundreds of different ways to configure things
depending on what you want to do.  Please check the orgmode FAQ if one
of the recipes for using Git+Orgmode there does what you want,
otherwise you will have to learn about Git first (or in parallel).  If
you want to experiment with Git, you can always do another clone locally
so you have something to play with that can be thrown away if you mess
it up.


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

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




Re: [O] feature request: changing the way numeric priorities are calculated

2011-06-05 Thread Filippo A. Salustri
Could you explain (alpha-org-entry-priority-letter sg), and where you
would use alpha-org-priority-score.
Also, while I see what you're doing in the code, I would prefer
something not so rigid (i.e. expecting only 3 levels of priority and
having the values for those priorities hardwired into the code).
Cheers.
Fil

On 5 June 2011 00:26, Samuel Wales samolog...@gmail.com wrote:
 I do

 (defun alpha-org-priority-score (optional sg)
  (case (alpha-org-entry-priority-letter sg)
    (?A 2)
    (?B 0)
    (?C -1)
    (t (error Case exhausted for priority

 --
 The Kafka Pandemic: http://thekafkapandemic.blogspot.com
 I support the Whittemore-Peterson Institute (WPI)
 ===
 Extreme bigotry against people with deadly serious diseases is still
 extreme bigotry.




-- 
\V/_
Filippo A. Salustri, Ph.D., P.Eng.
Mechanical and Industrial Engineering
Ryerson University
350 Victoria St, Toronto, ON
M5B 2K3, Canada
Tel: 416/979-5000 ext 7749
Fax: 416/979-5265
Email: salus...@ryerson.ca
http://deseng.ryerson.ca/~fil/



Re: [O] [OT] feature request: changing the way numeric priorities are calculated

2011-06-05 Thread Carsten Dominik

On 5.6.2011, at 13:11, Jambunathan K wrote:

 
 Samuel
 
 Someone has gotta speak.
 
 1. Please quote the relevant text in your replies.
 
 2. If you really intend to help may be you should add more words to your
   text. I feel your replies are Latin to me. I do think many feel
   likewise. Save your precious key strokes for the nth problem that you
   yourself will report in the future but wouldn't condescend to debug
   yourself.

Hi Jambunatan (and others who are not aware of this),

Samuel has, IIUC, a severe illness which limits his ability
to write extended amounts of text.  We (I certainly, but I
think many others) have come to accept that his mails are
not always easily understandable without some effort
and looking for context in the thread.  I ignore the
ones I cannot grasp.  I good moments, Samuel is a clear
thinker who has contributed many ideas and bug reports for
many years.  If you look back in the archives you will
be able to appreciate this.

With kind regards

- Carsten




[O] [PATCH] Bugfix for alignment of tag next to header name

2011-06-05 Thread Michael Brand
* org.el (org-align-tags-here): Correct calculation of alignment.

With org-tag-column set to e. g. 0 and before this change: Adding a
tag to an untagged heading placed the tag with a distance of 1 space
behind the heading name like expected. After editing the heading name
the distance was expected to remain 1 space but changed to 2 spaces.

TINYCHANGE

Michael


0001-Bugfix-for-alignment-of-tag-next-to-header-name.patch
Description: Binary data


[O] [OT] Icon problem with org-google-weather

2011-06-05 Thread Nick Dokos
This is off-topic but it is driving me bananas. I do

--8---cut here---start-8---
(setq date '(6 5 2011))
(6 5 2011)
(setq foo (let ((org-google-weather-cache-time 0))
  (org-google-weather)))
(setq bar (org-google-weather))
(equal foo bar)
(insert foo)
(insert bar)
--8---cut here---end---8---

in the *scratch* buffer. The idea is that foo is freshly obtained from
google every time: it never goes to cached data since the cache time is
set to 0. bar, otoh, is obtained from cache.  I've traced the code and
that's indeed what happens.  The two strings compare equal: (equal foo bar)
returns t - just in case, I also displayed them in separate windows and
did a compare-windows: they are the same that way too.

Nevertheless, when I insert foo, the icon is shown, but when I insert
bar, the icon is an empty box. What am I missing?

Thanks,
Nick