[O] Bug in HTML export

2011-09-25 Thread Pavel Panchekha
Ampersands in #+AUTHOR: declarations are not correctly escaped by Org-mode.

To reproduce, export:

#+AUTHOR: a & b

You'll find the line



in the output, but it should be



The same problem occurs with other special characters in author
declarations, and also in #+DATE: declarations.

This is breaking the "XHTML 1.0 Strict" claim.

- Pavel Panchekha


Re: [O] Testing org-export-as-odt-and-open

2011-09-25 Thread Jambunathan K

Hello Eric

> Hello 
>
> I'm testing org-export-as-odt-and-open on Jambunathan's test.org file. 
> I get error message "Unable to create odt file (53)". 

What version of zip are you using. 53 that you see here is the exit code
from the zip command. I am not sure what that error means. 

Does the failure happen always or transitorily?

> Is this caused by the fact that files are created in different directories?
> a) org-export-as-odt-and-open creates the file e:/User/home/pub_html/test.odt
> wheras 
> b) the xml files are written in directory c:/Documents and
> Settings/GCVD3476/Local Settings/Temp/odt-4928fzB/

What the exporter does is this,

$ cd tmp-dir
$ zip -rmTq test.odt .
$ mv test.odt pub-dir
$ rm tmp-dir

When the zip command fails, you can replay the above sequence by hand
and see what error zip is generating

OR

> ~/.emacs.d/elpa/org-odt-20110702/contrib/odt/etc/schema/od-schema-v1.2-cs01.rnc

That version is almost 3 months old. I have made lots of bug fixes and
improvments since then. I have also modified the exporter a few minutes
ago so that the output from the zip command also appears in the
*Messages* buffer.

I STRONGLY RECOMMEND that you switch to the development version of
Orgmode. Please refer to http://orgmode.org/worg/org-faq.html - sections
"How do I keep current with bleeding edge development?" or "I don't use
git. Can I download bleeding edge .zip and .tar.gz archives?"

If you would very much want to work only with ELPA tarballs, maybe you
should wait for a day or two. I was planning to build one anyways and
now I have an excuse why I should build one.

> The debugger is entered when: Creating odt file using "zip -rmTq test.odt ."
>
> Did I forget to configure some variable or should I configure variable
> org-export-publishing-directory (currently: "e:/User/home/pub_html/") 
> differently? 

May be you can try resetting org-export-publishing-directory to nil just
for testing purposes and see whether it makes any difference.

> Below an extract from *Messages* and *Batmcktrace* buffers. 
>
> Cordially, 
> Eric 
.>
> Debugger entered--Lisp error: (error "Unable to create odt file (53)")
>   signal(error ("Unable to create odt file (53)"))
>   error("Unable to create odt file (%S)" 53)
>   org-odt-save-as-outfile("e:/User/home/pub_html/test.odt" 
> (:latex-image-options nil :exclude-tags ("noexport") :select-tags ("export")
> :publishing-directory "~/pub_html" :timestamp nil :expand-quoted-html t 
> :html-table-tag " rules=\"groups\" frame=\"hsides\">" 
> :xml-declaration (("html" . "") 
> ("php" . " encoding=\\\"%s\\\" ?>\"; ?>")) :html-postamble auto :html-preamble t
> :html-extension "html" :inline-images maybe :convert-org-links t :agenda-style
> "" :style-extra "" :style "" :style-include-scripts t :style-include-default t
> :table-auto-headline t :tables t :time-stamp-file t :creator-info t 
> :email-info
> nil :author-info t :email "kjambunat...@gmail.com" ...))
>   org-do-lparse(nil hidden nil nil nil nil)
>   org-lparse("odt" "odt" nil hidden)
>   org-lparse-and-open("odt" "odt" nil)
>   org-export-as-odt-and-open(nil)
>   call-interactively(org-export-as-odt-and-open)
>   org-export(nil)
>   call-interactively(org-export nil nil) 
-- 



Re: [O] [feature request] More flexible repeats

2011-09-25 Thread John Wiegley
> Michael Steeves  writes:

> If I have something that I want to track in terms of consistency, and want
> to do it during the weekdays, is there a way I could express that other then
> having a series of 5 habits, one for each day of the week, each one of which
> would repeat every week?

The best answer I have for that is to schedule the habit with a daily repeat,
and then just check it off for the weekend days when it doesn't apply.  Then
you're being consistent, it's just that "done" doesn't necessarily mean that
you physically did something.

John




Re: [O] How to change latex export of links from \href to \url ?

2011-09-25 Thread Pierfranco Minsenti
Thank you. It works.
pierfranco

2011/9/25 Jambunathan K 

>
> Low on caffeine :-)
>
> > Under M-x customize-group RET org-export-latex RET
>^^
>missed this
>
>
> --
>


Re: [O] How to change latex export of links from \href to \url ?

2011-09-25 Thread Jambunathan K

Low on caffeine :-)

> Under M-x customize-group RET org-export-latex RET
^^
missed this 


-- 



Re: [O] How to change latex export of links from \href to \url ?

2011-09-25 Thread Jambunathan K
Pierfranco Minsenti  writes:

> Hello,
>
>
> I would like to change how hyperlinks are exported from org mode to
> LaTeX.
> Infact now links are exported as a couple of \href but I've found out
> that in the case of long URLs it is impossible to have them broken
> properly in different lines using in the latex file commands such asĀ 
> \usepackage{breakurl} becasue this and other similar strategies don't
> work with \href
>
> So that's why I'd like to export links as \url and obviously not as a
> couple but as single instance.
>
> Does anybody knows how to obtain it in org mode?

Under M-x customize-group RET org-latex RET

you will find

,[ C-h v org-export-latex-href-format RET ]
| org-export-latex-href-format is a variable defined in `org-latex.el'.
| Its value is "\\href{%s}{%s}"
| 
| Documentation:
| A printf format string to be applied to href links.
| The format must contain either two %s instances or just one.  
| If it contains two %s instances, the first will be filled with 
| the link, the second with the link description.  If it contains
| only one, the %s will be filled with the link.
| 
| You can customize this variable.
| 
| [back]
`

> Thank you in advance for your help.
>
> Pierfranco
>
>
>

-- 



[O] 'exit' required on gnuplot code block for svg output

2011-09-25 Thread Edward DeMeulle
Has anyone else noticed that an 'exit' line is needed on a code block
for gnuplot to generate the needed  closing tag?

-ED-




[O] How to change latex export of links from \href to \url ?

2011-09-25 Thread Pierfranco Minsenti
Hello,


I would like to change how hyperlinks are exported from org mode to LaTeX.
Infact now links are exported as a couple of \href but I've found out that
in the case of long URLs it is impossible to have them broken properly in
different lines using in the latex file commands such
as \usepackage{breakurl} becasue this and other similar strategies don't
work with \href

So that's why I'd like to export links as \url and obviously not as a couple
but as single instance.

Does anybody knows how to obtain it in org mode?

Thank you in advance for your help.

Pierfranco


[O] [patch] contrib/lisp/org-elisp-symbol: Set type if symbol is defuned but not fbound

2011-09-25 Thread David Maus
Another small patch for org-elisp-symbol: Set the symbol type to
"Function or command" if it is defuned but not fbound when
`org-elisp-symbol-store-link' is called.

Best,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de
From 09f5f322d418afe34503d8758ad123cd6c8045a0 Mon Sep 17 00:00:00 2001
From: David Maus 
Date: Sun, 25 Sep 2011 18:16:54 +0200
Subject: [PATCH] Set symbol type if defun but symbol not fbound

* org-elisp-symbol.el (org-elisp-symbol-store-link): Set symbol type
if defun but symbol not fbound.

If the symbol is not fbound but defuned, set type to "function or
command".
---
 contrib/lisp/org-elisp-symbol.el |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/contrib/lisp/org-elisp-symbol.el b/contrib/lisp/org-elisp-symbol.el
index 6eb8114..340272b 100644
--- a/contrib/lisp/org-elisp-symbol.el
+++ b/contrib/lisp/org-elisp-symbol.el
@@ -106,6 +106,7 @@
  ((user-variable-p sym-name) "User variable")
  ((string= def "defvar") "Variable")
  ((string= def "defmacro") "Macro")
+ ((string= def "defun") "Function or command")
  (t "Symbol")))
 (args (if (match-string 3)
   (mapconcat (lambda (a) (unless (string-match "^&" a) a))
-- 
1.7.2.5



pgpLXa5JB8hPg.pgp
Description: PGP signature


Re: [O] bug: org-mouse broken

2011-09-25 Thread Michael Brand
Hi Nicolas

On Fri, Sep 23, 2011 at 18:45, Nicolas Goaziou  wrote:
> Michael Brand  writes:
>> There is an issue with org-feed. The backtrace is attached. I hope
>> this is enough to reproduce.
>
> Fixed. Here comes the new patch.
>
> Thanks again.

Only now I stumbled upon an issue with org-shiftleft and
org-shiftright which I use rarely. On a heading without any todo
keyword and with
(setq org-todo-keywords '((sequence "1" "2" "3" "|" "-3" "-2" "-1")))
- C- changes to -2 instead of -1
- C- states the buffer modified but leaves the heading still
  without any todo keyword instead of 1

After verifying I reapplied the affected patch this time because this
issue doesn't bother me much.

Michael



Re: [O] [babel] BUG in :session

2011-09-25 Thread Martyn Jago
Hi Sebastien

"Sebastien Vauban"
 writes:

> Hi Martyn and Eric,
>
> Martyn Jago wrote:
>> Eric Schulte  writes:
>>> Martyn Jago  writes:
 Eric Schulte  writes:
> I've just pushed up what will hopefully be a more general solution.
> Basically, language-specific test files can now signal errors if they
> have unmet dependencies.  These are then intercepted by `org-test-load'
> and the file is not added to the test suite.  Hopefully this will allow
> language-specific tests to be written without breaking the config-less
> test suite.
>
> See the top of test-ob-R.el for an example usage.
>
> Cheers -- Eric

 Unfortunately this is still broken for me. Given the exe exists but the
 feature doesn't (ie no personal config), the following line causes the
 error `peculiar error' !

(signal 'org-test-lib-not-found "ess"))
>
> FYI, same for me, with the "batch tests", on a git update'd copy done 2 mins
> ago.
>
> #+begin_src sh
> emacs -Q --batch -l "/cygdrive/c/Program 
> Files/Emacs-24.0/lisp/emacs-lisp/ert.el" -l "/cygdrive/c/Program 
> Files/Emacs-24.0/lisp/emacs-lisp/ert-x.el" -l 
> ~/src/org-mode/testing/org-test.el --eval "(setq org-confirm-babel-evaluate 
> nil)" -f org-test-run-batch-tests
> #+end_src
>
> #+results:
> OVERVIEW
> Loading vc-git...
> OVERVIEW
> OVERVIEW
> OVERVIEW
> OVERVIEW
> OVERVIEW
> OVERVIEW
> OVERVIEW
> OVERVIEW
> OVERVIEW
> OVERVIEW
> OVERVIEW
> Loading /cygdrive/c/home/sva/src/org-mode/testing/lisp/test-ob-R.el 
> (source)...
> peculiar error
>
> This is on Windows XP SP3, with a Cygwin Emacs (when run from terminal;
> otherwise, it is a Win32 binary from the FSF).
>

Its really great to hear you are running the tests on Windows. At some
point I hope to test with the EmacsW32 port.

Best, Martyn




Re: [O] [babel] BUG in :session

2011-09-25 Thread Martyn Jago
Hi Eric

Eric Schulte  writes:

> Martyn Jago  writes:
>
>> Hi Eric
>>
>> Eric Schulte  writes:
>>
>>> Martyn Jago  writes:
>>>
 Hi Eric

 Eric Schulte  writes:

> Hi Martyn,
>
> I've just pushed up what will hopefully be a more general solution.
> Basically, language-specific test files can now signal errors if they
> have unmet dependencies.  These are then intercepted by `org-test-load'
> and the file is not added to the test suite.  Hopefully this will allow
> language-specific tests to be written without breaking the config-less
> test suite.
>
> See the top of test-ob-R.el for an example usage.
>
> Cheers -- Eric

 Unfortunately this is still broken for me. Given the exe exists but the
 feature doesn't (ie no personal config), the following line causes the
 error `peculiar error' !

(signal 'org-test-lib-not-found "ess"))

>>>
>>> Oh,
>>>
>>> I forgot to update the types of errors that I am catching after adding a
>>> new error type for missing libraries (e.g., ess).  This should now be
>>> fixed.
>>>
>>
>> There still seems to be a problem with test-ob-R - same error "peculiar
>> error".
>>
>
> OK, I see this error as well.  I've switched from using errors to signal
> a missing dependency to using catch/throw blocks.  This seems to
> actually work, hopefully the test suite should now run w/o error.
>

This now works great for me. 

>>
>>>
>>> Is there a way to see the output of the test run, all I can find is the
>>> command which is executed.
>>
>> Yes - just click on the org-mode_Emacs_24 (title) link and then on the
>> build log link. There isn't much of a log on the failing tests since
>> the entire test run is broken by the signal. 
>>
>> You can checkout the build log for my-org-mode-dev to see what you
>> should get.
>>
>
> Great, doing this I can see that everything is now running successfully
> http://martynjago.com:/builds/org-mode_Emacs_24/4446e50/build.log
>
> Very nice system, I wonder if we could run something like this on the
> Org-mode server.

It should be fairly easy to set up a similar system on the Org-mode
server, and very useful I would have thought. I agree it is a very
useful system and have used it several times on other projects.

Best, Martyn





Re: [O] [PATCH] Modifications to enable test script to run with emacs-23 and emacs-22

2011-09-25 Thread Martyn Jago
Hi David

David Maus  writes:

> Hi Eric,
> Hi Martyn,
>
> At Tue, 20 Sep 2011 09:03:27 -0600,
> Eric Schulte wrote:
>>
>> Applied, Thanks! -- Eric
>
> I noticed that newlines in the commit messages of patches by Martyn
> are somehow messed up:
>
> ,
> | Modifications to enable test script to run with emacs-23 and
> emacs-22 * testing/org-test.el: enable test script to run with
> emacs-23 and emacs-22 * testing/lisp/test-org-exp.el: added org-ascii
> requirement
> `

I too have noticed this - I generate the commit message in magit and
generate the patch with git format-patch, and at that point newlines
still appear to be honoured here. I then attach the patch inline to
gnus. Any solutions welcome.

Best, Martyn




Re: [O] [PATCH] Modifications to enable test script to run with emacs-23 and emacs-22

2011-09-25 Thread David Maus
Hi Eric,
Hi Martyn,

At Tue, 20 Sep 2011 09:03:27 -0600,
Eric Schulte wrote:
>
> Applied, Thanks! -- Eric

I noticed that newlines in the commit messages of patches by Martyn
are somehow messed up:

,
| Modifications to enable test script to run with emacs-23 and emacs-22 * 
testing/org-test.el: enable test script to run with emacs-23 and emacs-22 * 
testing/lisp/test-org-exp.el: added org-ascii requirement
`

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


pgpdSTFxk8QrI.pgp
Description: PGP signature


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

2011-09-25 Thread David Maus
At Thu, 22 Sep 2011 07:44:42 -0600,
Eric Schulte wrote:
>
> >
> >>
> >> >
> >> > F test-ob-exp/org-babel-exp-src-blocks/w-no-file
> >> > Testing export from buffers which are not visiting any file.
> >> > (wrong-type-argument stringp nil)
> >> >
> >> > F test-ob-exp/org-babel-exp-src-blocks/w-no-headers
> >> > Testing export without any headlines in the org-mode file.
> >> > (wrong-type-argument stringp nil)
> >> >
> >> > F test-ob-lob/export-lob-lines
> >> > Test the export of a variety of library babel call lines.
> >> > (wrong-type-argument stringp nil)
> >> >
> >>
> >> I have no idea what could be going wrong with these executions, would it
> >> be difficult to generate backtraces for these failures?
> >
> > No, its really easy (as expected w/ Emacs): Section on interactive
> > debugging ERT mentions "b" to create the backtrace.
> >
> > In case of w-no-file and w-no-headers `org-todo-line-regexp' is bound
> > to nil, in export-lob-lines `org-maybe-keyword-time-regexp' is bound
> > to nil. Backtraces are attached.
> >
>
> So,
>
> Could it be that for some reason using Emacs22 all variable whose values
> are set in `org-set-regexps-and-options' immediately following
>
>   ;; Compute the regular expressions and other local variables
>
> in org.el are somehow not having their values set?

Nope, turns out that .org is not in Emacs22's auto-mode-alist and thus
the examples files are not opened in Org mode. Pushed a fix, turn on
Org mode before running the test body.

Now I get a beautiful:

,
| Selector: "\\(org\\|ob\\)"
| Passed: 111
| Failed: 0
| Total:  111/111
|
| Started at:   2011-09-25 09:26:09+0200
| Finished.
| Finished at:  2011-09-25 09:26:13+0200
|
| 
...
`

for GNU Emacs 22.3.2 (i686-pc-linux-gnu) of 2011-05-28 on x60s with
Org-mode version 7.7 (release_7.7.323.g07d11) \o/

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


pgpFqAbRYmKJ1.pgp
Description: PGP signature