[O] Checkboxes for description lists

2012-06-07 Thread Robert Yates
Hi,

Ive been using org-mode for a while, and it is quite excellent!

I have a question about checkboxes I came across recently. What is the
reason for disallowing the commands for adding and toggling checkboxes
on descripton list items (that is "- partA :: partB" list items) ?
(attempting to do so results in the message "Cannot add a checkbox to
a description list item")

As stated in the manual this can be toggled using
org-list-automatic-rules, but toggling this for checkboxes also
changes the way checkbox statistics are updated. Would it be possible
to "decouple" these two things, so that checkbox manipulation for
description list items would be possible, but statistics would still
automatically be updated, or is there a connection between the two
that I have missed?



Re: [O] Variable naming (old vs new exporter)

2012-06-07 Thread Nicolas Goaziou


Hello,

Samuel Wales  writes:

> My understanding from Bastien is that the old exporters will still be
> fully usable (my concerns are HTML and ASCII)?  Is this yours,
> Nicolas?

No. When they are ready, they will completely replace old
exporters. Only old exporters with no equivalent back-end for new export
engine will be preserved.


Regards,

-- 
Nicolas Goaziou




Re: [O] [babel] session initialization (was RE: python/babel inline images)

2012-06-07 Thread Eric Schulte
"Mikhail Titov"  writes:
[...]
>> > I would recommend using the `default-directory' variable.  That should
>> > hold the value of the directory of the Org-mode file or the value of the
>> > :dir header argument if present.
>> 
>> Huh... now it works... I remember I've tried before but for some reason it
>> was nil.. maybe typo though I have AC.
>> 
>> The only trick [1] is to use (file-truename default-directory) as Matlab
>> does not like ~.
>
> Turns out this does not work for octave for some reason. default-directory
> points to my home folder.
>
> Also I'm getting "ansi-color-process-output: Marker does not point anywhere"
> for Octave. So I have to C-c a couple of times on the block for the first
> time. First evaluation just launches session but breaks because of that
> error. Second time (when session is up) C-c works just fine and dumps
> result. Non-session version of Octave works as expected. I wonder if it is
> something Windows-specific... I can see test on :session for Octave and
> Achim Gratz said it passed tests.
>
> The problem occurs to me with git version of ob-octave.el as well. So I'm
> confident it is not me who broke something during experiments :-)
>
> Any idea? Matlab works just fine (session)!
>
> I'm afraid I'll leave all the things as is for now. Maybe someone else can
> fix it later.
>

Unfortunately the developer of matlab/octave support for Babel no longer
tracks this list, and I have no access to matlab/octave, so while I'm
happy to offer advice and commit patches I can't really improve support
for these languages.

RE: default-directory pointing to your home directory, my guess would be
that at the beginning of the `org-babel-execute:octave'
default-directory has the desired value, but then within the octave
comint buffer the value changes, so it should still be possible to use
`default-directory'.

The ansi-color-process-output stuff sounds like something that
octave-mode should be taking care of, i.e., not something directly
related to Org-mode.

Sorry I can't be of more assistance.

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



[O] Default emphasis regexp problems

2012-06-07 Thread Andreas Matthias
Hi,

the following cases fail to display italics correctly in org-mode 7.4:

- snip -

1. The user would also certainly think that “it’s all actually happening,”
simply because it /would be happening,/ albeit in an environment that is
different from the physical one his body is located in. We seem to have much
less difficulty than Jones acknowledging that one is able to perform such
activities in a /shared/ environment.

2. Obviously, cooking a dish presupposes that there /is/ a dish to be cooked.
Therefore, a crucial question in evaluating the possibility of cooking a dish
would be /whether there is food inside the kitchen,/ which the user could
process without leaving the virtual world. If this were the case, and we would
still uphold Jones’s judgement that cooking in a virtual world is impossible,
then indeed we would be confronted with something or other. If, on the other
hand, the impossibility of cooking a dish is due to the fact that there simply
/are/ no dishes inside that environment, then Jones’s criticism does not apply
to virtual environments at all.

3. This is another way in which we can understand Jones’s remark about there
being “no way [the dish] /is./” This is not an uncommon position.

- snip -

Including punctuation in italics passages is (as I understand it) preferred from
a typography point of view, but it breaks org-mode's emphasis regexp. An ad-hoc
adjustment of the default Emphasis Regexp Components solves the problem:

-- fix begin 
Org Emphasis Regexp Components: Hide Value
Allowed chars in pre  : "   ('\"{"
Allowed chars in post : "-  .,:!?;'\")}\\”"
Forbidden chars in border : "   ^M\n'"
Regexp for body   : "."
-- fix end --

As far as I can see, the change does not break anything, but I am not sure,
because I don't really understand the rationale behind all the choices in the
original regexp. Perhaps its author can have a look at my changes?

I suggest that the default be changed to fix the above problems, since the
normal user cannot be expected to fix the regexp himself.

Thanks!

A.M.





Re: [O] [babel] session initialization (was RE: python/babel inline images)

2012-06-07 Thread Mikhail Titov
> -Original Message-
> From: emacs-orgmode-bounces+mlt=gmx...@gnu.org [mailto:emacs-orgmode-
> bounces+mlt=gmx...@gnu.org] On Behalf Of Mikhail Titov
> Sent: Thursday, June 07, 2012 6:03 PM
> To: 'Eric Schulte'
> Cc: emacs-orgmode@gnu.org
> Subject: Re: [O] [babel] session initialization (was RE: python/babel
inline
> images)
> 
> > >> ...
> > >>
> > >> How would I reliably refer to the org doc buffer from where
everything
> was
> > >> called? The following works just fine in session initialization code
> for
> > >> Matlab but not for Octave
> > >>
> > >
> > > (file-name-directory
> > >(car (delq nil (mapcar #'buffer-file-name (buffer-list)
> > >
> > > It works. But I have a feeling that it is not a reliable method. Any
> > > suggestions?
> > >
> >
> > I would recommend using the `default-directory' variable.  That should
> > hold the value of the directory of the Org-mode file or the value of the
> > :dir header argument if present.
> 
> Huh... now it works... I remember I've tried before but for some reason it
> was nil.. maybe typo though I have AC.
> 
> The only trick [1] is to use (file-truename default-directory) as Matlab
> does not like ~.

Turns out this does not work for octave for some reason. default-directory
points to my home folder.

Also I'm getting "ansi-color-process-output: Marker does not point anywhere"
for Octave. So I have to C-c a couple of times on the block for the first
time. First evaluation just launches session but breaks because of that
error. Second time (when session is up) C-c works just fine and dumps
result. Non-session version of Octave works as expected. I wonder if it is
something Windows-specific... I can see test on :session for Octave and
Achim Gratz said it passed tests.

The problem occurs to me with git version of ob-octave.el as well. So I'm
confident it is not me who broke something during experiments :-)

Any idea? Matlab works just fine (session)!

I'm afraid I'll leave all the things as is for now. Maybe someone else can
fix it later.

M.
 





[O] Problem with org-mobile-pull

2012-06-07 Thread Vikas Rawal
I am having a problem with org-mobile-pull. I am updating TODO state
of my file on my ipad. I then "sync" it, and do an org-mobile-pull. I
get an error of the following type

* Heading not found on level 1: Sample households, Nayanagar
  F(edit:todo) [[olp:nayanagar.org:Sample households,
  Nayanagar/Stratum C/C11][C11]]
** Old value
** New value
DONE
** End of edit

Please note that the change was made on third level heading which only
says: C11. Why am I getting this error on level 1.

Could someone please help.

Vikas

PS: I am on org-version 7.7. Am having some trouble shifting to an updated
version about which I have posted to the mailing list separately. I
have tested it with org-version 7.8.09 from debian repository but that
gives me the same error.







[O] Updating orgmode

2012-06-07 Thread Vikas Rawal
I have a debian system. I am trying to update orgmode using git. But
M-x org-version continues to show me version 7.7. How do I find where
is it picking up this version from? It seems to me that this is the
default version that shipped with my emacs. Debian repository has a
more updated version (7.8.09) in its repositories. But I do not see
much point in install it.

I could compile org correctly. The compiler seems to have installed
orgmode in /usr/share/emacs/site-lisp/org. But somehow emacs does not
seem to be picking it  up from there.

Will much appreciate help.

Thanks,

Vikas




[O] [BUG?] Strange effect of noweb name collision on LaTeX export

2012-06-07 Thread Ethan Ligon
#+TITLE:   Example of name collision bug
#+AUTHOR:
#+EMAIL:
#+DATE:  2012-06-07 Thu
#+OPTIONS:   H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t

* Figure and trivial code reference
  Here we have a figure.
  This example works as expected; we get a latex figure on export.

[[./foo.png]]

* Figure and trivial code reference (with collision)
  Here we have a figure and a trivial code block with a noweb reference.
  The difference is that the basename of the figure matches the noweb
  reference.  Instead of a figure on latex export, we get a hyperref!

[[./bar.png]]

#+BEGIN_SRC sh :exports none
#<>
#+END_SRC


-- 
Ethan Ligon, Associate Professor
Agricultural & Resource Economics
University of California, Berkeley



Re: [O] Converting table to properties

2012-06-07 Thread Vikas Rawal
This is a quick hack on org-table-transpose-table-at-point to print
out a property list instead of a table.

#+begin_src elisp

(defun vikas-convert ()
 "table to props"
 (interactive)
 (let ((contents
(apply #'mapcar* #'list
   ;; remove 'hline from list
  (delq nil (mapcar (lambda (x) (when (listp x) x))
  (org-table-to-lisp))
   (delete-region (org-table-begin) (org-table-end))
   (insert "  :PROPERTIES:\n")
   (insert (mapconcat (lambda(x) (concat "  :" (first x) ": " (second
   x) "\n" ))
  contents ""))
   (insert "  :END:\n\n")))

#+end_src

This transforms:

| PROP1 | PROP2 | PROP3 |
| 1 | 2 | 3 |

into

 :PROPERTIES:
 :PROP1: 1
 :PROP2: 2
 :PROP3: 3
 :END:


Your code worked flawlessly. Thank you.

Vikas


Re: [O] Clocking in emits an error

2012-06-07 Thread Nick Dokos
Avery Chan  wrote:

> It /does/ go away if I add the headline. So I think you're saying:
> 
> 1. Plain list checkbox items cannot have a time-estimate associated them.
> 2. Plain list checkbox items cannot track time.
> 3. Only headlines/TODO headlines can have these features.
> 
> I suppose that a TODO headline is effectively a checkbox; it would be nice, 
> though, to be able to
> time separate checkboxes (though I suspect that responsibility would lay upon 
> me to edit the
> appropriate org-mode file ).
> 
> Thanks for the clarification Nick.
> 

You are reading too much into my response: I simply reacted to the error
message that you got and figured that perhaps by adding a headline, it
would go away. That's a decent workaround for the problem IMO. But I
don't know *why* there is such a limitation: it may be an implementation
accident, it may be a deliberate design choice or it may be a bug - I
don't know.

Nick



Re: [O] [babel] session initialization (was RE: python/babel inline images)

2012-06-07 Thread Mikhail Titov
> -Original Message-
> From: emacs-orgmode-bounces+mlt=gmx...@gnu.org [mailto:emacs-orgmode-
> bounces+mlt=gmx...@gnu.org] On Behalf Of Eric Schulte
> Sent: Thursday, June 07, 2012 5:44 PM
> To: Mikhail Titov
> Cc: emacs-orgmode@gnu.org; 'Eric Schulte'
> Subject: Re: [O] [babel] session initialization (was RE: python/babel
inline
> images)
> 
> >> ...
> >>
> >> How would I reliably refer to the org doc buffer from where everything
was
> >> called? The following works just fine in session initialization code
for
> >> Matlab but not for Octave
> >>
> >
> > (file-name-directory
> >(car (delq nil (mapcar #'buffer-file-name (buffer-list)
> >
> > It works. But I have a feeling that it is not a reliable method. Any
> > suggestions?
> >
> 
> I would recommend using the `default-directory' variable.  That should
> hold the value of the directory of the Org-mode file or the value of the
> :dir header argument if present.

Huh... now it works... I remember I've tried before but for some reason it
was nil.. maybe typo though I have AC.

The only trick [1] is to use (file-truename default-directory) as Matlab
does not like ~.

Thanks!

M. 

[1]
http://stackoverflow.com/questions/291976/relative-path-to-absolute-path-in-
elisp





Re: [O] [babel] session initialization (was RE: python/babel inline images)

2012-06-07 Thread Eric Schulte
"Mikhail Titov"  writes:

>> -Original Message-
>> From: emacs-orgmode-bounces+mlt=gmx...@gnu.org [mailto:emacs-orgmode-
>> bounces+mlt=gmx...@gnu.org] On Behalf Of Eric Schulte
>> Sent: Wednesday, June 06, 2012 2:02 PM
>> To: Mikhail Titov
>> Cc: emacs-orgmode@gnu.org; 'henry atting'; 'Eric Schulte'
>> Subject: Re: [O] [babel] session initialization (was RE: python/babel inline 
>> images)
>> 
>> > Right now I have something like the following in that function
>> >
>> >  (comint-send-string
>> >   (get-buffer-process (current-buffer))
>> >   "set(0, 'defaultfigurevisible', 'off');\n")
>> >
>> > I do it there as it does not make sense to call for each block. I
>> > was about to write that ob-R does show stuff but I believe it was
>> > in earlier versions of ob-R.el or something as I've checked and
>> > indeed nothing appears on screen as code being wrapped in a device
>> > output block.
>> >
>> 
>> I'm not aware of a way to run code on the start of a session.  I do see
>> how this could be a useful addition.
>
> So the fragment above does look legitimate to you? I just add
>
> (format "cd('%s');\n" (file-name-directory (buffer-file-name)))
>
> and problem solved? Well... for sessions. I don't know if it is common to
> use non-session based calculations...
>

The vast majority of my code blocks do not use sessions but I don't use
matlab or octave.  Running something like the following as part of the
session start up does seem reasonable.

  (format "cd('%s');\n" default-directory)

>
>> > Also IIRC ob-sh does not change directory though I tried it on
>> > Windows with cmd.exe.
>> 
>> Granted I only run on linux, but (on linux) ob-sh *does* run in the
>> directory of the containing Org-mode file.
>> 
>> > Worth mentioning that it tangles into dot sh instead of dot bat or dot
>> > cmd on that platform. It misses platform specific
>> >
>> > (defvar org-babel-tangle-lang-exts)
>> > (if (string-equal system-type "windows-nt")
>> >   (add-to-list 'org-babel-tangle-lang-exts '("sh" . "bat"))
>> > )
>> >
>> 
>> OK, could you convert the above into a patch which we could apply to
>> ob-sh?
>
> I think there should be more than that. I do sometimes use bash from msys on
> Win32 so I'd expect sh as a tangled file name extension in this case. I
> believe it can be accomplished as with matlab / octave by adding a new
> language cmd that will reuse most of sh. I'll see what I can do.
>

The alternate (and probably simpler) solution here is to set the default
to whichever of .sh or .bat seems more likely to be desired based on the
OS, and then let the user customize the `org-babel-tangle-lang-exts' to
suite their preference.

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



Re: [O] [babel] session initialization (was RE: python/babel inline images)

2012-06-07 Thread Eric Schulte
"Mikhail Titov"  writes:

>> -Original Message-
>> From: emacs-orgmode-bounces+mlt=gmx...@gnu.org [mailto:emacs-orgmode-
>> bounces+mlt=gmx...@gnu.org] On Behalf Of Mikhail Titov
>> Sent: Wednesday, June 06, 2012 6:06 PM
>> To: 'Eric Schulte'
>> Cc: emacs-orgmode@gnu.org
>> Subject: Re: [O] [babel] session initialization (was RE: python/babel
> inline
>> images)
>> 
>> ...
>> 
>> How would I reliably refer to the org doc buffer from where everything was
>> called? The following works just fine in session initialization code for
>> Matlab but not for Octave
>> 
>> (file-name-directory (buffer-file-name (other-buffer)))
>> 
>> At this point, (current-buffer) refers to the one with inferior process.
>
> So I ended up using the following in session initialization for inferior
> process to get a current folder of a document from where calculations
> initiated
>
> (file-name-directory
>(car (delq nil (mapcar #'buffer-file-name (buffer-list)
>
> It works. But I have a feeling that it is not a reliable method. Any
> suggestions?
>

I would recommend using the `default-directory' variable.  That should
hold the value of the directory of the Org-mode file or the value of the
:dir header argument if present.

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



Re: [O] [babel] session initialization (was RE: python/babel inline images)

2012-06-07 Thread Mikhail Titov
> -Original Message-
> From: emacs-orgmode-bounces+mlt=gmx...@gnu.org [mailto:emacs-orgmode-
> bounces+mlt=gmx...@gnu.org] On Behalf Of Mikhail Titov
> Sent: Wednesday, June 06, 2012 6:06 PM
> To: 'Eric Schulte'
> Cc: emacs-orgmode@gnu.org
> Subject: Re: [O] [babel] session initialization (was RE: python/babel
inline
> images)
> 
> ...
> 
> How would I reliably refer to the org doc buffer from where everything was
> called? The following works just fine in session initialization code for
> Matlab but not for Octave
> 
> (file-name-directory (buffer-file-name (other-buffer)))
> 
> At this point, (current-buffer) refers to the one with inferior process.

So I ended up using the following in session initialization for inferior
process to get a current folder of a document from where calculations
initiated

(file-name-directory
   (car (delq nil (mapcar #'buffer-file-name (buffer-list)

It works. But I have a feeling that it is not a reliable method. Any
suggestions?

M.




Re: [O] org-e-html: Including ATTR_HTML: title="hover text"

2012-06-07 Thread William Crandall
Hello Nicolas,

Thanks for your email. You write:

"ATTR_HTML is only for paragraphs, not links."

This puzzles me, because (1) the old exporter works fine
on links that are inside paragraphs, as my example showed,
and (2) the Manual says ATTR_HTML lines are for links:

12.5.4 Links in HTML export
http://orgmode.org/org.html#Links-in-HTML-export

If you want to specify attributes for links, you can do so using a
special #+ATTR_HTML line to define attributes that will be added to
the  or  tags. Here is an example that sets title and style
attributes for a link:

 #+ATTR_HTML: title="The Org mode homepage" style="color:red;"
 [[http://orgmode.org]]


Thanks for looking at this again!

-BC


On Thu, Jun 7, 2012 at 12:28 PM, Nicolas Goaziou  wrote:
> Hello,
>
> William Crandall  writes:
>
>> If org-mode source text is:
>>
>> --
>> A paragraph about
>> #+ATTR_HTML: title="Link hover text"
>> [[http://orgmode.org]]
>> exalting new emacs mode...
>> --
>
>> "M-x org-export-dispatch h" generates:
>>
>> --
>> 
>> A paragraph about
>> 
>> 
>> http://orgmode.org";>http://orgmode.org
>> exalting new emacs mode…
>> 
>> --
>>
>> which is less grand.
>>
>> I see two needed fixes, reading
>> http://orgmode.org/org.html#Links-in-HTML-export
>>
>> 1. A new  should not be inserted before
>>    lines starting #+ATTR_HTML.
>
> It sure should: you're starting a new paragraph containing a link and
> "exalting new emacs mode..." text.
>
> ATTR_HTML is an attribute for paragraphs, not links (though it may apply
> on links within the paragraph).
>
> You may want to add your title attribute with filters.
>
>
> Regards,
>
> --
> Nicolas Goaziou



[O] [latex] Problems with old exporter (for Beamer) and with new exporter

2012-06-07 Thread Sebastien Vauban
Hello,

I want to write a document where I show:

- Org code to type in a buffer
- (sometimes) its LaTeX translation
- its effect in the output PDF

Though, I have big troubles outputting the Org code one is suppose to write in
the Org buffers. It often gets replaced or modified... See examples in the
following ECM.

With the old exporter (necessary for Beamer), all the below cases fail...

With the new exporter, most things work. What does not work:
- macro does not get executed (no string in orange color),
- the =\end{verbatim}= disappears from the LaTeX output

--8<---cut here---start->8---
#+TITLE: Org mode examples
#+OPTIONS:   H:3 num:t toc:nil

#+LaTeX_HEADER: \lstdefinelanguage{org}{%
#+LaTeX_HEADER:   morekeywords={:results, :session, :var, :noweb, :exports},
#+LaTeX_HEADER:   sensitive=false,
#+LaTeX_HEADER:   morestring=[b]",
#+LaTeX_HEADER:   morecomment=[l]{\#},
#+LaTeX_HEADER: }

#+LaTeX_HEADER: \lstset{%
#+LaTeX_HEADER:   extendedchars=false,
#+LaTeX_HEADER:   inputencoding=utf8x,
#+LaTeX_HEADER:   %
#+LaTeX_HEADER:   mathescape=false,
#+LaTeX_HEADER:   escapechar=`, % allow escaping to (La)TeX mode within `..`
#+LaTeX_HEADER:   columns=flexible,
#+LaTeX_HEADER:   keepspaces=true
#+LaTeX_HEADER: }

#+MACRO: key \textcolor{orange}{\texttt{$1}}

#+startup: beamer
#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [presentation,t]
#+BEAMER_HEADER_EXTRA: \usetheme{Madrid}\usecolortheme{default}
#+BEAMER_FRAME_LEVEL: 1

* Macros

- With the following macro definition

  #+begin_src org :exports code
  ,#+MACRO: key \textcolor{orange}{\texttt{$1}}
  #+end_src

- Every time we write

  #+begin_src org :exports code
  ,{{{key(C-c C-e)}}}
  #+end_src

  HERE ABOVE, WE SHOULD SEE THE MACRO NAME AND PARAMETER INSIDE CURLY
  BRACKETS. INSTEAD, WE SEE THE LATEX REPLACEMENT CODE.

- We get {{{key(C-c C-e)}}}

* Listings informatiques

- To input a block of code in Org, type it like this:

#+begin_src org :exports code
,#+begin_src sql
,SELECT *
,FROM inventory
,WHERE product = 'ABC123'
,#+end_src
#+end_src

  HERE, WE SHOULD SEE =#+begin_src sql=. INSTEAD, WE SEE =\begin{}sql=.

- And see the nice listing:

#+begin_src sql
SELECT *
FROM inventory
WHERE product = 'ABC123'
#+end_src

* Verbatim

- Same problem for verbatim... Here, the Org code

#+begin_src org :exports code
,#+begin_verbatim
,verbatim  d i s p l a y s  with spaces!
,#+end_verbatim
#+end_src

  HERE, THE META LINE IS CONVERTED INTO ITS LATEX FORM.

- And its translation into LaTeX:

#+begin_src latex :exports code
\begin{verbatim}
verbatim  d i s p l a y s  with spaces!
\end{verbatim}
#+end_src

* Comment

It is also impossible to show how to type a comment block:

#+begin_src org :exports code
#+begin_comment
Paragraph which will not appear in resulting PDF.
#+end_comment
#+end_src

THE ABOVE NEVER IS SHOWN!
--8<---cut here---end--->8---

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] shorter way of #+HTML:

2012-06-07 Thread T . F . Torrey
Won't using "\\" in this construct produce what the OP requested?

This:

#+BEGIN_SRC org
Some text\\
new line.
#+END_SRC

Becomes this:

#+BEGIN_HTML
Some text
new line.

#+END_HTML

Terry
-- 
T.F. Torrey

> Hi Enda,
> 
> Enda  writes:
> 
>> When I prepare an org file to convert into html, I have to have a lot
>> of
>>
>> #+HTML: 
>>
>> to break lines without a full full line space between them, should
>> there be or is there is shorter way to doing this?
> 
> Nope, sorry.  But you can easily insert it repeartedly by using
> Emacs internals (registers etc.)
> 
> Best,
> 
> -- 
>  Bastien
> 
> 



Re: [O] new exporter

2012-06-07 Thread Nicolas Goaziou
Achim Gratz  writes:

> Nicolas Goaziou writes:
>> declarations (instead of requires) are here to avoid circular
>> dependencies. Why do you want to revert that in the first place?
>
> ...because so many of them were missing that it seemed easier to simply
> pull in the definitions by requirement.

But it isn't easier in the end, as you can see.

By the way, I have a (ugly and mostly working) function to add those
declarations.

#+begin_src emacs-lisp
(defun ngz-declare-function (package)
  "Insert necessary declare-function calls at point.
PACKAGE is the package from which functions should be declared."
  (interactive "sPackage name: ")
  (dolist (obj (save-excursion
 (goto-char (point-min))
 (let (acc (re (format "\\(^\\|[^`]\\)\\(%s-[-a-z]+\\)"
   package)))
   (while (re-search-forward re nil t)
 (let ((func (org-match-string-no-properties 2)))
   (unless (member func acc) (push func acc
   (sort acc 'string<
(cond
 ((fboundp (intern obj))
  (let ((args
 (let* ((desc (save-window-excursion
(describe-function (intern obj
(args
 (and (string-match (format "(%s \\([^)]+\\)?)" obj) desc)
  (downcase
   (replace-regexp-in-string
"[ \t]*\n[ \t]*" " "
(org-match-string-no-properties 1 desc))
   (insert
(format "(declare-function %s \"%s\" (%s))\n"
obj package (or args ""
 ((boundp (intern obj)) (insert (format "(defvar %s)\n" obj))
#+end_src

> Yes, that was what I was thinking as well.  But that is not actually the
> problem with the compilation, but rather your use of cl macros in some
> places.  Somehow this messes up the compilation in a non-obvious way,
> see my other post.  If you want to try it yourself, delete one of the
> org-e-*.elc files after the first compilation and try to compile that
> again and watch it explode...

I do not notice anything like this.  There are many compilation errors
on some files, but they are the same before and after removing an
org-e-*.el file.


Regards,



Re: [O] new exporter

2012-06-07 Thread Achim Gratz
Nicolas Goaziou writes:
>> One of test fails (but independently of compiling or not compiling the
>> rest of the new exporter).  The failing test is
>> test-org-element/src-block-interpreter, it appears that the test
>> expects the block to be indented by two spaces, but it starts at the
>> beginning of line for me.  Maybe some configuration is missing, but in
>> any case that should be provided by the test.
>
> It should be fixed now. Thank you.

As long as I don't compile org-export.el, all tests are now passing.
Thank you.


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

SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] new exporter

2012-06-07 Thread Achim Gratz
Nicolas Goaziou writes:
> declarations (instead of requires) are here to avoid circular
> dependencies. Why do you want to revert that in the first place?

...because so many of them were missing that it seemed easier to simply
pull in the definitions by requirement.

>> The way org-export is structured unfortunately produces circular
>> dependencies due to the dispatcher and that prevents it from being
>> compiled properly.
>
> I think that adding autoload cookies on export functions and removing
> requires in the dispatcher should solve most problems.

Yes, that was what I was thinking as well.  But that is not actually the
problem with the compilation, but rather your use of cl macros in some
places.  Somehow this messes up the compilation in a non-obvious way,
see my other post.  If you want to try it yourself, delete one of the
org-e-*.elc files after the first compilation and try to compile that
again and watch it explode...


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] Variable naming (old vs new exporter)

2012-06-07 Thread Nicolas Goaziou


Hello,

"Sebastien Vauban"
 writes:

> A quick question about the future of the exporters:
>
> when the new exporter will be (more) integrated into Org,
>
> - will the old ones be removed?

Yes.

> - will the packages be renamed?

Yes.

> - will the variables be renamed (for example, from
>   `org-e-html-preamble-format' to `org-html-preamble-format')?

Yes.


Regards,

-- 
Nicolas Goaziou




Re: [O] new exporter

2012-06-07 Thread Nicolas Goaziou
Hello,

Achim Gratz  writes:

>here's my first stab on fixing some of that:
>
> From d7ef1bfbaef873521731697d86112029f02cdc8b Mon Sep 17 00:00:00 2001
> From: Achim Gratz 
> Date: Sat, 2 Jun 2012 18:38:24 +0200
> Subject: [PATCH 5/5] Make byte-compiler more happy
>
> * contrib/lisp/org-e-ascii.el: Remove declarations and replace with
>   require.
>
> * contrib/lisp/org-e-html.el: Remove declarations and replace with
>   require.
>
> * contrib/lisp/org-e-latex.el: Remove declarations and replace with
>   require.
>
> * contrib/lisp/org-e-publish.el: Remove declarations and replace with
>   require.
>
> * contrib/lisp/org-export.el: Remove declarations and replace with
>   require.  Prevent byte-compilation, it currently would produce an
>   error due to circular dependencies in the file.

declarations (instead of requires) are here to avoid circular
dependencies. Why do you want to revert that in the first place?

> The way org-export is structured unfortunately produces circular
> dependencies due to the dispatcher and that prevents it from being
> compiled properly.

I think that adding autoload cookies on export functions and removing
requires in the dispatcher should solve most problems.

> One of test fails (but independently of compiling or not compiling the
> rest of the new exporter).  The failing test is
> test-org-element/src-block-interpreter, it appears that the test
> expects the block to be indented by two spaces, but it starts at the
> beginning of line for me.  Maybe some configuration is missing, but in
> any case that should be provided by the test.

It should be fixed now. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] Taskjuggler and installation

2012-06-07 Thread Simon Thum

On 06/06/2012 01:46 AM, Nick Dokos wrote:

Simon Thum  wrote:


Hi all,

I am using org-mode's taskjuggler export on two machines (win7 standard
emacs 23.3/linux emacs 23.4.2) with 99% identical configuartion. Except
for one funny thing:



What org-version? Do you byte-compile the code on both platforms?

git maint - I don't, and checked if there are elcs for some reason.





Taskjuggler export raises an undefined function on windows. Yes, I do
require 'org-install, org-mode from identical sources (git-sync'ed).
Linux is fine.



What function?

org-export-taskjuggler is not commandp, as it is undefined.





I am fixing this by adding a require 'org-taskjuggler, but that can't
really be it. Any advice how to track this down?



M-x toggle-debug-on-error RET

... the gets me to where the error occurs.




and look at the backtrace to see what the call chain looks like.  A
missing autoload perhaps? Why exactly 23.3 on windows and 23.4.2 on
linux behave differently is a mystery, at least for now.
The call chain had no apparent irregularities. I'm not on the machine 
now, but going through the source the git stuff has no org-install.el.


So I guess the problem is emacs picking up some odd org-install. It's 
not even in git, I'll try making one on my linux machine and copy over.


Thanks anyway!

Simon





Nick








Re: [O] BUG: new exporter fails to export a source code with stars at bol

2012-06-07 Thread Nicolas Goaziou
Hello,

Yagnesh Raghava Yakkala  writes:


> Please try to export attachment org file. the bug is reproduced with minimal
> configuration. org version is: Org-mode version 7.8.10 
> (release_7.8.10-649-gfe2e2f @ /home/yagnesh/.emacs.d/el-get/org-mode/lisp/)
>
> FYI, generated latex file is also attached.

There is no bug here. Stars at colmun 0 always start an
headline. There's no exception to that.

If you need to start a line with a star in a block, protect it with
a comma. This is automatically done when using C-c '.


Regards,

-- 
Nicolas Goaziou



Re: [O] org-e-html: Including ATTR_HTML: title="hover text"

2012-06-07 Thread Nicolas Goaziou
Hello,

William Crandall  writes:

> If org-mode source text is:
>
> --
> A paragraph about
> #+ATTR_HTML: title="Link hover text"
> [[http://orgmode.org]]
> exalting new emacs mode...
> --

> "M-x org-export-dispatch h" generates:
>
> --
> 
> A paragraph about
> 
> 
> http://orgmode.org";>http://orgmode.org
> exalting new emacs mode…
> 
> --
>
> which is less grand.
>
> I see two needed fixes, reading
> http://orgmode.org/org.html#Links-in-HTML-export
>
> 1. A new  should not be inserted before
>lines starting #+ATTR_HTML.

It sure should: you're starting a new paragraph containing a link and
"exalting new emacs mode..." text.

ATTR_HTML is an attribute for paragraphs, not links (though it may apply
on links within the paragraph).

You may want to add your title attribute with filters.


Regards,

-- 
Nicolas Goaziou



Re: [O] python/babel inline images

2012-06-07 Thread henry atting
"Mikhail Titov"  writes:

>> -Original Message-
>> From: emacs-orgmode-bounces+mlt=gmx...@gnu.org [mailto:emacs-orgmode-
>> bounces+mlt=gmx...@gnu.org] On Behalf Of henry atting
>> Sent: Wednesday, June 06, 2012 10:19 AM
>> To: emacs-orgmode@gnu.org
>> Subject: Re: [O] python/babel inline images
>> 
>> I don't think its a path problem.
>
> Indeed
>
> #+begin_src python :results output
> import os
> print(os.getcwd())
> #+end_src
>
> Shows location of my org doc.

Yes, shows my working directory.


>> The code itself works flawlessly. So
>> the workaround which I already have used is to link to the resulting
>> image. The only drawback with this solution is that after every
>> evaluation I have to remove the empty `'Results:'
>
> You can use :results silent

This is great! Actually this solves my problem which means: create a link
to the file and set results to silent.

>> but the heck with
>> it, I can live with it happily till the end of my days.
>> However I find that some inconsistency lies therein. Before
>> python/matplotlib I used gnuplot with which babel had no problem of
>> this type.
>
> Try using
>
> ... :file exp_csv.svg
> ...
> plot.savefig(file=sys.stdout)

This does not compile, the compiler complains about missing arguments.
I have to write it like this:

plot.savefig("file.svg", format='svg')

>
> #+begin_src python :results output :file zzz.xxx
> import os, sys
> print(os.getcwd(), file=sys.stdout)
> #+end_src
>
> #+RESULTS:
> [[file:zzz.xxx]]

Works as exspected.

> [...]

So, just to mention the current state of affairs (with a simple
example):

--8<---cut here---start->8---
#+begin_src python   :results output
from pylab import *

t = arange(0.0, 2.0, 0.01)
s = sin(2*pi*t)
plot(t, s)
show()
savefig("file.svg", format='svg')
#+end_src
--8<---cut here---start->8---

The above code works. But if I set `:file' to `file.svg' with every
evaluation the link to the file is placed after #+RESULTS: but the
file itself is empty. If the code is evaluated without `:file
file.svg' the evaluation simply works and the file.svg appears in the
working directory.

henry


-- 
http://literaturlatenight.de



Re: [O] Smart Quotes Exporting

2012-06-07 Thread Nicolas Goaziou
Hello,

"Mark E. Shoulson"  writes:

> Update on the smart-quotes patch.  Supports the odt exporter now too,
> which I think covers all the current major "new" exporters for which
> it is relevant (adding smart quotes to ASCII export is a contradiction
> in terms;

ASCII exporter also handle UTF-8. So it's good to have there too.

> should it be in the "publish" exporter?  It didn't look like it to
> me).

No.

> Added an options keyword, '"' (that is, the double-quote mark) to
> select smart quotes on/off, and a defcustom for customizing your
> default.  Set the default default [sic] to nil, though actually it
> might be reasonable to set it to t.  Slight touch-up to the regexps
> since last time, but they will definitely be subject to a lot of
> fine-tuning as more special cases are found that break them and ways
> to fix it are found (the close-quote still breaks on one of "/a/." or
> "/a./")

Again, using regexps on plain text objects is a wrong approach, as you
need a better understanding of the whole paragraph structure to
properly. I already suggested a possible solution, is there anything
wrong with it?


Regards,

-- 
Nicolas Goaziou



Re: [O] Slideshow using org-tree-to-indirect-buffer

2012-06-07 Thread Nathan Neff
On Tue, Apr 3, 2012 at 9:42 AM, Nathan Neff  wrote:
> I'm using org-mode to keep my notes about a slideshow.
>
> The slideshow is a separate PDF, which is fine with me.
>
> I'd like to have a quick 1-button press in emacs that would go
> to the next headline, and "open" the headline like the super-cool
> org-tree-to-indirect-buffer
> so I can see my notes quickly.
>
> I've thought about using the many html export and slideshow options,
> but the key thing
> is that I want to modify my slideshow notes while presenting, as well
> as type in student questions
> that happen on a particular slide into org-mode.
>
> So, I thought about writing a small function that would do something like 
> this:
>
> 1) Go to the next headline
> 2) Run org-tree-to-indirect-buffer on the headline
>
> This would get me going in the right direction and save me several key 
> presses,
> but I can already see problems if I switch to the indirect buffer to
> write down another note.  Then,
> I'll have to jump back to the other window, and hope that the cursor
> is in the right spot
> when I run my function again.
>
> A more elegant way would be to only show the indirect buffer, and have
> a hotkey that
> jumps to the next headline and runs org-tree-to-indirect-buffer.
>
> So here's my question:
>
> If I'm in an indirect buffer, is there a reference back to the location of
> the headline in the *parent* document?  For example, if I have
>
> * One
> * Two
> * Three
>
> and I'm zoomed into "Two", could I write a function that would know that I'm
> on "Two" in the main document, and then run
> org-tree-to-indirect-buffer on "Three"?

Just wanted to mention that I found Org-Tree-Slide, which is exactly what
I was looking for -- an easy to use slideshow that just takes an org-mode file
and zooms into each headline.

http://orgmode.org/worg/org-tutorials/non-beamer-presentations.html#sec-4



Re: [O] python/babel inline images

2012-06-07 Thread Mikhail Titov
> -Original Message-
> From: henry atting [mailto:nsmp...@online.de]
> Sent: Thursday, June 07, 2012 3:43 AM
> To: Mikhail Titov
> Cc: 'henry atting'; emacs-orgmode@gnu.org
> Subject: Re: python/babel inline images
> 
> >> The code itself works flawlessly. So
> >> the workaround which I already have used is to link to the resulting
> >> image. The only drawback with this solution is that after every
> >> evaluation I have to remove the empty `'Results:'
> >
> > You can use :results silent
> 
> This is great! Actually this solves my problem which means: create a link
> to the file and set results to silent.

This has an implication of inability to cache results in case you might want
it. I personally would just leave empty #+RESULTS: block as is and I would
place link manually two lines below it (leave 1 blank line so re-evaluation
won't delete your link).

> 
> >> but the heck with
> >> it, I can live with it happily till the end of my days.
> >> However I find that some inconsistency lies therein. Before
> >> python/matplotlib I used gnuplot with which babel had no problem of
> >> this type.
> >
> > Try using
> >
> > ... :file exp_csv.svg
> > ...
> > plot.savefig(file=sys.stdout)
> 
> This does not compile, the compiler complains about missing arguments.
> I have to write it like this:
> 
> plot.savefig("file.svg", format='svg')

I never used that library but it makes sense:-) The only problem with this
solution that you should make sure nothing else goes to stdout. I think it
is a huge shortcoming.

> So, just to mention the current state of affairs (with a simple
> example):
> 
> --8<---cut here---start->8---
> #+begin_src python   :results output
> from pylab import *
> 
> t = arange(0.0, 2.0, 0.01)
> s = sin(2*pi*t)
> plot(t, s)
> show()
> savefig("file.svg", format='svg')
> #+end_src
> --8<---cut here---start->8---
> 
> The above code works. But if I set `:file' to `file.svg' with every
> evaluation the link to the file is placed after #+RESULTS: but the
> file itself is empty.

As William LECHELLE pointed out that in this case file captures the output
of the savefig() call which does not output anything to stdout. So it is
expected.

> If the code is evaluated without `:file
> file.svg' the evaluation simply works and the file.svg appears in the
> working directory.

I think this is the best way to proceed.

M.




Re: [O] Org variables in LaTeX - how?

2012-06-07 Thread Mikhail Titov
> -Original Message-
> From: emacs-orgmode-bounces+mlt=gmx...@gnu.org [mailto:emacs-orgmode-
> bounces+mlt=gmx...@gnu.org] On Behalf Of Rainer M Krug
> Sent: Thursday, June 07, 2012 6:32 AM
> To: emacs-orgmode
> Subject: [O] Org variables in LaTeX - how?
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Hi
> 
> I must admit, I don't know the inner workings of LaTeX, so this might be
> impossible, but anyway:
> 
> I have the following two variables:
> 
> 
> #+PROPERTY: var VER=89
> #+PROPERTY: var+ STATE="up-to-date"
> 
> I create a file in one code block via sh, named
> FILE=./../nsa.$VER.$STATE.tar.gz
> 
> Now I would likle to attach this file to the pdf:
> 
> #+LATEX_HEADER:\\usepackage{attachfile2}
> #+BEGIN_LaTeX
>   \textattachfile[print=false,color=0.5 0.5
> 0.5]{"./../nsa.VER.STATE.tar.gz"}{R source files}
> #+END_LaTeX
> 
> How can I use the variables in a LaTeX block?
> Using the ove does obviously not work, but
> 
> #+BEGIN_LaTeX
>   \textattachfile[print=false,color=0.5 0.5 0.5]{"./../nsa.98.up-to-
> date.tar.gz"}{R source files}
> #+END_LaTeX
> 
> does.
> 
> So my question: Can I, and if yes how, use org variables in LaTeX code?

You should generate latex code with let's say elisp (or some other language)
fragment that will output :results latex

Mikhail




[O] Org variables in LaTeX - how?

2012-06-07 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

I must admit, I don't know the inner workings of LaTeX, so this might be 
impossible, but anyway:

I have the following two variables:


#+PROPERTY: var VER=89
#+PROPERTY: var+ STATE="up-to-date"

I create a file in one code block via sh, named FILE=./../nsa.$VER.$STATE.tar.gz

Now I would likle to attach this file to the pdf:

#+LATEX_HEADER:\\usepackage{attachfile2}
#+BEGIN_LaTeX
  \textattachfile[print=false,color=0.5 0.5 0.5]{"./../nsa.VER.STATE.tar.gz"}{R 
source files}
#+END_LaTeX

How can I use the variables in a LaTeX block?
Using the ove does obviously not work, but

#+BEGIN_LaTeX
  \textattachfile[print=false,color=0.5 0.5 
0.5]{"./../nsa.98.up-to-date.tar.gz"}{R source files}
#+END_LaTeX

does.

So my question: Can I, and if yes how, use org variables in LaTeX code?

Cheers,

Rainer

- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys.
(Germany)
Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/QkUUACgkQoYgNqgF2egpGsACfZmsWV33qPEuGR886C0orsHBB
4ZMAoIaH9VmcIHdPZBueMrA/aVe4wIDk
=2Nbn
-END PGP SIGNATURE-



Re: [O] Updating info files

2012-06-07 Thread Jude DaShiell
When I update org, I do:
make ./update
sudo make ./install
sudo make ./install-info

Then info org shows the correct version of org.

On Wed, 6 Jun 2012, Memnon Anon wrote:

> Mike Fitzgerald  writes:
> 
> > C-h i still brings up the old info files.
> >
> > files are there:
> >
> > org.pdf
> > rg.texi
> > rgcard.pdf
> > rgcard.tex
> > rgcard_letter.pdf
> > rgguide.pdf
> > rgguide.texi
> 
> Mhh, are these all files in the doc dir?
> 
> Info doesn't use pdf, here is mine for comparison:
> 
> /home/xxx/tmp/bin/org-mode/doc
>   dir
>   -rw-r--r--  1 xxx xxx6.8k 2011-02-02  Documentation_Standards.org
>   -rw-r--r--  1 xxx xxx1.9k 05-23 11:54 Makefile
>   -rw-r--r--  1 xxx xxx  852.6k 05-27 05:49 org
>   -rw-r--r--  1 xxx xxx 110 05-27 05:49 org-version.inc
>   -rw-r--r--  1 xxx xxx1.3M 05-27 05:49 org.html
>   -rw-r--r--  1 xxx xxx1.6M 05-27 05:50 org.pdf
>   -rw-r--r--  1 xxx xxx  686.4k 05-26 17:48 org.texi
>   -rw-r--r--  1 xxx xxx   23.2k 05-25 16:47 orgcard.tex
>   -rw-r--r--  1 xxx xxx   21.7k 12-17 12:02 orgcard.txt
>   -rw-r--r--  1 xxx xxx  363.4k 05-27 05:50 orgguide.pdf
>   -rw-r--r--  1 xxx xxx   97.4k 05-23 11:54 orgguide.texi
>   -rw-r--r--  1 xxx xxx1.3k 04-15 21:31 pdflayout.sty
>   -rw-r--r--  1 xxx xxx  278.6k 01-04 00:10 texinfo.tex
> 
> Files relevant for info: "dir" and "org"
> 
> 
> 


Jude