Re: [O] Bug: Formatting URL labels does not works with LaTeX export

2012-03-27 Thread Daniel Dehennin
Bastien  writes:

> Hi Daniel,
>
> Daniel Dehennin  writes:
>
>> When comparing different exports, I found a possible bug when formatting
>> the label of URLs:
>
> Can you clearly state what the problem is?

Sorry, the problem is the output of literal OrgMode formatting
characters in LaTeX which could be misinterpreted for PDF generation.

I get links in my PDF labeled:

- literal output "/Org-Mode/" and "=Org-Mode="
- miinterpreted "rg-Mode"

The formatting in URLs labels is managed for HTML, I was
expecting something like the following for LaTeX:

#+begin_src latex
\href{http://orgmode.org}{\emph{Org-Mode}}

\href{http://orgmode.org}{\verb=Org-Mode=}

\href{http://orgmode.org}{\underline{Org-Mode}}
#+end_src

Or at least, stripping the formatting characters to prevent clash with
LaTeX processing.

Regards.
-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x7A6FE2DF


pgpV5MLjCtncf.pgp
Description: PGP signature


Re: [O] GSoC 2012 -- Elisp backend for Ragel

2012-03-27 Thread Achim Gratz
Aurélien Aptel  writes:
> Ragel is written in C++ and has no dependency.

It depends on having a working C++ compiler (presumably with some list
of features / standard conformance).

> * every major platform has a C++ compiler

Yes, but it may not be installed.  Or has the wrong version.  Or
whatever.

> * ragel input along with generated code can be tracked in the repo

It is a bad idea(TM) to track both the sources and the result of a
generation from that source in the same repo.  That other projects are
doing that doesn't mean we should follow their example.

> * the generated code is portable since it's elisp (doesn't need to be
> regenerated on different platforms)
> * the parser is a confined part of org-mode
>
> I don't think this is a problem.

It may not be a problem for you.  It probably isn't for me.  I'm still
not saying it won't be a problem for every org-mode user.  You need to
think about possible problems from the user perspective.

>> Which is just as easily done by specifying the syntax incorrectly.
>
> I think the fix will be shorter and simpler in the syntax because it's
> easier to reason on an abstract definition when it comes to language.
> When you're neck-deep in your handwritten implementation trying to
> figure what you did wrong, it can take a long time.

Please have a look at Nicolas' code first before making such statements.
I haven't seen ragel output, especially not in ELisp and I don't know
how easy it will be to debug parse errors.  The other thing to keep in
mind is that org-mode doesn't have a formal syntax description, much
less one that follows one of the standard grammars.  This will be a much
bigger fish to fry then 

>> No, you can (for a suitably restricted set of languages) formally proof
>> that the implementation and the specification is identical for any
>> input.
>
> How would you do that programmatically?

Fundamentally?  By induction.

>> The assumption that an FSM running in ELisp is faster than a bunch of
>> regexp has not been actually tested or has it?
>
> I haven't tested anything yet.
> If I remember correctly, the emacs regex API doesn't provide a way to
> compile patterns and thus have to be compiled at each call.

I haven't checked.  But all this happens in machine code, not ELisp, so
it is not clear on whether a re-implementation of the regex engine, even
if it is vastly superior to the one Emacs uses now would be a net win.

> Also the underlying FSM implementation uses NFA which can lead to a
> exponential complexity in time [1] for certain patterns.

That trait is shared by all regex engines that allow backreferences.


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

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




Re: [O] Problems running C code in org-mode under Windows

2012-03-27 Thread Richard Stanton
> I think the "Access is denied" problem is probably the same as that listed
> here:
> 
> http://lists.gnu.org/archive/html/help-gnu-emacs/2010-04/msg00247.html
> 
> Unfortunately, when I switch to using bash as my shell under Windows, this
> causes problems with python-mode (though this is not really your
> problem...) This change does get the compilation to work on my machine,
> however, and a .exe file is created. So far so good...
> 
> However, the output still appears blank in the org buffer. More tracing
> required...

One problem - when using bash as the shell, when trying to execute the compiled 
file, it tries to execute the empty file, not the file that was just compiled 
(which has the same name, but the extension .exe, added by the compiler). 

A partial solution to this is to append ".exe" to the name of the binary temp 
file if running under Windows. E.g., start org-babel-C-execute something like 
this:

(defun org-babel-C-execute (body params)
  "This function should only be called by `org-babel-execute:C'
or `org-babel-execute:C++'."
  (let* ((tmp-src-file (org-babel-temp-file
"C-src-"
(cond
 ((equal org-babel-c-variant 'c) ".c")
 ((equal org-babel-c-variant 'cpp) ".cpp"
 (tmp-bin-file (org-babel-temp-file 
"C-bin-"
(if (equal system-type 'windows-nt) ".exe" "")))

[...]

I say "partial solution" because the output in the org file is *still* blank, 
but at least the program does get run this way...

One question - why create a temp file for the executable before running the 
compilation? Why not just have it created by the compiler?



Re: [O] org-log-note-headings 'state

2012-03-27 Thread John J Foerch
Bastien  writes:
> Hi John,
>
> John J Foerch  writes:
>
>> These thoughts lead me to suggest that maybe org-log-note-headings is no
>> longer sufficient to its original purpose, because extensions wish to
>> parse state changes, but that blocks users from configuring the formats.
>> Perhaps it is time to replace it with something that guarantees ability
>> to parse.
>
> I see the problem -- what do you suggest as a useful replacement for
> `org-log-note-headings'? 
>
>> Thoughts?
>
> I understand your point but I need more arguments to spend time on 
> improving this.  "Argument" = code that we would like to run and that
> would need a rewrite of `org-log-note-headings'.
>
> Thanks!

I have been experimenting with parsing the format-string to build a
regexp to match the generated-strings.  This approach depends upon the
parsability of the expansions of each of the percent-codes.  As concerns
org-log-note-headings, %t, %T, %d, %D, %s, %S, and %u all have parseable
expansions, as far as I can tell.  I'm not sure about %U, but if the
rest of the string is not too complicated, it shouldn't be a problem.
Format-code flag, width, and precision add some complexity to the
problem of generating regexps to match the codes, and I haven't done
that bit yet.  Overall I think this could be a very viable approach, and
I'll paste my scraps of code below:

;;; parsing state changes
;;;
(defun org-split-format-string (str)
  (let ((case-fold-search t)
(format-regexp "%[+ #-0]*[0-9]*\\(\\.[0-9]+\\)?[%a-z]")
(parts (list))
(s 0))
(while (string-match format-regexp str s)
  (let* ((beg (match-beginning 0))
 (end (match-end 0))
 (before (substring str s beg)))
(unless (string= before "")
  (push before parts))
(push (substring str beg end) parts)
(setq s end)))
(let ((last (substring str s)))
  (unless (string= last "")
(push last parts)))
(nreverse parts)))

;;tests
(equal (org-split-format-string "CLOSING NOTE %t") '("CLOSING NOTE " "%t"))
(equal (org-split-format-string "State %-12s from %-12S %t") '("State " "%-12s" 
" from " "%-12S" " " "%t"))
(equal (org-split-format-string "foo %t bar") '("foo " "%t" " bar"))
(equal (org-split-format-string "foo") '("foo"))
(equal (org-split-format-string "%s") '("%s"))
(equal (org-split-format-string "%s%t") '("%s" "%t"))

(defun org-get-format-parser (f)
  (let ((format-regexp "^%\\([+ 
#-0]*\\)\\([0-9]*\\)\\(\\.[0-9]+\\)?\\([%a-z]\\)$"))
(string-match format-regexp f)
(let ((flag (match-string 1 f))
  (numb (match-string 2 f))
  (prec (match-string 3 f))
  (code (match-string 4 f)))
  (cond
;; hardcode format codes for now.. later, pass them in as an
;; alist or something.
((string= "t" code) "\\(\\[.*?\\]\\)") ;; inactive timestamp
((string= "T" code) "\\(<.*?>\\)") ;;   active timestamp
((string= "d" code) "\\(\\[.*?\\]\\)") ;; inactive short-format 
timestamp
((string= "D" code) "\\(<.*?>\\)") ;;   active short-format 
timestamp
((string= "s" code) "\\(\".*?\"\\)")   ;; new TODO state
((string= "S" code) "\\(\".*?\"\\)")   ;; old TODO state
((string= "u" code) "\\(\\w+\\)") ;; user name
((string= "U" code) "\\(.*\\)") ;; full user name
(t (error "Unsupported format: %s" f))

(defun org-parse-formatted-text (fmt str)
  (let* ((sfmt (org-split-format-string fmt))
 (regexp (concat
  "^"
  (apply
   'concat
   (mapcar
(lambda (x)
  (if (equal ?% (aref x 0))
  (org-get-format-parser x)
  (regexp-quote x)))
sfmt))
  "$")))
regexp))

;; (org-parse-formatted-text "State %-12s from %-12S %t" "")
;; => "^State \\(\".*?\"\\) from \\(\".*?\"\\) \\(\\[.*?\\]\\)$"

;;;
;;; end parsing state changes

Thank you

-- 
John Foerch




Re: [O] [Bug] Regression w/ insert into tables in overwrite-mode

2012-03-27 Thread Bastien
Hi Achim,

Achim Gratz  writes:

> Achim Gratz  writes:
>
>> Commit 00040e7 by David Maus has introduced a regression when inserting
>> into org tables while overwrite mode is on.  For each character inserted
>> into a table cell, the cell (and the whole table row) gets shortened by
>> one character.
>>
>> If the change can not be reverted, the deletion must not
>> happen when overwrite mode is on, maybe through something like this:
>>
>>   (if (not overwrite-mode) (delete-char -1))
>
> The change cannot be reverted, since Emacs24 issues a compile-time
> warning about using delete-backward-char, even though that warning has
> been dropped from the doc string... so it needs to be protected or
> replaced by an org-specific version that honors overwrite mode.

I reverted David's change and replaced `delete-backward-char'
by `backward-delete-char', which isn't caught by the compiler*.

`backward-delete-char' is remapped to `delete-backward-char' 
by Emacs and `delete-backward-char' is remapped by Org to
`org-delete-backward-char'.

Thanks for your patience on this one!

* This looks weird that an alias isn't caught by the compiler, 
I'll let Emacs devs know about this.

-- 
 Bastien



Re: [O] Export of link with underscore does not work nicely

2012-03-27 Thread Bastien
Hi Daniel,

Daniel Dehennin  writes:

> Hello,
>
> I try to export the following as HTML and text but the output is not
> optimal:
>
> #+begin_src org
> This is the
> [[http://www.postgresql.org/docs/9.1/static/client-authentication.html][pg_hba.conf]]
> configuration file
> #+end_src
>
> With HTML export, the "hba" is subscript.
>
> Escaping it with a backslash works fine for HTML export but not for
> ASCII one.
>
> Is this intended or a bug?

Add this line to your file

#+OPTIONS: ^:{}

Have a look at the docstring of `org-use-sub-superscripts' for more
information. 

Best,

-- 
 Bastien



Re: [O] Bug: Formatting URL labels does not works with LaTeX export

2012-03-27 Thread Bastien
Hi Daniel,

Daniel Dehennin  writes:

> When comparing different exports, I found a possible bug when formatting
> the label of URLs:

Can you clearly state what the problem is?

Thanks,

-- 
 Bastien



Re: [O] Exporting org-bibtex links as \cite{} refs in Latex

2012-03-27 Thread Bastien
Hi Olivier,

Olivier Berger  writes:

> Something like :
> (defun org-bibtex-export (path desc format)
>   (let* ((search (when (string-match "::#?\\(.+\\)\\'" path)
>(match-string 1 path)))
>  (path (substring path 0 (match-beginning 0
> (cond ((eq format 'latex)
>(if (or (not desc)
>(equal 0 (search "bibtex:" desc)))
>(format "\\cite{%s}" search)
>  (format "\\cite[%s]{%s}" desc search))
>
> I think this can work (see more details in [0]), and maybe that wouldn't
> be too hard to patch org-bibtex for something more generic ?
>
> Is this reasonable ?

This is *very* reasonable and I would welcome a patch for such an 
export function.  

Thanks!

-- 
 Bastien



Re: [O] limitations of hard-coded field separator removed

2012-03-27 Thread Bastien
Hi Andreas,

Andreas Röhler  writes:

> attached a org-table-import.patch

Thanks for this patch.

I test it against latest master and got this error:

,
| Debugger entered--Lisp error: (wrong-type-argument stringp nil)
|   re-search-forward(nil # t)
|   (while (re-search-forward separator end t) (replace-match " | " t t))
|   (let* ((beg (min beg0 end0)) (end (copy-marker (max beg0 end0))) (separator 
(cond ((and separator (stringp separator)) separator) ((eq 4 
(prefix-numeric-value separator)) (read-from-minibuffer "Separator char: ") 
(goto-char beg) (unless separator (setq separator (org-guess-separator))) 
(goto-char beg) (while (re-search-forward separator end t) (replace-match " | " 
t t)) (goto-char beg) (org-table-align))
|   org-table-convert-region(14 57 nil)
|   call-interactively(org-table-convert-region t nil)
|   execute-extended-command(nil)
|   call-interactively(execute-extended-command nil nil)
`

Beside this problem...

> removes limitations of hard-coded separator char(s).
> `org-guess-separator' accepts and detects all chars as field separators.
> It works based on the assumption, that char looked for appears in equal
> number at each row.

This looks clever, but is it safe?  E.g. if cells of the table are
surrounded by double-quotes, you'll have the same number of quotes in
each row, but the double-quote char by itself is _not_ the separator.

So I'm not sure about this heuristics -- want to ear/test more.

> Also a default value
> `org-table-import-default-separator' should make
> guessing faster in some cases.

That an easier way and I would favor it: keep the current behavior, 
but add an option for a list of separators that the user can set.  
Org would then test this list sequentially.  

What do you think?

-- 
 Bastien



Re: [O] Org publish restrict to certain levels

2012-03-27 Thread Nick Dokos
Bastien  wrote:

> Hi Nick,
> 
> Nick Dokos  writes:
> 
> > Unfortunately, there is a bug in org-latex.el, in 
> > org-export-latex-subcontent
> >
> > ,
> > |   ((listp org-export-latex-low-levels)
> > |(if (string-match "% ends low level$"
> > |  (buffer-substring (point-at-bol 0) (point)))
> > |(delete-region (point-at-bol 0) (point))
> > |  (insert (car org-export-latex-low-levels) "\n"))   
> > org-export-latex-low-levels cannot be nil here: car will blow up
> > |(insert (format (nth 2 org-export-latex-low-levels)  
> > or here: format will blow up
> > |heading
> > |(if label (format "\\label{%s}" label) "")))
> > |(insert (org-export-latex-content content))
> > |(cond ((stringp subcontent) (insert subcontent))
> > |  ((listp subcontent) (org-export-latex-sub subcontent)))
> > |(insert (nth 1 org-export-latex-low-levels)
> > |" %% ends low level\n"))
> > | 
> > `
> 
> This is fixed -- you can now set `org-export-latex-low-levels' to nil,
> low levels won't be exported.
> 

Verified - thanks!

Nick



Re: [O] About org-babel menu

2012-03-27 Thread Bastien
Hi Rainer,

Rainer M Krug  writes:

> So I would see it as a useful way of promoting babel (and therefore
> org-mode) and also as a nice reminder of less frequently (but
> nevertheless usefull) functionality.

Agreed.  

Is anyone volunteering for listing the items in such a menu for Babel?

If so, I'm willing to implement this.  

I'm not convince we should have a menu item to (de)activate each
language though -- more a menu that exposes the basics.

Thanks,

-- 
 Bastien



Re: [O] Org publish restrict to certain levels

2012-03-27 Thread Bastien
Hi Nick,

Nick Dokos  writes:

> Unfortunately, there is a bug in org-latex.el, in org-export-latex-subcontent
>
> ,
> | ((listp org-export-latex-low-levels)
> |  (if (string-match "% ends low level$"
> |(buffer-substring (point-at-bol 0) (point)))
> |  (delete-region (point-at-bol 0) (point))
> |(insert (car org-export-latex-low-levels) "\n"))   
> org-export-latex-low-levels cannot be nil here: car will blow up
> |  (insert (format (nth 2 org-export-latex-low-levels)  
> or here: format will blow up
> |  heading
> |  (if label (format "\\label{%s}" label) "")))
> |  (insert (org-export-latex-content content))
> |  (cond ((stringp subcontent) (insert subcontent))
> |((listp subcontent) (org-export-latex-sub subcontent)))
> |  (insert (nth 1 org-export-latex-low-levels)
> |  " %% ends low level\n"))
> | 
> `

This is fixed -- you can now set `org-export-latex-low-levels' to nil,
low levels won't be exported.

Thanks,

-- 
 Bastien



Re: [O] Referencing a cell from a clockview table looks impossible

2012-03-27 Thread Bastien
Hi Sébastien,

"Sebastien Vauban"  writes:

> I just found the reason: it's because *the "Total time" is in bold*, with `*'
> before and after the total (for example: *3:33*).

You can now (>master) use `org-clock-total-time-cell-format' to 
format the total time cells.  The default format is "*%s*", the
same than before.

Thanks,

-- 
 Bastien



Re: [O] GSoC 2012 -- Elisp backend for Ragel

2012-03-27 Thread Bastien
Hi Aurélien,

Aurélien Aptel  writes:

> On Mon, Mar 26, 2012 at 6:01 PM, Bastien  wrote:
>>> Is it still hand written? If so, I think it's ultimately a bad idea
>>> and it should be rewritten using ragel.
>>
>> I guess that's because you're not fluent in english, but this sounds
>> a bit "peremptory".  We are not only interested in code, we are also
>
> Sorry I've made a bad impression or if my remarks feels a bit
> passive-agressive. It's harder (and longer) for me to write in
> english, yes :p

No problem!

>> interested in learning from each others.  That's what make this list
>> a nice place to live in.  If you have code or explanations you want
>> to share, please do!
>
> From my classes, I thought it was widely accepted that sufficiently
> complex parsers should now be written by a tool like ragel. But again
> I'm not experienced, I never had to parse a complex language.

Writing an Org parser with Ragel looks like an interesting project in
itself, theoretically speaking -- and you will find great minds around
that will follow and support your progress on this.

But for a GSoC project, we have to think in very practical terms ("how
will this improve the current code-base?)  Achim's remarks are good
ones.  And remember potential mentors are volunteers, the same ones 
that (try to) maintain Org everyday.

Anyway, I'm glad to learn about Ragel.  But as I said, my priority 
goes to anything that can help Nicolas parser (testing, learning, 
adding new backends, etc.)

Thanks,

-- 
 Bastien



Re: [O] #+ATTR_HTML ineffetive in recent org_mode?

2012-03-27 Thread Bastien
Copy'ing the list.

Matt Price  writes:

> hmm, anyone else see anything? I'm using org-mode form yesterday's
> git,
> Org-mode version 7.8.06 (release_7.8.06.147.gef0ab)
>
> and I've now tried w/ both a recent emacs snapshot,
>
> GNU Emacs 24.0.94.1 (x86_64-pc-linux-gnu, GTK+ Version 3.2.0) of
> 2012-03-05 on rosehip, modified by Debian
>
> and emacs23:
>
> GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10) of
> 2012-02-23 on crested, modified by Debian
>
> I have the same errors showing up in both.

Perhaps something in your config?  We don't have enough information to
reproduce the bug.  Also please use text for emails, that's really more
readable.

Thanks,

-- 
 Bastien



Re: [O] org-log-note-headings 'state

2012-03-27 Thread Bastien
Hi John,

John J Foerch  writes:

> These thoughts lead me to suggest that maybe org-log-note-headings is no
> longer sufficient to its original purpose, because extensions wish to
> parse state changes, but that blocks users from configuring the formats.
> Perhaps it is time to replace it with something that guarantees ability
> to parse.

I see the problem -- what do you suggest as a useful replacement for
`org-log-note-headings'? 

> Thoughts?

I understand your point but I need more arguments to spend time on 
improving this.  "Argument" = code that we would like to run and that
would need a rewrite of `org-log-note-headings'.

Thanks!

-- 
 Bastien



Re: [O] [patch] Need test: New method which is used to preview latex fragements

2012-03-27 Thread Feng Shu

Sorry, I change my name in commit from FengShu to Feng Shu.
Thanks for your help!


>From ef9c4ad164161c5dfde01dd5d8c3221163adb231 Mon Sep 17 00:00:00 2001
From: Feng Shu 
Date: Wed, 28 Mar 2012 07:40:04 +0800
Subject: [PATCH] Adding a new method for previewing latex fragements.

	* org-latex.el (org-latex-to-pdf-process): Get the latex fragements
	converting command(s) from this variable, now you can save your
	own latex fragments converting command(s) into this variable.

	* org-latex.el (org-export-as-pdf): Deal with the changes of
	'org-latex-to-pdf-process.

	* org.el (org-create-formula-image-program): New defcustom, which will be
	used to set the command converting pdf or dvi files to  png files.

	* org.el (org-create-formula-image): Change its name to
	'org-create-formula-image-with-dvipng.

	* org.el (org-create-formula-image-with-imagemagick): New function by
	which a latex fragment can be convert to a pdf file and then
	convert to a png file.

	* org.el (org-latex-color): New function, which will get an rgb color
	specification from default background or foreground, and using
	this specification, we can define a latex color.

	* org.el (org-latex-color-format): New fuction, which can translate a
	color-name to specification, and using this specification, we can define a
	latex color.

	* org.el (org-format-latex): Add 'imagemagick support.
	* org-exp.el (org-export-with-LaTeX-fragments): Add 'imagemagick support.
	* org-html.el (org-export-html-preprocess): Add 'imagemagick support.
---
 lisp/org-exp.el   |   15 +++--
 lisp/org-html.el  |1 +
 lisp/org-latex.el |   57 +++---
 lisp/org.el   |  174 -
 4 files changed, 205 insertions(+), 42 deletions(-)

diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 1ce..ccf2247 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -537,12 +537,14 @@ This option can also be set with the +OPTIONS line, e.g. \"LaTeX:mathjax\".
 
 Allowed values are:
 
-nilDon't do anything.
-verbatim   Keep everything in verbatim
-dvipng Process the LaTeX fragments to images.
-   This will also include processing of non-math environments.
-t  Do MathJax preprocessing if there is at least on math snippet,
-   and arrange for MathJax.js to be loaded.
+nil Don't do anything.
+verbatimKeep everything in verbatim
+dvipng  Process the LaTeX fragments to images.
+This will also include processing of non-math environments.
+imagemagick Convert the LaTeX fragments to pdf files and then use imagemagick 
+convert pdf files to png files
+t   Do MathJax preprocessing if there is at least on math snippet,
+and arrange for MathJax.js to be loaded.
 
 The default is nil, because this option needs the `dvipng' program which
 is not available on all systems."
@@ -552,6 +554,7 @@ is not available on all systems."
 	  (const :tag "Do not process math in any way" nil)
 	  (const :tag "Obsolete, use dvipng setting" t)
 	  (const :tag "Use dvipng to make images" dvipng)
+	  (const :tag "Use imagemagick to make images" imagemagick)
 	  (const :tag "Use MathJax to display math" mathjax)
 	  (const :tag "Leave math verbatim" verbatim)))
 
diff --git a/lisp/org-html.el b/lisp/org-html.el
index 2de2ea9..15a6c3e 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -685,6 +685,7 @@ The default is an extended format of the ISO 8601 specification."
   ((eq (plist-get parameters :LaTeX-fragments) 'verbatim) 'verbatim)
   ((eq (plist-get parameters :LaTeX-fragments) 'mathjax ) 'mathjax)
   ((eq (plist-get parameters :LaTeX-fragments) t) 'mathjax)
+  ((eq (plist-get parameters :LaTeX-fragments) 'imagemagick  ) 'imagemagick)
   ((eq (plist-get parameters :LaTeX-fragments) 'dvipng  ) 'dvipng)
   (t nil
   (goto-char (point-min))
diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index 4418dee..47be65d 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -632,11 +632,24 @@ allowed.  The default we use here encompasses both."
   '("pdflatex -interaction nonstopmode -output-directory %o %f"
 "pdflatex -interaction nonstopmode -output-directory %o %f"
 "pdflatex -interaction nonstopmode -output-directory %o %f")
-  "Commands to process a LaTeX file to a PDF file.
-This is a list of strings, each of them will be given to the shell
-as a command.  %f in the command will be replaced by the full file name, %b
-by the file base name (i.e. without extension) and %o by the base directory
-of the file.
+  "Commands to process a LaTeX file to a PDF file and process latex
+fragments to pdf files.By default,this is a list of strings,and each of
+strings will be given to the shell as a command. %f in the command will
+be replaced by the full file name, %b by the file base name (i.e. without
+extension) and %o by the base directory of the file.
+
+If you set 'org-create-formula

Re: [O] table not returned

2012-03-27 Thread Bastien
Andreas Leha  writes:

> #+begin_src R :results table
>   data.frame(parameter=c("parameter", "", "param1"),
>  mean=c("mean  sd", "", "1.1  0.1"),
>  median=c("median", "(minimum;maximum)", "1 (1;2)"))
> #+end_src
>
> #+results:

I can't test this because of the  character.

Can you send something we can test?

Thanks,

-- 
 Bastien



Re: [O] Export of link with underscore does not work nicely

2012-03-27 Thread Bastien
Hi Daniel,

Daniel Dehennin  writes:

> It seems that the problem is with the ASCII export, the backslash to
> escape the underscore is not striped.

Fixed, thanks.

-- 
 Bastien



Re: [O] org-mobile: new edit nodes for new heading, delete, refile and archive

2012-03-27 Thread Bastien
Hi Henning,

Henning Weiss  writes:

> I have tried to extend org-mobile with four new edit nodes. One to add new
> headings, one for deletion of headings, one for refiling and one for
> archiving nodes. Having those in orgmode would allow mobileorg-android (and
> mobileorg) to be extended to allow a wider range of operations. The
> addition of new headings is already implemented in mobileorg-android and
> they seem to work properly.
>
> The current version of this patch is in my github
> repository.
> As I don't have a lot of experience with lisp I would appreciate if someone
> could give me a little feedback. I still need to write a function that
> compares two nodes (with their subtrees) against each other. This will
> ensure that the edit nodes are applied to the correct nodes.

Can you post your patch to the list, along with a commit message as
described here http://orgmode.org/worg/org-contribute.html ?

We rely on patchwork* which catches patches.  This help us maintain
Org.  

Thanks in advance!

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

-- 
 Bastien



Re: [O] latex labels

2012-03-27 Thread Bastien
Hi Marvin,

Marvin Doyley  writes:

> Do anyone know how to get org mode to list all the latex label in a
> given org file. Something analogous that what reftex does, I can list
> all citation in bib file, and thought it would be nice to do the same
> for labels.

It's not clear to me if you are talking about manually inserted LaTeX
labels within an Org file or if you mean LaTeX labels that will be
inserted in the .tex file as exported from an Org file.

Can you be more precise here?  Maybe send an example?  I'm pretty sure
we can hack something quickly.

Best,

-- 
 Bastien



Re: [O] [BUG] html export and org results block and indentation

2012-03-27 Thread Bastien
Hi Andreas,

Andreas Leha  writes:

> I experience problems when exporting the following to html, as a
> spuriuos line
> ORG-ORG-START 
> is inserted after the results block:

I can't reproduce this.  Please give more information on how to
reproduce the problem.

-- 
 Bastien



Re: [O] Bug: Tabbing error with asterisks [7.8.03]

2012-03-27 Thread Bastien
Ken Williams  writes:

> Bastien  gnu.org> writes:
>
>> Hit C-c ' twice and you'll have commas inserted before the lines
>> starting with an asterisk.
>> 
>
> That works as a workaround, as long as I remember to do it.  Is there a reason
> not to automatically do this to the return value of doing "C-c C-c" on all
> "#begin_src R" blocks?

Not really.

But adding commas for the rare occasions where C-c C-c on a src block
will insert "*" at the beginning of lines will triggers questions from
users who don't read the manual (there are a few.)

Patch welcome.

> Also, what if I need real commas in my literal stuff?  Any way to
>  escape those?  Just add one more comma, maybe?

Let's handle this when we have a real use-case.

Best,

-- 
 Bastien



Re: [O] relative links in html export

2012-03-27 Thread Bastien
Hi Matt,

relative links are not recognized as links because they don't 
have a protocol (like "http" for accepted links.)

Matt Price  writes:

> Neither produces the result I want, which is Front Page
>
> Is there any way to get the latter result?

@Front Page@

HTH,

-- 
 Bastien



Re: [O] Create preamble from an .org file ?

2012-03-27 Thread Bastien
Hi Vincent,

Vincent Beffara  writes:

> How do I do that? Maybe a dedicated .org file for the navigation bar is 
> not the right way to do, is there a better one?

Since you only need to export your preamble in HTML once, I'd rather use
`org-export-html-preamble' and set it to the HTML string you want.

There may be other ways using #+INCLUDE but the solution above is the
one I use.

HTH,

-- 
 Bastien



Re: [O] Export of link with underscore does not work nicely

2012-03-27 Thread Daniel Dehennin
Daniel Dehennin  writes:

> With HTML export, the "hba" is subscript.
>
> Escaping it with a backslash works fine for HTML export but not for
> ASCII one.

It seems that the problem is with the ASCII export, the backslash to
escape the underscore is not striped.

- ASCII output: [pg\_hba.conf]

- HTML output: http://www.postgresql.org/docs/9.1/static/client-authentication.html";>pg_hba.conf

- PDF output: pg_hba.conf


Regards.
-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x7A6FE2DF


pgpNsMoYQ3XNB.pgp
Description: PGP signature


Re: [O] [BUG] [babel] result wrapping with indented source blocks

2012-03-27 Thread Andreas Leha
Eric Schulte  writes:

> Andreas Leha  writes:
>
>> Hi all,
>>
>> there seems to be another bug related to indented babel source
>> blocks when the results are wrapped.
>>
>> Here is an example.  Try to evaluate this block twice.  (Keeping the
>> indentation)
>>
>> ,
>> |   #+begin_src sh :results file wrap
>> | echo "test.txt"
>> |   #+end_src
>> | 
>> |   #+results:
>> |   :RESULTS:
>> |   [[file:test.txt]]
>> | :END:
>> `
>>
>> The second evaluation fails with the error
>> #+begin_quote
>> progn: Search failed: #("^  :END:" 1 3 (face org-special-keyword fontified 
>> t))
>> #+end_quote
>>
>> Regards,
>> Andreas
>>
>>
>
> Hi Andreas,
>
> I've just pushed up a fix for this bug.  Thanks for the report.

Hi Eric,

thanks again for this fast fix.  I can confirm, that it fixes the
problem on my side.

Cheers,
Andreas




Re: [O] table column with trailing 0s

2012-03-27 Thread Andreas Leha
t...@tsdye.com (Thomas S. Dye) writes:

> Andreas Leha  writes:
>
>> Hi all,
>>
>> I am trying to get a table generated from R to be pretty printed in
>> org mode (and the export).
>>
>> Suppose, I have a table like this (typical statistical table):
>>
>> #+attr_latex: align=lr
>> #+begin_src R :colnames yes :exports results
>>   data.frame(parameter=c("param1", "param2", "param3", "param4"),
>>  pvalue=c("0.80", "0.15", "*0.03*", "*< 0.01*"))
>> #+end_src
>>
>> #+results:
>> | parameter | pvalue   |
>> |---+--|
>> | param1| 0.8  |
>> | param2| 0.15 |
>> | param3| *0.03*   |
>> | param4| *< 0.01* |
>>
>> Here, org mode strips the trailing 0 from param1 which makes the
>> table a lot less readable.
>>
>> How can I tell org not to trim the contents of string(!) columns?
>>
>> Regards,
>> Andreas
>>
>>
>>
> Aloha Andreas,
>
> I've been very happy using David Hajage's ascii package for R.  See
> http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-R.html#sec-4-2
> for a few examples of how it works with tabular and non-tabular data.
>
> hth,
> Tom

Hi Tom,

thanks for this pointer.  I have used the ascii package on several
occasions already, but completely forgot about it this time.

Cheers,
Andreas




Re: [O] GSoC 2012 -- Elisp backend for Ragel

2012-03-27 Thread Aurélien Aptel
On Tue, Mar 27, 2012 at 11:22 PM, Achim Gratz  wrote:
> It needs yet another tool to fully build org-mode from scratch, which
> needs to be installed, bug-free and configured correctly.  Right now all
> one really needs to have to build org-mode is a working Emacs (even make
> is optional).

Ragel is written in C++ and has no dependency.

* every major platform has a C++ compiler
* ragel input along with generated code can be tracked in the repo
* the generated code is portable since it's elisp (doesn't need to be
regenerated on different platforms)
* the parser is a confined part of org-mode

I don't think this is a problem.

>>>  3) FSM implementation into code is inherently very simple anyway
>>
>> Well I've never done it for big language but I did not find it that
>> easy. Mistakes are easily made e.g. you end up accepting more thing
>> that the language does in order to simplify the code, etc.
>
> Which is just as easily done by specifying the syntax incorrectly.

I think the fix will be shorter and simpler in the syntax because it's
easier to reason on an abstract definition when it comes to language.
When you're neck-deep in your handwritten implementation trying to
figure what you did wrong, it can take a long time.

> No, you can (for a suitably restricted set of languages) formally proof
> that the implementation and the specification is identical for any
> input.

How would you do that programmatically?

> The assumption that an FSM running in ELisp is faster than a bunch of
> regexp has not been actually tested or has it?

I haven't tested anything yet.
If I remember correctly, the emacs regex API doesn't provide a way to
compile patterns and thus have to be compiled at each call.
Also the underlying FSM implementation uses NFA which can lead to a
exponential complexity in time [1] for certain patterns.

1: http://swtch.com/~rsc/regexp/regexp1.html



Re: [O] Bug: Tabbing error with asterisks [7.8.03]

2012-03-27 Thread Ken Williams
Bastien  gnu.org> writes:

> Hit C-c ' twice and you'll have commas inserted before the lines
> starting with an asterisk.
> 

That works as a workaround, as long as I remember to do it.  Is there a reason
not to automatically do this to the return value of doing "C-c C-c" on all
"#begin_src R" blocks?

Also, what if I need real commas in my literal stuff?  Any way to escape those?
 Just add one more comma, maybe?

 -Ken




Re: [O] table column with trailing 0s

2012-03-27 Thread Thomas S. Dye

Andreas Leha  writes:

> Hi all,
>
> I am trying to get a table generated from R to be pretty printed in
> org mode (and the export).
>
> Suppose, I have a table like this (typical statistical table):
>
> #+attr_latex: align=lr
> #+begin_src R :colnames yes :exports results
>   data.frame(parameter=c("param1", "param2", "param3", "param4"),
>  pvalue=c("0.80", "0.15", "*0.03*", "*< 0.01*"))
> #+end_src
>
> #+results:
> | parameter | pvalue   |
> |---+--|
> | param1| 0.8  |
> | param2| 0.15 |
> | param3| *0.03*   |
> | param4| *< 0.01* |
>
> Here, org mode strips the trailing 0 from param1 which makes the
> table a lot less readable.
>
> How can I tell org not to trim the contents of string(!) columns?
>
> Regards,
> Andreas
>
>
>
Aloha Andreas,

I've been very happy using David Hajage's ascii package for R.  See
http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-R.html#sec-4-2
for a few examples of how it works with tabular and non-tabular data.

hth,
Tom

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



[O] [PATCH] Support hour in repeated task cookie

2012-03-27 Thread Takafumi Arakaki
Hi,

Basically, this patch changes all occurrence of "[dwmy]" with
"[hdwmy]" and adds "("h" . hour)" to whata of org-auto-repeat-maybe.

I think it is better to have some constant to indicate "dwmy".  So,
this pull request is rather a proof-of-concept and a feature request.
I didn't try to do it by myself because I thought org developers might
have some preference to how to add this constant.  If somebody who can
commit the change can add a constant and introduce "h" for repeated
cookie, please do it.  If you think I should create another patch to
add the constant, please give me a name of the constant.   How should
we call "dwmy"?  "Time unit chars" or something like that?  If the
current patch is acceptable, it is fine for me.  Maybe you want to introduce
some constants afterward.

Best,
Takafumi
From bd1a22fe245c5e2e33979b4b351bfb4564e83825 Mon Sep 17 00:00:00 2001
From: Takafumi Arakaki 
Date: Tue, 27 Mar 2012 22:55:39 +0200
Subject: [PATCH 1/2] Support hour in repeated task cookie

Basically, this patch changes all occurrence of "[dwmy]" with
"[hdwmy]" and adds "("h" . hour)" to whata of org-auto-repeat-maybe.
---
 lisp/org.el |   38 +++---
 1 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 04c5c62..2981b0f 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -683,7 +683,7 @@ An entry can be toggled between QUOTE and normal with
   :type 'string)
 
 (defconst org-repeat-re
-  "<[0-9]\\{4\\}-[0-9][0-9]-[0-9][0-9] [^>\n]*?\\([.+]?\\+[0-9]+[dwmy]\\(/[0-9]+[dwmy]\\)?\\)"
+  "<[0-9]\\{4\\}-[0-9][0-9]-[0-9][0-9] [^>\n]*?\\([.+]?\\+[0-9]+[hdwmy]\\(/[0-9]+[hdwmy]\\)?\\)"
   "Regular expression for specifying repeated events.
 After a match, group 1 contains the repeat expression.")
 
@@ -7919,7 +7919,7 @@ and still retain the repeater to cover future instances of the task."
 (if (not (and (integerp n) (> n 0)))
 	(error "Invalid number of replications %s" n))
 (if (and (setq doshift (and (stringp shift) (string-match "\\S-" shift)))
-	 (not (string-match "\\`[ \t]*\\+?\\([0-9]+\\)\\([dwmy]\\)[ \t]*\\'"
+	 (not (string-match "\\`[ \t]*\\+?\\([0-9]+\\)\\([hdwmy]\\)[ \t]*\\'"
 shift)))
 	(error "Invalid shift specification %s" shift))
 (when doshift
@@ -7937,7 +7937,7 @@ and still retain the repeater to cover future instances of the task."
 (setq end (point))
 (setq template (buffer-substring beg end))
 (when (and doshift
-	   (string-match "<[^<>\n]+ [.+]?\\+[0-9]+[dwmy][^<>\n]*>" template))
+	   (string-match "<[^<>\n]+ [.+]?\\+[0-9]+[hdwmy][^<>\n]*>" template))
   (delete-region beg end)
   (setq end beg)
   (setq nmin 0 nmax (1+ nmax) n-no-remove nmax))
@@ -7968,7 +7968,7 @@ and still retain the repeater to cover future instances of the task."
 		(while (re-search-forward org-ts-regexp nil t)
 		  (save-excursion
 		(goto-char (match-beginning 0))
-		(if (looking-at "<[^<>\n]+\\( +[.+]?\\+[0-9]+[dwmy]\\)")
+		(if (looking-at "<[^<>\n]+\\( +[.+]?\\+[0-9]+[hdwmy]\\)")
 			(delete-region (match-beginning 1) (match-end 1)))
 	(setq task (buffer-string)))
 	  (insert task))
@@ -11870,7 +11870,7 @@ This function is run automatically after each state change to a DONE state."
 	 (aa (assoc last-state org-todo-kwd-alist))
 	 (interpret (nth 1 aa))
 	 (head (nth 2 aa))
-	 (whata '(("d" . day) ("m" . month) ("y" . year)))
+	 (whata '(("h" . hour) ("d" . day) ("m" . month) ("y" . year)))
 	 (msg "Entry repeats: ")
 	 (org-log-done nil)
 	 (org-todo-log-states nil)
@@ -11906,7 +11906,7 @@ This function is run automatically after each state change to a DONE state."
 	(setq type (if (match-end 1) org-scheduled-string
 		 (if (match-end 3) org-deadline-string "Plain:"))
 	  ts (match-string (if (match-end 2) 2 (if (match-end 4) 4 0
-	(when (string-match "\\([.+]\\)?\\(\\+[0-9]+\\)\\([dwmy]\\)" ts)
+	(when (string-match "\\([.+]\\)?\\(\\+[0-9]+\\)\\([hdwmy]\\)" ts)
 	  (setq	n (string-to-number (match-string 2 ts))
 		what (match-string 3 ts))
 	  (if (equal what "w") (setq n (* n 7) what "d"))
@@ -11935,7 +11935,7 @@ This function is run automatically after each state change to a DONE state."
 	  ;; rematch, so that we have everything in place for the real shift
 	  (org-at-timestamp-p t)
 	  (setq ts (match-string 1))
-	  (string-match "\\([.+]\\)?\\(\\+[0-9]+\\)\\([dwmy]\\)" ts
+	  (string-match "\\([.+]\\)?\\(\\+[0-9]+\\)\\([hdwmy]\\)" ts
 	  (org-timestamp-change n (cdr (assoc what whata)))
 	  (setq msg (concat msg type " " org-last-changed-timestamp " "
   (setq org-log-post-message msg)
@@ -11982,7 +11982,7 @@ can either be an Org date like \"2011-07-24\" or a delta like \"+2d\"."
 (let* ((old-date (org-entry-get nil "DEADLINE"))
 	   (repeater (and old-date
 			  (string-match
-			   "\\([.+-]+[0-9]+[dwmy]\\(?:[/ ][-+]?[0-9]+[dwmy]\\)?\\) ?"
+			   "\\([.+-]+[0-9]+[hdwmy]\\(?:[/ ][-+]?[0-9]+[hdwmy]\\)?\\) ?"
 			   old-

Re: [O] GSoC 2012 -- Elisp backend for Ragel

2012-03-27 Thread Achim Gratz
Aurélien Aptel  writes:
>>  2) It adds yet more SOUP (software of unknown provenance) to the build
>>  process which may then need mitigating against (this is relevant to me,
>>  although possibly not to Org-mode).
>
> You mean it complicates the build process? I'm not sure I understand.

It needs yet another tool to fully build org-mode from scratch, which
needs to be installed, bug-free and configured correctly.  Right now all
one really needs to have to build org-mode is a working Emacs (even make
is optional).

>>  3) FSM implementation into code is inherently very simple anyway
>
> Well I've never done it for big language but I did not find it that
> easy. Mistakes are easily made e.g. you end up accepting more thing
> that the language does in order to simplify the code, etc.

Which is just as easily done by specifying the syntax incorrectly.

>> What I do instead is validate the FSM code against the formal state
>> representation as an integration test (which is fairly easy to arrange).
>
> I'm not familiar with this. Does this mean you test random valid and
> invalid input against the parser (aka fuzzing)?

No, you can (for a suitably restricted set of languages) formally proof
that the implementation and the specification is identical for any
input.

> I'm not very experienced (just a student :) but for me their
> usefulness is in the robustness and the abstraction it brings. It also
> happens to be faster. But I see what you're saying.

The assumption that an FSM running in ELisp is faster than a bunch of
regexp has not been actually tested or has it?


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

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves




Re: [O] GSoC 2012 -- Elisp backend for Ragel

2012-03-27 Thread Aurélien Aptel
On Mon, Mar 26, 2012 at 6:01 PM, Bastien  wrote:
>> Is it still hand written? If so, I think it's ultimately a bad idea
>> and it should be rewritten using ragel.
>
> I guess that's because you're not fluent in english, but this sounds
> a bit "peremptory".  We are not only interested in code, we are also

Sorry I've made a bad impression or if my remarks feels a bit
passive-agressive. It's harder (and longer) for me to write in
english, yes :p

> interested in learning from each others.  That's what make this list
> a nice place to live in.  If you have code or explanations you want
> to share, please do!

>From my classes, I thought it was widely accepted that sufficiently
complex parsers should now be written by a tool like ragel. But again
I'm not experienced, I never had to parse a complex language.



[O] Export of link with underscore does not work nicely

2012-03-27 Thread Daniel Dehennin
Hello,

I try to export the following as HTML and text but the output is not
optimal:

#+begin_src org
This is the
[[http://www.postgresql.org/docs/9.1/static/client-authentication.html][pg_hba.conf]]
configuration file
#+end_src

With HTML export, the "hba" is subscript.

Escaping it with a backslash works fine for HTML export but not for
ASCII one.

Is this intended or a bug?

Regards.
-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x7A6FE2DF


pgpIndfSf0E0a.pgp
Description: PGP signature


Re: [O] Problems running C code in org-mode under Windows

2012-03-27 Thread Richard Stanton
I think the "Access is denied" problem is probably the same as that listed here:

http://lists.gnu.org/archive/html/help-gnu-emacs/2010-04/msg00247.html

Unfortunately, when I switch to using bash as my shell under Windows, this 
causes problems with python-mode (though this is not really your problem...) 
This change does get the compilation to work on my machine, however, and a .exe 
file is created. So far so good...

However, the output still appears blank in the org buffer. More tracing 
required...



> -Original Message-
> From: Eric Schulte [mailto:eric.schu...@gmx.com]
> Sent: Tuesday, March 27, 2012 9:06 AM
> To: Richard Stanton
> Cc: emacs-orgmode@gnu.org
> Subject: Re: [O] Problems running C code in org-mode under Windows
> 
> Thanks for tracking down the source of this problem.  Unfortunately this is
> beyond my abilities to address.  It would be interesting to hear if others on
> this list are having issues compiling C code blocks on windows.  To the extent
> that this appears to be a problem with the Emacs `call-process' and the
> cmdproxy executable maybe a bug report to Emacs would be appropriate.
> 
> Best,
> 
> Richard Stanton  writes:
> 
> > I've been tracing through, and a problem occurs when the compilation
> > gets run, which is at about line 155 in file ob-eval.el, inside
> > function org-babel-shell-command-on-region, where call-process region
> > is called.
> >
> > As far as I can see, at this point the command being called is
> >
> > C:/emacs/emacs-24.0.94/bin/cmdproxy -c "gcc -o \"c:/users/stanton[...]C-
> bin-10700opx\" \"c:/users/Stanton[...]C-src-10700bfr.c\""
> >
> > (where [...] just means I deleted some more path information, but it's all
> valid).
> >
> > If I execute this exact command at the command line, the compilation
> > works fine, and creates an executable file C-bin-10700opx.exe (note
> > that gcc on Windows automatically adds the .exe extension if you omit
> > it). However, after running the call-process-region command in the .el
> > file, no executable file is produced, and error-file has the contents
> >
> > Access is denied
> >
> > Not sure why this should be, but the compilation is not happening.
> >
> >
> >
> >
> >
> >> -Original Message-
> >> From: Eric Schulte [mailto:eric.schu...@gmx.com]
> >> Sent: Monday, March 26, 2012 6:45 PM
> >> To: Richard Stanton
> >> Cc: emacs-orgmode@gnu.org
> >> Subject: Re: [O] Problems running C code in org-mode under Windows
> >>
> >> Richard Stanton  writes:
> >>
> >> > Here's a simple org file that's supposed to run some C code and
> >> > print the
> >> result:
> >> >
> >> > --
> >> >
> >> > * Sample C code
> >> >
> >> > #+name: RHS.c
> >> > #+begin_src C :noweb yes :tangle RHS.c
> >> >   #include 
> >> >   <>
> >> > #+end_src
> >> >
> >> > #+name: main
> >> > #+begin_src C
> >> >   int main(int argc, char *argv[]) {
> >> > int lst[argc-1];
> >> > int i;
> >> > for(i=1;i >> >   lst[i-1] = atoi(argv[i]);
> >> > for(i=1;i >> >   printf("%d ", lst[i-1] + 1);
> >> > printf("\n");
> >> > }
> >> > #+end_src
> >> >
> >> > #+call: RHS.c[:cmdline 8 7 6]()
> >> >
> >> > -
> >> >
> >> > It works fine on my Mac, producing the result:
> >> >
> >> > #+RESULTS: RHS.c[:cmdline 8 7 6]()
> >> > : 9 8 7
> >> >
> >> > On my PC, however, running Windows Vista, the output is blank and
> >> > there's a *Org-babel-error-output* buffer containing the message
> >> >
> >> > Access is denied.
> >> > 'c:/Users/stanton/AppData/Local/Temp/babel-11948MQP/C-bin-
> 11948Nln'
> >> is
> >> > not recognized as an internal or external command, operable program
> >> > or batch file.
> >> >
> >> > There is a file called C-bin-11948Nln in that directory, but it has
> >> > length 0, suggesting that something is going wrong in the
> >> > compilation process. However, I can also see potential problems
> >> > with the fact that the file name does not end in .exe, so the
> >> > Windows shell is not easily going to recognize it as an executable
> anyway.
> >> >
> >> > Does anyone have this running OK under Windows? Alternatively, how
> >> > can I track down what's going wrong in more detail?
> >> >
> >> > Thanks.
> >> >
> >> > Richard Stanton
> >> >
> >>
> >> I don't have access to a windows machine so I can't debug this
> >> myself, but I would suggest stepping through the execution of the `org-
> babel-C-execute'
> >> function using edebug.  This is done by first placing the cursor
> >> inside the `org- babel-C-execute' function, evaluating the function
> >> with C-u C-M-x, then executing a C code block.  This should give you
> >> some idea of what is going wrong where.
> >>
> >> Best,
> >>
> >> --
> >> Eric Schulte
> >> http://cs.unm.edu/~eschulte/
> 
> --
> Eric Schulte
> http://cs.unm.edu/~eschulte/



Re: [O] GSoC 2012 -- Elisp backend for Ragel

2012-03-27 Thread Aurélien Aptel
On Sun, Mar 25, 2012 at 2:52 PM, Martyn Jago  wrote:
> For the design process I currently use the excellent plantuml library
> from within Org-mode (Aurélien, see lisp/ob-plantuml.el for the
> Org-babel interface), although have previously used a bespoke
> Ruby/Graphviz library of my design, and previous to that Ragel.

I didn't know about plantuml. Nice tool!

> For that reason I think it would be great to see an `Org-Babel'
> implementation of Ragel. I think it could be a very useful tool.

I'm discovering org-mode little by little. The whole org-babel thing
is really nice too. So what you want is an org-babel interface that
will convert a source block input for ragel to an image of the
automata/generated code once you export e.g. to html?

>  1) It complicates the build process

Yes, it adds complexity for the developers. Users won't notice.

>  2) It adds yet more SOUP (software of unknown provenance) to the build
>  process which may then need mitigating against (this is relevant to me,
>  although possibly not to Org-mode).

You mean it complicates the build process? I'm not sure I understand.

>  3) FSM implementation into code is inherently very simple anyway

Well I've never done it for big language but I did not find it that
easy. Mistakes are easily made e.g. you end up accepting more thing
that the language does in order to simplify the code, etc.

> What I do instead is validate the FSM code against the formal state
> representation as an integration test (which is fairly easy to arrange).

I'm not familiar with this. Does this mean you test random valid and
invalid input against the parser (aka fuzzing)?

> So my point is, I personally don't see the use of FSM code generators as
> a panacea to perfect super-fast code. To me their usefulness is in the
> visual representation of the state interaction (during development, and
> subsequent code documentation), and the resulting code quality.

I'm not very experienced (just a student :) but for me their
usefulness is in the robustness and the abstraction it brings. It also
happens to be faster. But I see what you're saying.



[O] table not returned

2012-03-27 Thread Andreas Leha
Hi all,

I have problems with the following table to be inserted into the org
mode buffer:

#+begin_src R :results table
  data.frame(parameter=c("parameter", "", "param1"),
 mean=c("mean ± sd", "", "1.1 ± 0.1"),
 median=c("median", "(minimum;maximum)", "1 (1;2)"))
#+end_src

#+results:

The problem seems to be the "(" as a first character in a cell.  Is
this a to-be-expected limitation of org-mode tables?

Regards,
Andreas




Re: [O] GSoC 2012 -- Elisp backend for Ragel

2012-03-27 Thread Aurélien Aptel
On Sun, Mar 25, 2012 at 1:40 PM, Nicolas Goaziou  wrote:
>> If so, I think it's ultimately a bad idea and it should be rewritten
>> using ragel.
>
> It may be. But it allows for flexibility. Org's syntax is evolving, and
> I consider org-element.el as a parser, but also as a guidance in that
> process. Since there is no formal description for Org syntax yet, an
> org-element.el is more useful than a full-blown parser generator for
> now.

Using a parser generator can be flexible too. Big changes in the
syntax usually implies big changes in the parsing code. With a tool
like ragel the operation is much less painful since the code is
generated. Also, if the org syntax can be written as a grammar, it can
be safely imported in other software that have a parser for it making
the format more portable.

> I don't know ragel (save for a short excursion in its website), but I'm
> pretty sure that even if it generates elisp code without dependency, any
> evolution to Org syntax will require to use it again. At that time, it
> may be difficult to find someone able and willing to undertake that
> updating task in a reasonable delay (since we're talking about a core
> feature). On the other hand, there are quite a few elisp hackers in
> Emacs's world.

Frankly, I don't know ragel very much either. I've only used it on
very simple things. But it's easy to use. You can even execute action
at any state while parsing a token (look closely at the example on the
homepage).

> Now, if ragel can improve org-element.el while preserving its

I'm not sure it's possible :/

> flexibility (and a compatible output, since I assume you won't also
> rewrite the generic export engine), I'm all ears.

Yes, the output of the parser has to remain the same otherwise I would
have to rewrite everything :p



[O] table column with trailing 0s

2012-03-27 Thread Andreas Leha
Hi all,

I am trying to get a table generated from R to be pretty printed in
org mode (and the export).

Suppose, I have a table like this (typical statistical table):

#+attr_latex: align=lr
#+begin_src R :colnames yes :exports results
  data.frame(parameter=c("param1", "param2", "param3", "param4"),
 pvalue=c("0.80", "0.15", "*0.03*", "*< 0.01*"))
#+end_src

#+results:
| parameter | pvalue   |
|---+--|
| param1| 0.8  |
| param2| 0.15 |
| param3| *0.03*   |
| param4| *< 0.01* |

Here, org mode strips the trailing 0 from param1 which makes the
table a lot less readable.

How can I tell org not to trim the contents of string(!) columns?

Regards,
Andreas




Re: [O] [RFC] warn time for appointments

2012-03-27 Thread Peter Münster
On Fri, Mar 23 2012, Nick Dokos wrote:

> But previously, things were bad enough that I had to turn off the notify
> process. Now, I'm leaving it on and (mostly) not noticing that
> it's there, so that's definitely progress.

There is still one thing, that we can do: call org-notify-process
periodically, but only when the user is idle for at least some seconds.
This logic exists already in gnus-demon-add-handler but the gnus-demon
runs only when gnus is running. So, what we can do is:
- patch gnus-demon.el to allow running the daemon independently of gnus
- copy parts of gnus-demon.el
- perhaps something else...

Some day I'll take a look.

-- 
   Peter




Re: [O] Missing date in Org-Agenda Day buffer

2012-03-27 Thread Rasmus Rempling

Hi Bastien,

I confirm that the fix works on v. 7.8.06.

Thank you!

/rasmus


On 2012-03-21 23:59, Bastien wrote:

Hi Rasmus,

Rasmus Rempling  writes:


When scheduling may working day I use the Org-Agenda Day view and the
column mode with the format as given below. This work very well and I am
happy with the set-up. However, as shown in the attached png file the date
is missing. My initial thought was that it is the same color as the shadowy
highlight of the table headlines, but this is the same as the effort-sum. I
have tried to find a solution, but not succeded.

I have tried two different background/foreground with the same result
(black/white and reverse).

This should be fixed now, please confirm.

As a workaround

If you don't clone from master/hotfix, you can set
`org-agenda-columns-show-summaries' to nil as a temporary
workaround.

Thanks to you and Nick for reporting this!





Re: [O] Problems running C code in org-mode under Windows

2012-03-27 Thread Eric Schulte
Thanks for tracking down the source of this problem.  Unfortunately this
is beyond my abilities to address.  It would be interesting to hear if
others on this list are having issues compiling C code blocks on
windows.  To the extent that this appears to be a problem with the Emacs
`call-process' and the cmdproxy executable maybe a bug report to Emacs
would be appropriate.

Best,

Richard Stanton  writes:

> I've been tracing through, and a problem occurs when the compilation
> gets run, which is at about line 155 in file ob-eval.el, inside
> function org-babel-shell-command-on-region, where call-process region
> is called.
>
> As far as I can see, at this point the command being called is
>
> C:/emacs/emacs-24.0.94/bin/cmdproxy -c "gcc -o 
> \"c:/users/stanton[...]C-bin-10700opx\" 
> \"c:/users/Stanton[...]C-src-10700bfr.c\""
>
> (where [...] just means I deleted some more path information, but it's all 
> valid).
>
> If I execute this exact command at the command line, the compilation
> works fine, and creates an executable file C-bin-10700opx.exe (note
> that gcc on Windows automatically adds the .exe extension if you omit
> it). However, after running the call-process-region command in the .el
> file, no executable file is produced, and error-file has the contents
>
> Access is denied
>
> Not sure why this should be, but the compilation is not happening.
>
>
>
>
>
>> -Original Message-
>> From: Eric Schulte [mailto:eric.schu...@gmx.com]
>> Sent: Monday, March 26, 2012 6:45 PM
>> To: Richard Stanton
>> Cc: emacs-orgmode@gnu.org
>> Subject: Re: [O] Problems running C code in org-mode under Windows
>> 
>> Richard Stanton  writes:
>> 
>> > Here's a simple org file that's supposed to run some C code and print the
>> result:
>> >
>> > --
>> >
>> > * Sample C code
>> >
>> > #+name: RHS.c
>> > #+begin_src C :noweb yes :tangle RHS.c
>> >   #include 
>> >   <>
>> > #+end_src
>> >
>> > #+name: main
>> > #+begin_src C
>> >   int main(int argc, char *argv[]) {
>> > int lst[argc-1];
>> > int i;
>> > for(i=1;i> >   lst[i-1] = atoi(argv[i]);
>> > for(i=1;i> >   printf("%d ", lst[i-1] + 1);
>> > printf("\n");
>> > }
>> > #+end_src
>> >
>> > #+call: RHS.c[:cmdline 8 7 6]()
>> >
>> > -
>> >
>> > It works fine on my Mac, producing the result:
>> >
>> > #+RESULTS: RHS.c[:cmdline 8 7 6]()
>> > : 9 8 7
>> >
>> > On my PC, however, running Windows Vista, the output is blank and
>> > there's a *Org-babel-error-output* buffer containing the message
>> >
>> > Access is denied.
>> > 'c:/Users/stanton/AppData/Local/Temp/babel-11948MQP/C-bin-11948Nln'
>> is
>> > not recognized as an internal or external command, operable program or
>> > batch file.
>> >
>> > There is a file called C-bin-11948Nln in that directory, but it has
>> > length 0, suggesting that something is going wrong in the compilation
>> > process. However, I can also see potential problems with the fact that
>> > the file name does not end in .exe, so the Windows shell is not easily
>> > going to recognize it as an executable anyway.
>> >
>> > Does anyone have this running OK under Windows? Alternatively, how can
>> > I track down what's going wrong in more detail?
>> >
>> > Thanks.
>> >
>> > Richard Stanton
>> >
>> 
>> I don't have access to a windows machine so I can't debug this myself, but I
>> would suggest stepping through the execution of the `org-babel-C-execute'
>> function using edebug.  This is done by first placing the cursor inside the 
>> `org-
>> babel-C-execute' function, evaluating the function with C-u C-M-x, then
>> executing a C code block.  This should give you some idea of what is going
>> wrong where.
>> 
>> Best,
>> 
>> --
>> Eric Schulte
>> http://cs.unm.edu/~eschulte/

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



Re: [O] Problems running C code in org-mode under Windows

2012-03-27 Thread Richard Stanton
I've been tracing through, and a problem occurs when the compilation gets run, 
which is at about line 155 in file ob-eval.el, inside function 
org-babel-shell-command-on-region, where call-process region is called.

As far as I can see, at this point the command being called is

C:/emacs/emacs-24.0.94/bin/cmdproxy -c "gcc -o 
\"c:/users/stanton[...]C-bin-10700opx\" 
\"c:/users/Stanton[...]C-src-10700bfr.c\""

(where [...] just means I deleted some more path information, but it's all 
valid).

If I execute this exact command at the command line, the compilation works 
fine, and creates an executable file C-bin-10700opx.exe (note that gcc on 
Windows automatically adds the .exe extension if you omit it). However, after 
running the call-process-region command in the .el file, no executable file is 
produced, and error-file has the contents

Access is denied

Not sure why this should be, but the compilation is not happening.





> -Original Message-
> From: Eric Schulte [mailto:eric.schu...@gmx.com]
> Sent: Monday, March 26, 2012 6:45 PM
> To: Richard Stanton
> Cc: emacs-orgmode@gnu.org
> Subject: Re: [O] Problems running C code in org-mode under Windows
> 
> Richard Stanton  writes:
> 
> > Here's a simple org file that's supposed to run some C code and print the
> result:
> >
> > --
> >
> > * Sample C code
> >
> > #+name: RHS.c
> > #+begin_src C :noweb yes :tangle RHS.c
> >   #include 
> >   <>
> > #+end_src
> >
> > #+name: main
> > #+begin_src C
> >   int main(int argc, char *argv[]) {
> > int lst[argc-1];
> > int i;
> > for(i=1;i >   lst[i-1] = atoi(argv[i]);
> > for(i=1;i >   printf("%d ", lst[i-1] + 1);
> > printf("\n");
> > }
> > #+end_src
> >
> > #+call: RHS.c[:cmdline 8 7 6]()
> >
> > -
> >
> > It works fine on my Mac, producing the result:
> >
> > #+RESULTS: RHS.c[:cmdline 8 7 6]()
> > : 9 8 7
> >
> > On my PC, however, running Windows Vista, the output is blank and
> > there's a *Org-babel-error-output* buffer containing the message
> >
> > Access is denied.
> > 'c:/Users/stanton/AppData/Local/Temp/babel-11948MQP/C-bin-11948Nln'
> is
> > not recognized as an internal or external command, operable program or
> > batch file.
> >
> > There is a file called C-bin-11948Nln in that directory, but it has
> > length 0, suggesting that something is going wrong in the compilation
> > process. However, I can also see potential problems with the fact that
> > the file name does not end in .exe, so the Windows shell is not easily
> > going to recognize it as an executable anyway.
> >
> > Does anyone have this running OK under Windows? Alternatively, how can
> > I track down what's going wrong in more detail?
> >
> > Thanks.
> >
> > Richard Stanton
> >
> 
> I don't have access to a windows machine so I can't debug this myself, but I
> would suggest stepping through the execution of the `org-babel-C-execute'
> function using edebug.  This is done by first placing the cursor inside the 
> `org-
> babel-C-execute' function, evaluating the function with C-u C-M-x, then
> executing a C code block.  This should give you some idea of what is going
> wrong where.
> 
> Best,
> 
> --
> Eric Schulte
> http://cs.unm.edu/~eschulte/



Re: [O] orgmode as a service

2012-03-27 Thread suvayu ali
On Tue, Mar 27, 2012 at 17:17, Eric Schulte  wrote:
> If you'd rather set this up as a web service (instead e.g., an email
> front-end as mentioned in another reply) one intermediate step would be
> to write a tool for conversion between json (or some other web-friendly
> data type) and the Org-mode list representation defined in
> org-element.el in the contrib directory.
>
> Such a task should be fairly straightforward (in fact there may already
> be elisp<->json conversion tools written), and once done would allow for
> easy generation of Org-mode files from structured data.
>
> To me this does seem like it could be useful.
>

Sounds like another nice idea for GSoC.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] orgmode as a service

2012-03-27 Thread Eric Schulte
Brian Dunbar  writes:

> I'm orgmode newbie.  Before I reinvent a wheel, going to ask if this has 
> already
> been done: 'orgmode as a service'.
>
> Or perhaps it doesn't need to be done and I'm tilting at yet another windmill.
>
> Comments welcome.
>
>
> Assume a workgroup of people - they use emacs / orgmode.  Mostly Linux and OS 
> X,
> but there might be a weirdo or two still using Solaris.
>
> They get TODOs from people who do -not- use emacs: managers, project managers,
> Windows users, end users ... like that.
>
> The input arrives (mostly) via email.  'Attend Meeting Foo at 08:00 p.m.' 'Fix
> Bug umptyfratz this week'.
>
> orgmode user manually inputs this data into emacs.
>
>
>
> I had a few free minutes and thought 'there must be a better way': 20 minutes 
> a
> day to organize tasks * Y people on a team = a lot of wasted hours.
>
>
> Is there a programatic method already coded up to take bits delivered to a
> server, bang out the appropriate .org file and deliver it to the orgmode user?
>
> Assume
>
> data > orgmodeserv...@myhost.company.com
>
> orgmodeservice would be a daemon (perl, lisp, whatever) that mangles the data.
>
> # data
> user: ad...@company.com
> what: Task - record new hit single
> when: June 01, 2012
>
> becomes
> adele.org > adele's desktop
>
> #adele.org
> * TODO Record new hit single <2012-06-01 Fri>
>
>
>
> Am I Don Quixote slaying phantom dragons? 
>
>
> Brian Dunbar
> brian.dun...@gmail.com
>

If you'd rather set this up as a web service (instead e.g., an email
front-end as mentioned in another reply) one intermediate step would be
to write a tool for conversion between json (or some other web-friendly
data type) and the Org-mode list representation defined in
org-element.el in the contrib directory.

Such a task should be fairly straightforward (in fact there may already
be elisp<->json conversion tools written), and once done would allow for
easy generation of Org-mode files from structured data.

To me this does seem like it could be useful.

Cheers,

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



[O] Fwd: Re: orgmode as a service

2012-03-27 Thread Sami Airaksinen

 Original Message 
Subject:Re: orgmode as a service
Date:   Tue, 27 Mar 2012 18:52:05 +0300
From:   Sami Airaksinen 
To: Brian Dunbar 



Hi,

I'm really don't know am I answering to your question but one could try
to create some nice web services with elnode library to your network
that utilizes org-mode and its data formats,

https://github.com/nicferrier/elnode

I count myself as an informed user, not a org-mode developer and somebody
with more knowledge of org-mode libs could provide more conclusive
answer. This post is just fuel to your flame.



Re: [O] [BUG] [babel] result wrapping with indented source blocks

2012-03-27 Thread Eric Schulte
Andreas Leha  writes:

> Hi all,
>
> there seems to be another bug related to indented babel source
> blocks when the results are wrapped.
>
> Here is an example.  Try to evaluate this block twice.  (Keeping the
> indentation)
>
> ,
> |   #+begin_src sh :results file wrap
> | echo "test.txt"
> |   #+end_src
> | 
> |   #+results:
> |   :RESULTS:
> |   [[file:test.txt]]
> | :END:
> `
>
> The second evaluation fails with the error
> #+begin_quote
> progn: Search failed: #("^  :END:" 1 3 (face org-special-keyword fontified t))
> #+end_quote
>
> Regards,
> Andreas
>
>

Hi Andreas,

I've just pushed up a fix for this bug.  Thanks for the report.

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



Re: [O] Beamer export formatting clashes with URL link

2012-03-27 Thread James Harkins
At Mon, 26 Mar 2012 17:39:25 +0200,
Bastien wrote:
> I'd suggest to simply use this:
> 
> #+LaTeX: \begin{center}
> /[[http://www.celemony.com/cms]]/
> #+LaTeX: \end{center}

Hm, interesting, the font-lock stuff hides the [[ ]] and it looks like it will 
get the same bad results as before, but it actually works.

Will remember that next time: explicit links instead of auto-formatted.

Thanks!
James


--
James Harkins /// dewdrop world
jamshar...@dewdrop-world.net
http://www.dewdrop-world.net

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman

blog: http://www.dewdrop-world.net/words
audio clips: http://www.dewdrop-world.net/audio
more audio: http://soundcloud.com/dewdrop_world/tracks



Re: [O] #+ATTR_HTML ineffetive in recent org_mode?

2012-03-27 Thread Bastien
Hi Matt,

Matt Price  writes:

> I pulled from git yesterday and am having trouble with #+ATTR_HTML in
> html export -- from what I cna tell, the #+ATTR_HTML: lines are just
> being ignored.  Has anyone else seen this? 

I can't reproduce this, sorry.

-- 
 Bastien



Re: [O] orgmode as a service

2012-03-27 Thread suvayu ali
On Tue, Mar 27, 2012 at 15:39, Brian Dunbar  wrote:
> Is there a programatic method already coded up to take bits delivered to a
> server, bang out the appropriate .org file and deliver it to the orgmode user?

Maybe this is what you are looking for?


-- 
Suvayu

Open source is the future. It sets us free.



[O] orgmode as a service

2012-03-27 Thread Brian Dunbar
I'm orgmode newbie.  Before I reinvent a wheel, going to ask if this has already
been done: 'orgmode as a service'.

Or perhaps it doesn't need to be done and I'm tilting at yet another windmill.

Comments welcome.


Assume a workgroup of people - they use emacs / orgmode.  Mostly Linux and OS X,
but there might be a weirdo or two still using Solaris.

They get TODOs from people who do -not- use emacs: managers, project managers,
Windows users, end users ... like that.

The input arrives (mostly) via email.  'Attend Meeting Foo at 08:00 p.m.' 'Fix
Bug umptyfratz this week'.

orgmode user manually inputs this data into emacs.



I had a few free minutes and thought 'there must be a better way': 20 minutes a
day to organize tasks * Y people on a team = a lot of wasted hours.


Is there a programatic method already coded up to take bits delivered to a
server, bang out the appropriate .org file and deliver it to the orgmode user?

Assume

data > orgmodeserv...@myhost.company.com

orgmodeservice would be a daemon (perl, lisp, whatever) that mangles the data.

# data
user: ad...@company.com
what: Task - record new hit single
when: June 01, 2012

becomes
adele.org > adele's desktop

#adele.org
* TODO Record new hit single <2012-06-01 Fri>



Am I Don Quixote slaying phantom dragons? 


Brian Dunbar
brian.dun...@gmail.com






Re: [O] org-mime-htmlize and org-preview-latex-fragment

2012-03-27 Thread Eric Schulte
Bastien  writes:

> Eric Schulte  writes:
>
>>> I am very confused the code in question contains a line of
>>> the sort:
>>>  (org-export-with-LaTeX-fragments "dvipng")
>
> Me too.  This should be 
>
>   (org-export-with-LaTeX-fragments 'dvipng)
>
> Fixed.
>
> Please confirm the original issue is fixed.
>
> Best,

Confirmed, I can once again send inline LaTeX fragments in email.

Thanks for taking care of this.

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



[O] #+ATTR_HTML ineffetive in recent org_mode?

2012-03-27 Thread Matt Price
Hi,

I pulled from git yesterday and am having trouble with #+ATTR_HTML in html
export -- from what I cna tell, the #+ATTR_HTML: lines are just being
ignored.  Has anyone else seen this? I've inlined a very simple test file
below, perhaps there are errors that I'm missing?


 test.org

In the dashboard, take note of the "Publications" area in the lefthand side:
#+ATTR_HTML: alt="cat/spider image" title="Action!" align="right"
[[file:~/publications.jpeg]]

---


Re: [O] Sticky Agenda buffer: Announcement and request for testing

2012-03-27 Thread Martyn Jago
Rainer Stengele  writes:


[...]

+1

Works very well for me. 

My Org Agenda usage has modified somewhat thanks to the use of
'org-agenda-sticky and I really like my current usage.

Thanks!

Martyn

---
Org-mode version 7.8.06 (release_7.8.03.594.g013d)
GNU Emacs 24.0.94.1 (x86_64-apple-darwin, NS apple-appkit-1038.36)
 of 2012-02-28 on bob.porkrind.org




[O] Document Freedom Day tomorrow

2012-03-27 Thread Bastien
Dear all,

tomorrow is the "Document Freedom Day": 

  http://documentfreedom.org

I will be online and connected to the IRC channel #org-mode
from 9:30am to 6:30pm (Paris time), with a break at lunch.

Is anyone interested in participating to the improvement of
Org's documentation during the day?

Here is a suggested list of tasks:

- org.texi enhancement: fix typos, spelling mistakes and other
  problems with the main documentation file org.texi.

- Worg tutorials: write tutorials that are currently missing:
  http://orgmode.org/worg/org-tutorials/index.html#sec-7

- Org screencasts: select a list of useful screencast to have
  and review/publish them.

- Org/Worg documentation translations: translate tutorials and
  main documentation (org.texi, orgcard.tex, etc).

If you can spend some time on #org-mode to participate to this
that'd be great!

Thanks,

-- 
 Bastien



Re: [O] "Symbol's function definition is void: org-string-nw-p"

2012-03-27 Thread aitor
Hi,

On Mon, Mar 26, 2012 at 11:14:37AM -0400, Nick Dokos wrote:
> Steven Buczkowski  wrote:
> 
> ...
> Yup: apt-get will get you an ancient org-mode release.
> 
> You probably ended up with a "frankenstein" org-mode install with bits
> and pieces coming from various places: I'd suggest doing "apt-get remove
> org-mode" to get rid of the ancient version and then reinstalling from
> the tar file - or, perhaps even better, the git repository: most of us
> have found that staying on the bleeding edge is a rewarding experience
> (even if an occasionally bloody :-) one - but that happens only
> rarely). And even if you run into trouble, with git it is easy to
> backtrack and use an official release.  Make sure to follow to the
> letter the installation instructions in the manual in these cases.

I had the same problem on ubuntu. What I did was:

- I get org-mode from git and install it in my ~/emacs/org-mode directory. 

$ cd ~/src/org-mode
$ make SHELL=/bin/bash prefix=/home/aitor/emacs/org-mode
$ make SHELL=/bin/bash prefix=/home/aitor/emacs/org-mode install

- In my .emacs, I have this:

(defun remove-org-dirs (dirs)
  "remove all list elements containing the matching '/org$'"
(let ((result))
  (dolist (dir dirs)
(unless (string-match "org\\'" dir)
  (setq result (cons dir result
  (nreverse result)))

(setq load-path (cons "~/emacs/org-mode/share/emacs/site-lisp"
  (cons "~/emacs/org-contrib/lisp"
(remove-org-dirs load-path

The "remove-org-dirs" function removes any system directory for "org"
and thus makes sure that my copy of org-mode gets loaded.

Hope this helps,

aitor



[O] [BUG] [babel] result wrapping with indented source blocks

2012-03-27 Thread Andreas Leha
Hi all,

there seems to be another bug related to indented babel source
blocks when the results are wrapped.

Here is an example.  Try to evaluate this block twice.  (Keeping the
indentation)

,
|   #+begin_src sh :results file wrap
| echo "test.txt"
|   #+end_src
| 
|   #+results:
|   :RESULTS:
|   [[file:test.txt]]
| :END:
`

The second evaluation fails with the error
#+begin_quote
progn: Search failed: #("^  :END:" 1 3 (face org-special-keyword fontified t))
#+end_quote

Regards,
Andreas




[O] org-mime-htmlize: visual representation (thunderbird)

2012-03-27 Thread Uwe Brauer
Hello

Now that the bug in org-mime-htmlize is fixed, I would like
to comment on the visual representation. Most likely this
has to do with the mml package.

When I write the following message 
Integral


$$\int fdx=0$$
And


\begin{equation} 
\sum_{\alpha} 
\end{equation}

and apply org-preview-latex-fragment and then
org-mime-htmlize and send this message to gmail. 
The 'gmail-reader' displays them fine.

However thunderbird does not and I apply the resulting eml 
file below (I presume a screenshot is not appropriated)

Now tunderbird itself has an extension (latex-it) which does
something similar to org-mime-htmlize, it sends latex math
as png. However there are "better* displayed, I attach the
relevant eml file below.

Could org-mime-htmlize use the structure of latex-it?

Thanks 

Uwe Brauer 

Attachments: first org, then latex-it

--- Begin Message ---
Integral 

$$\int fdx=0$$ 
And

\begin{equation}
\sum_{\alpha}
\end{equation}<><>--- End Message ---
--- Begin Message ---


  
  

  

--- End Message ---


Re: [O] org-replace-disputed-keys not working

2012-03-27 Thread Thorsten
Gregor Zattler  writes:

Hi Grekgor,

> * Thorsten  [27. Mar. 2012]:
>> Is there a windmove alternative (another way to navigate comfortably
>> between windows without doing C-x o several times), that works in both
>> console and X11 session? It is not much fun to use windmove if it only
>> works in certain situation and in others not. 
>
> There is window-numbering-mode which grabs the ALT+num key
> combos in order to switch to numbered windows.  I now am used to
> ^U-NUM to enter numerical arguments but its strange at first.
>
> Then there is switch-window which captures the ^X-o key binding,
> displays a number in each window and you are required to press
> the correct number in order to switch to its window.  While the
> numbers are shown one does not see the contents of the windows
> any more which is a bit distracting.
>
> Both work at the console.  

So there are quite a lot of possibilities.

I think I have to figure out a standard set of keybindings/window-moves
and set them in all my 3 window managers (tmux, stumpwm, and emacs
itself) in a similar way (only with different prefix), otherwise it will
drive me nuts to do the same thing in so many different ways. I will try
Bastiens library first, since it looks quite impressive.

Thanks for the tips.

-- 
cheers,
Thorsten




Re: [O] org-mime-htmlize and org-preview-latex-fragment

2012-03-27 Thread Uwe Brauer
>> On Tue, 27 Mar 2012 12:22:53 +0200, Bastien  wrote:

   > Eric Schulte  writes:
>> I am very confused the code in question contains a line of
>> the sort:
>>   (org-export-with-LaTeX-fragments "dvipng")

   > Me too.  This should be 

   >   (org-export-with-LaTeX-fragments 'dvipng)

   > Fixed.

   > Please confirm the original issue is fixed.
I confirm this for Xemacs 21.5.31 (Mule)

Thanks

Uwe 




Re: [O] org-replace-disputed-keys not working

2012-03-27 Thread Thorsten
suvayu ali  writes:

Hi,

> On Tue, Mar 27, 2012 at 00:08, Thorsten  wrote:
>> I started the emacs-daemon with that option, but it did not help
>> unfortunately. But it seems windmove.el only works in X11 anyway, not in
>> console sessions? At least for me the shift character is ignored in a
>> console session and doing C-h k for S- gives:
>
> That is an issue with your terminal emulator. I have faced that too but
> haven't had time to look into it in detail.
>
> I also use windmove but with the meta (M, Alt on linux) key. This
> however has the disadvantage of conflicting even more with org. So I use
> the shift key with org. So in the end windmove works in all modes
> (except org) for all sessions (X and terminal), it works with hiccups
> with org only in an X session.

M- is somehow used by Archlinux itself it seems, they change
tty's on my sytem and don't get through to the application.

> These are my relevant settings:
>
>   ;; navigate thru windows using M-
>   (windmove-default-keybindings 'meta)
>
>   ;; Make windmove work in org-mode with 'shift as modifier:
>   (add-hook 'org-shiftup-final-hook 'windmove-up)
>   (add-hook 'org-shiftleft-final-hook 'windmove-left)
>   (add-hook 'org-shiftdown-final-hook 'windmove-down)
>   (add-hook 'org-shiftright-final-hook 'windmove-right)
>
> Hope this will help.

Thanks, that looks like a straight-forward solution. I'll check it out. 

-- 
cheers,
Thorsten




Re: [O] Bug: Tag Completion Not Prompting for all tags

2012-03-27 Thread Bastien
Hi Mike,

Mike McLean  writes:

> 8 Type tag_ followed by 
>
> The expected result is a completion list of tag_a and tag_b, this
> does not work and the Minibuffer prompts [No match]

Fixed.

> Note that if I were to remove the single characters
> for tag_a and tag_b completion works for those two but not for
> the Personal tag from the file

Fixed.

> Shouldn't free tag entry always show all possible tags, regardless of
> the setting of or use of fast tag completion?

I think so -- thanks a lot for the detailed report.

Best,

-- 
 Bastien



Re: [O] org-replace-disputed-keys not working

2012-03-27 Thread Thorsten
Bastien  writes:

Hi Bastien,

> Thorsten  writes:
>
>> Is there a windmove alternative (another way to navigate comfortably
>> between windows without doing C-x o several times), that works in both
>> console and X11 session? It is not much fun to use windmove if it only
>> works in certain situation and in others not. 
>
> You might want to try windresize:
>
>   http://lumiere.ens.fr/~guerry/u/windresize.el
>
> I hacked this quite a while ago because windmove.el didn't fit
> my need.  I don't know if I tested it in a console... 
>
> HTH,

Wow, almost 1000 lines and more than 50 defuns ... a real hidden gem, it
seems. I will try it out, it is probably much more than what I was
looking for in terms of functionality, but maybe I can figure out a core
set of functions that work consistently in most situations
(console, X11, orgmode ...).

Thanks a lot!
-- 
cheers,
Thorsten



Re: [O] org-mime-htmlize and org-preview-latex-fragment

2012-03-27 Thread Bastien
Eric Schulte  writes:

>> I am very confused the code in question contains a line of
>> the sort:
>>   (org-export-with-LaTeX-fragments "dvipng")

Me too.  This should be 

  (org-export-with-LaTeX-fragments 'dvipng)

Fixed.

Please confirm the original issue is fixed.

Best,

-- 
 Bastien



Re: [O] org-mime-htmlize and org-preview-latex-fragment

2012-03-27 Thread Uwe Brauer
>> On Mon, 26 Mar 2012 07:31:19 -0400, Eric Schulte
>>  wrote:

   > Uwe Brauer  writes:
   >> 

   > This functionality certainly used to work (and was one of my main
   > reasons for using org-mime-htmlize).  There is a new error in the
   > `org-export-string' function when `org-export-with-LaTeX-fragments' is
   > set to "dvipng" which is causing export to fail.  To exercise this bug
   > run the following elisp snippet.

   >   (let ((org-export-with-LaTeX-fragments "dvipng"))
   > (org-export-string "A fraction $\\frac{1}{2}$." 'html "/tmp/"))

   > Which throws the following error.

   >   org-format-latex: Unknown conversion type nil for latex fragments

   > Once this bug is fixed the use of LaTeX to generated inline images with
   > Org-mime should work once again.

I confirm this error for Xemacs 21.5.31. Is this bug already
being reported and registered?

Thanks

Uwe 




Re: [O] [Request] Export comments as comments

2012-03-27 Thread Bastien
Hi Jonathan,

Jonathan Leech-Pepin  writes:

> Would it be possible to add the ability to export comments included
> in an Org file to the destination format when comments are supported,
> for example in LaTeX and HTML?

the current exporters don't allow this, but the new export engine 
by Nicolas makes it possible.  

The plan is to merge the new export engine into Org's core before
version 8.0, so please stay tuned.

Best,

-- 
 Bastien



Re: [O] [PATCH] link descriptions in :file results of src blocks

2012-03-27 Thread Bastien
Hi Andreas,

I let Eric handle this patch.  Even if the change is small, 
it is significant: in this case, it's nice to send a ChangeLog
(as stated in http://orgmode.org/worg/org-contribute.html), 
otherwise Eric will have to add it.   Thanks to take this in 
consideration for future patches!

Best,

-- 
 Bastien



Re: [O] [Bug] regression in the latex exporter

2012-03-27 Thread Andreas Leha
Bastien  writes:

> Hi Andreas,
>
> Andreas Leha  writes:
>
>> there seems to be a regression with the legacy latex exporter.
>
> This bug existed for about 1 hour yesterday and has been fixed.
>
> Thanks,

Hi Bastien,

yup, confirmed.  Bad luck for me...

- Andreas




[O] Create preamble from an .org file ?

2012-03-27 Thread Vincent Beffara

Hi,

To manage my personal website I would like to use the publish function 
of org-mode. For the contents of pages, there is no problem, and the 
auto-sitemap feature is promising. however, I would like to have some 
common contents to all the individual pages, and they would best fit in 
the preamble part. Essentially, I would have a preamble.org file 
containing this:



#+IMPORT: sitemap.org

* A few links
  - link 1
  - link 2

* Contact info
  - address
  - email


and the contents of the preamble would be an html version of that (of 
course without all the  section and so on). Optimally, of course, 
preamble.org should not be linked from the site map.


How do I do that? Maybe a dedicated .org file for the navigation bar is 
not the right way to do, is there a better one?


Thanks,

/vincent




[O] [PATCH] link descriptions in :file results of src blocks

2012-03-27 Thread Andreas Leha
Hi all,

this small patch adds :filelinkdescr to the list of possible header
arguments for babel source blocks.
Its intented functionality is to allow source blocks to return links to
files with description.

Two small examples:

,[ example1 ]
| #+begin_src R :results graphics :file test.png :filelinkdescr here
|   plot(1:10)
| #+end_src
| 
| #+results:
| [[file:test.png][here]]
`

,[ example2 ]
| #+begin_src R :results graphics :file test2.png :filelinkdescr
|   plot(1:10)
| #+end_src
| 
| #+results:
| [[file:test2.png][test2.png]]
`

If used with value ("here" in the example1) that value will become the
description.  If used without value (as in example2), the description is
taken from either the :file header argument or the results of the code block
evaluation (in that order).

Have not done much testing yet, though.

Regards,
Andreas

>From 698570cb9938ee1f4dd1472cb13b32d08d108cbb Mon Sep 17 00:00:00 2001
From: Andreas Leha 
Date: Tue, 27 Mar 2012 10:33:32 +0200
Subject: [PATCH] new source block header argument :filelinkdescr

---
 lisp/ob.el |   10 +-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/lisp/ob.el b/lisp/ob.el
index d27a394..0efef3e 100644
--- a/lisp/ob.el
+++ b/lisp/ob.el
@@ -400,6 +400,7 @@ then run `org-babel-pop-to-session'."
 (eval	. ((never query)))
 (exports	. ((code results both none)))
 (file	. :any)
+(filelinkdescr . :any)
 (hlines	. ((no yes)))
 (mkdirp	. ((yes no)))
 (no-expand)
@@ -1833,7 +1834,14 @@ code  the results are extracted in the syntax of the source
   (progn
 (setq result (org-babel-clean-text-properties result))
 (when (member "file" result-params)
-  (setq result (org-babel-result-to-file result
+	  (progn (when (assoc :filelinkdescr (nth 2 info))
+		   (let ((filelinkdescr (or (cdr (assoc :filelinkdescr (nth 2 info)))
+	(cdr (assoc :file (nth 2 info)))
+	result)))
+		 (when filelinkdescr
+		   (setq result
+			 (list result filelinkdescr)
+		 (setq result (org-babel-result-to-file result)
 (unless (listp result) (setq result (format "%S" result
   (if (and result-params (member "silent" result-params))
   (progn
-- 
1.7.9.1



Re: [O] org-replace-disputed-keys not working

2012-03-27 Thread Gregor Zattler
Hi Thorsten, org-mode users,
* Thorsten  [27. Mar. 2012]:
> Is there a windmove alternative (another way to navigate comfortably
> between windows without doing C-x o several times), that works in both
> console and X11 session? It is not much fun to use windmove if it only
> works in certain situation and in others not. 

There is window-numbering-mode which grabs the ALT+num key
combos in order to switch to numbered windows.  I now am used to
^U-NUM to enter numerical arguments but its strange at first.

Then there is switch-window which captures the ^X-o key binding,
displays a number in each window and you are required to press
the correct number in order to switch to its window.  While the
numbers are shown one does not see the contents of the windows
any more which is a bit distracting.

Both work at the console.  

Ciao, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-



Re: [O] link to pdf in latex export

2012-03-27 Thread Andreas Leha
Christian Moe  writes:

> On second thought, not a very good solution. It only solves your
> problem if you always want to link to a certain file type (here PDFs)
> and not sometimes inline it as a graphic.
>
> I usually just fix this manually, by evaluating the source once,
> removing the #+RESULT line and adding a description part to the
> resulting link so it is exported as a link hereafter.
>
> Yours,
> Christian
>
> On 3/27/12 9:32 AM, Christian Moe wrote:
>> Hi,
>>
>> Try customizing org-export-latex-inline-image-extension and leaving
>> out "pdf".

Hi Christian,

thanks for your answer.  I am just preparing a patch to automate this
(for my use-case at least)

Cheers,
Andreas




Re: [O] link to pdf in latex export

2012-03-27 Thread Andreas Leha
suvayu ali  writes:

> On Mon, Mar 26, 2012 at 20:28, Andreas Leha
>  wrote:
>> The plots can be found in the additional file
>> call_produce_plot[ :results graphics :file sth.pdf]()[:results file].
>>
>> How do I do that?
>
> I don't know about output from babel blocks, but I think you can link
> to a normal pdf by providing a description to the link.

Hi suvayu ali,

thanks.  This works.

Cheers,
Andreas




Re: [O] link to pdf in latex export

2012-03-27 Thread Christian Moe
On second thought, not a very good solution. It only solves your 
problem if you always want to link to a certain file type (here PDFs) 
and not sometimes inline it as a graphic.


I usually just fix this manually, by evaluating the source once, 
removing the #+RESULT line and adding a description part to the 
resulting link so it is exported as a link hereafter.


Yours,
Christian

On 3/27/12 9:32 AM, Christian Moe wrote:

Hi,

Try customizing org-export-latex-inline-image-extension and leaving
out "pdf".




Re: [O] org-replace-disputed-keys not working

2012-03-27 Thread Bastien
Hi Thorsten,

Thorsten  writes:

> Is there a windmove alternative (another way to navigate comfortably
> between windows without doing C-x o several times), that works in both
> console and X11 session? It is not much fun to use windmove if it only
> works in certain situation and in others not. 

You might want to try windresize:

  http://lumiere.ens.fr/~guerry/u/windresize.el

I hacked this quite a while ago because windmove.el didn't fit
my need.  I don't know if I tested it in a console... 

HTH,

-- 
 Bastien



Re: [O] [Bug] regression in the latex exporter

2012-03-27 Thread Bastien
Hi Andreas,

Andreas Leha  writes:

> there seems to be a regression with the legacy latex exporter.

This bug existed for about 1 hour yesterday and has been fixed.

Thanks,

-- 
 Bastien



Re: [O] [patch] Need test: New method which is used to preview latex fragements

2012-03-27 Thread Bastien
Hi,

FengShu  writes:

> this is v5 patch, if you want to use it,you can apply the patch and
> set like this:

since you're still working on this patch, some advice:

- use a shorter line for the overall description

- create an Emacs-ready ChangeLog with `C-x 4 a' that will be the
  content of the commit message.

I had a quick look at the patch and this looks like a great addition --
*BUT* you need to sign FSF papers in order for this patch to be applied
to master.  I'm sending instructions in private.

Thanks for your work!

-- 
 Bastien



Re: [O] Plotting (with gnuplot) using dates timestamps

2012-03-27 Thread Karl Voit
* Ian Barton  wrote:
>
> Haivng played with gnuplot recently, I would suggest that your first 
> statement should always be "reset". Otherwise you may find settings you 
> have been trying out persist over different runs of your babel code. 

Great tipp, thanks!

> This can be very confusing and may lead to premature hair loss.

Since you actually can not see me: way too late :-)

-- 
Karl Voit




Re: [O] link to pdf in latex export

2012-03-27 Thread Christian Moe

Hi,

Try customizing org-export-latex-inline-image-extension and leaving 
out "pdf".


Yours,
Christian

On 3/26/12 8:28 PM, Andreas Leha wrote:

Hi all,

I have a question concerning the latex export.

Suppose, I have a pdf, that I want to have a link to in the exported
latex doc, not embedded as graphic:

Example:
#+name: produce_plot
#+begin_src R :exports none :results graphics :file sth.pdf
   plot(1:10)
   plot(1:20)
#+end_src

The following is embedded as graphic, but I'd like to just have a
link to the pdf.

The plots can be found in the additional file
call_produce_plot[ :results graphics :file sth.pdf]()[:results file].

How do I do that?

Best,
Andreas