[Orgmode] I find org-mode don't support tikz/pgf .

2009-08-11 Thread waterloo
tikz/pgf is a package for drawing picture under latex.

I have add the following in `Org Format Latex Header' .
\usepackage{tikz}
\usetikzlibrary{arrows,backgrounds,decorations.pathmorphing,
calc,fit,positioning,scopes,shapes.geometric,shapes.symbols,
shapes.arrows,shapes.multipart,shapes.misc,shapes.callouts,snakes,through}

But I can not preview or export tikzpicture to html.

\begin{tikzpicture}
\draw (0,0) -- (10,0);
\end{tikzpicture}

Thanks
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] How to make firefox to open html automatically ?

2009-08-11 Thread Nick Dokos
waterloo  wrote:

> When I run C-c C-e b , the html file is open in emacs .
> 
> How to make firefox to open html exported automatically ?
> 

There are probably many ways to do it, depending on where you want to
put the customization. I chose (perhaps unwisely - see below) to put it
into the lowest layer. Note that there is no warranty, express or
implied, of any kind: you do the following of your own free will, and if
your computer explodes or kittens die as a result, you cannot hold me
responsible!

Org uses the function org-open-file(), which by default uses the mailcap
method to open the file. The command that is executed is the result of
this function call:

   (mailcap-mime-info "text/html")

In my case, this returns "/usr/bin/w3m -T text/html '%s'" where the %s
is replaced by the pathname of the file.

It turns out that mailcap-mime-info obtains this by looking into a
double association list, mailcap-mime-data (in mailcap.el): the first
level a-list is indexed by the major mime type ("text" above); the value
is a second-level a-list indexed by the minor mime type ("html" above,
but it could also be other kinds of text , e.g. "plain"). There can be
multiple elements with the same minor mime type: mailcap-mime-info returns
the first element of that list. The value in the second level a-list is
yet another, third-level a-list, as shown below.

So the trick is to add a new element to the appropriate place in the
double a-list, so that mailcap-mime-info will return it. First the
command for firefox to open a URL remotely is

/usr/bin/firefox --remote "openURL()"

THe element that we need to add to the list is (note that the command
has been specialized for a file://-type URL):

("html" 
   (viewer . "/usr/bin/firefox --remote \"openURL(file://'%s')\"")
   (type . "text/html")
   ("nametemplate" . "%s.html")
   ("description" . "HTML Text")
   ("needsterminal" . nil))

I define a variable whose value is the list above, to simplify the notation:

(setq ff '("html" 
   (viewer . "/usr/bin/firefox --remote \"openURL(file://'%s')\"")
   (type . "text/html")
   ("nametemplate" . "%s.html")
   ("description" . "HTML Text")
   ("needsterminal" . nil)))

Then I do surgery on the double a-list, replacing the second-level a-list that 
is
indexed by "text", by a modified one that has the new element ff from above at 
the
front:

(rplacd (assoc "text" mailcap-mime-data) (cons ff (cdr (assoc "text" 
mailcap-mime-data

And that's all! After this, (mailcap-mime-info "text/html") returns
"/usr/bin/firefox --remote \"openURL(file://'%s')\"" - just what the doctor 
ordered.
And doing C-c C-e b on an org file sends the URL to firefox for display.

Horrible, no? If anybody comes up with an easier way, do tell!

Nick

PS BTW, I was evaluating these things in the *scratch* buffer. That way,
if something goes wrong, I kill emacs, restart and all is
forgotten. After assuring yourself that this works, then you have to put
it in some initialization file. Make sure to (require 'mailcap) before
mucking aroung with mailcap-mime-data.





___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] BEGIN_EXAMPLE question

2009-08-11 Thread Nick Dokos
Bill Hager  wrote:

> I don't seem to understand #+BEGIN_EXAMPLE and it's relation to html
> export.  What I think is that everything between a #+BEGIN_EXAMPLE and
> #+END_EXAMPLE should end up in  tags when I do a HTML export with C-c
> C-e b.  However, the reality is that everything ends up in a  tag for me.
> 
> My goal is to have sections of my org file end up in  tags when I HTML
> export.  Any ideas on how I can do this?
> 
> I'm running the default emacs 22.2.1 on Ubuntu Jaunty.
> 

I can't reproduce this. I used the following simple org file:

,
| 
| * Test
| 
| Here's an example:
| 
| #+BEGIN_EXAMPLE
| This is a test.
| #+END_EXAMPLE
`

did C-c C-e h and got the attached html file. The example is
'd properly I think.

HTH,
Nick


http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
http://www.w3.org/1999/xhtml";
lang="en" xml:lang="en">


bar







 







bar



Table of Contents


1 Test 





1 Test 




Here's an example:




This is a test.







 Author: Nick Dokos


 Date: 2009-08-12 00:36:59 EDT
HTML generated by org-mode 6.29trans in emacs 23




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [PATCH] Spelling fix.

2009-08-11 Thread Nick Dokos

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

diff --git a/doc/org.texi b/doc/org.texi
index 2cdb15a..79dac8e 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -8182,7 +8182,7 @@ look like the fontified Emacs buf...@footnote{currently 
this works for the
 HTML backend, and requires the @file{htmlize.el} package version 1.34 or
 later.  It also works for LaTeX with the listings package, if you turn on the
 option @code{org-export-latex-listings} and make sure that the listings
-package is inclluded by the LaTeX header.}.  This is done with the @samp{src}
+package is included by the LaTeX header.}.  This is done with the @samp{src}
 block, where you also need to specify the name of the major mode that should
 be used to fontify the example:
 @cindex #+BEGIN_SRC
-- 
1.5.4.3



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Workflow for attaching, linking, and saving bibtex links together with notes?

2009-08-11 Thread Alan E. Davis
I wrote:


> Let's say I've already done this.


Reporting some progress on my own query: I have successfully installed the
org-remember and org-store-link JavaScripts for Acroread.  This is helpful.
Would like to do a similar thing for a free reader like ocular or evince.
Is there something else?


Alan Davis

You can know the name of a bird in all the languages of the world,  but when
you're finished, you'll know absolutely nothing whatever about the bird...
So let's look at the bird and see what it's doing---that's what counts.

   Richard Feynman
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] How to make firefox to open html automatically ?

2009-08-11 Thread waterloo
When I run C-c C-e b , the html file is open in emacs .

How to make firefox to open html exported automatically ?

Thanks
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] BEGIN_EXAMPLE question

2009-08-11 Thread Bill Hager
Hello Org List!

I don't seem to understand #+BEGIN_EXAMPLE and it's relation to html
export.  What I think is that everything between a #+BEGIN_EXAMPLE and
#+END_EXAMPLE should end up in  tags when I do a HTML export with C-c
C-e b.  However, the reality is that everything ends up in a  tag for me.

My goal is to have sections of my org file end up in  tags when I HTML
export.  Any ideas on how I can do this?

I'm running the default emacs 22.2.1 on Ubuntu Jaunty.

Thanks

- Bill
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Workflow for attaching, linking, and saving bibtex links together with notes?

2009-08-11 Thread Alan E. Davis
I would like to streamline as much as possible the saving of notes, to the
point of bookmarking---ala Zotero, only leaving me free to orient it to my
system.   Here's my use case.  I'm sure many others are doing this, and I
would ask advice to short cut the system, to the fewest possible steps.

I use Google Scholar alot.  Often it's a search about an organism, and often
one I would really like to have a good system of bookmarks, pdfs, and notes,
to come back to in a couple of years.  These organisms have been objects of
either notice or study over the past 25 years.

Either Google School or some other search locates a pdf for me, often one
named something like X234r0.pdf.  I have bunches of these around (the
easiest way to peek, by the way, and look at the title inside is *NOT*
DocView mode, but pdftotext, via
txtutils.el.)

I can attach this.  Once I get a stable, organized file/directory structure
for ~/home (something I haven't accomplished in 15 years), I will be able to
attach to a note and store the pdf as a link.  Let's say I've already done
this.

I want to save a bibtex reference to this file, in some useful way.  Right
now the best way is to use Google Scholar's bibtex facility, and cut and
paste.  I've been using cb2bib and Jabref for the task of collecting bibtex
entries.

Ideally, a separate bibtex database file would serve each topic, when I have
a large number of searches.  I can often find 20 useful hits in an hour on
some obscure topic.  I would like to save the bibtex entries for all
interesting searches (perhaps even make that 40 or more in a session), and
have them available through org-mode.  I would like the references also to
be stored in a robust manner, with links to the orgmode notes.

I tried org-exp-bibtex.el (in contrib/lisp), and perhaps I'll got back and
check again.  I didn't see at the time, when I was even newer to org-mode
than I am now, how org-exp-bibtex could work for me.

Thank you for reading this far.  Can anyone at least lend a clue?   I'd
happily bury myself in some code, non-programmer than I am, to find a way to
save even a few minutes during searches.

Alan  Davis




You can know the name of a bird in all the languages of the world,  but when
you're finished, you'll know absolutely nothing whatever about the bird...
So let's look at the bird and see what it's doing---that's what counts.

   Richard Feynman
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Cannot install 6.29c on Ubuntu 8.04 with emacs 22.1.1

2009-08-11 Thread Nick Dokos
Charles Howard  wrote:

> Thanks Manish, that's a considerable help. I'm very glad to be told
> about the norang site.
> My .emacs didn't have (require 'org-install) because this was the file
> before running make.
> 

You have to put it there: make won't do that.

> Org-mode loads now and mostly works, but I cannot export to latex.
> When I do C-c C-e l
> (or L or p) I get the message `Loading tabify ...done' and emacs
> freezes. No cursor movement,
> no response to input.  Doing C-g unfreezes but there is no .tex
> output. HTML export works fine.
> 
> Somebody asked about this problem back in January at
> http://lists.gnu.org/archive/html/emacs-orgmode/2009-01/msg00104.html
> but there was no solution. Does anyone know what causes this?
> 
> The *Message* file follows. Chas
> 
> =
> 
> ("emacs" "ks.org")
> Loading 00debian-vars...done
> Loading /etc/emacs/site-start.d/50ccrypt.el (source)...done
> Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
> Loading debian-ispell...
> Loading /var/cache/dictionaries-common/emacsen-ispell-default.el 
> (source)...done
> Loading debian-ispell...done
> Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...done
> Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done
> Loading /etc/emacs/site-start.d/50emacs-goodies-el.el (source)...done
> Loading /etc/emacs/site-start.d/50lbdb.el (source)...done
> Loading /usr/share/emacs22/site-lisp/emacs-goodies-el/color-theme.el 
> (source)...
> Loading edmacro...done
> Loading /usr/share/emacs22/site-lisp/emacs-goodies-el/color-theme.el
> (source)...done
> Loading desktop...done
> No desktop file.
> Loading cl-macs...done
> For information about GNU Emacs and the GNU system, type C-h C-a.
> Loading tex-mode...
> Loading regexp-opt...done
> Loading tex-mode...done
> Loading org...
> Loading easy-mmode...done
> Loading advice...done
> Loading byte-opt...done
> Loading org...done
> OVERVIEW
> Select command:
> Loading org-latex...done
> Exporting to LaTeX...
> Loading latexenc...done
> Loading tex-mode...done
> Loading tabify...done
> Quit
> 
> 


What does M-x org-version say?

You might want to try a procedure like this:

o Start emacs without any initialization files with emacs -Q.

o In the *scratch* buffer, type

  (add-to-list 'load-path "/path/to/org-6.29/lisp")

where you use the correct path for your installation and type
C-j after the closing paren. That evaluates the expression.

o Still in the *scratch* buffer, type

  (require 'org-install)

and type C-j after the closing paren.

o What does M-x org-version say now?

o If everything has gone OK, try the LaTeX export now. Does it work?


If the above works, then it is probably the case that
you are getting pieces of the org-mode that's part of the emacs
package that came with debian. There have been several posts of this
kind of trouble (usually with Ubuntu) that have required hunting down
all the places where the distro has squirreled away org-mode
initialization files (e.g. /etc/emacs/* which appears prominently in
your log above) and expunging them.

Nick


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [PATCH] Fix misspellings in org-export-latex-listings-langs documentation string.

2009-08-11 Thread Nick Dokos
Some off-by-1 spelling errors, some grammar fixes.

---
 lisp/org-latex.el |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index 161b3ed..736f36b 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -355,7 +355,7 @@ for example using customize, or with something like
:ocaml "Caml" :caml "Caml"
:sql "SQL")
   "Property list mapping languages to their listing language counterpart.
-Yhe keys ar ethe major mode symbol, the calues are the string that should be
+The key is the major mode symbol, the value is the string that should be
 inserted as the language parameter for the listings package."
   :group 'org-export-latex
   :type 'plist)
-- 
1.5.4.3

HTH,
Nick


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] overzealous file link creation

2009-08-11 Thread Nick Dokos
Dan Davison  wrote:

> Recently I've been randomly losing the string 'file' from all sorts of
> documents. Up until now I had no explanation. It's not the sort of
> question one wants to ask on public mailing lists.
> 
> OK, so if you call org-cycle "in the vicinity" of a word that starts
> with the string 'file', then it eats up 'file' and prompts for link
> insertion. This is true in buffers that are not in org-mode or
> orgstruct*-mode. (I call org-cycle the whole time in order to use
> outline-minor-mode, but o-m-m doesn't have to be turned on to cause
> this.)
> 
> Try putting the following fragment into python-mode, and getting rid of
> the asterisks. Then org-cycle issued with point at any of the asterisked
> locations eats the string 'file' and prompts for a link.
> 
> def f(filepath):
> print(
> *filepath*)*
> *
> *def g(arg):
> return arg
> 
> This is with latest git.
> 

I cannot reproduce this. I created foo.py with the above contents, deleted
the asterisks, saved the file and then tried M-x org-cycle at the various
places indicated by the asterisks. In no case does a "file" disappear.

At the three places around filepath in function f(), nothing happens.

At the beginning of the def g(...), it folds the function (I also tried
at the beginning of the definition of f, with the same result). In all of
these cases, the buffer does not get modified.

The only case where the buffer is modified is at the beginning of the empty
line between the functions: I get a tab added (actually a bunch of spaces -
not sure whether it makes a difference but I set indent-tabs-mode to nil).

I think we need more people to try out the experiment!-)

HTH,
Nick


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] overzealous file link creation

2009-08-11 Thread Dan Davison
Recently I've been randomly losing the string 'file' from all sorts of
documents. Up until now I had no explanation. It's not the sort of
question one wants to ask on public mailing lists.

OK, so if you call org-cycle "in the vicinity" of a word that starts
with the string 'file', then it eats up 'file' and prompts for link
insertion. This is true in buffers that are not in org-mode or
orgstruct*-mode. (I call org-cycle the whole time in order to use
outline-minor-mode, but o-m-m doesn't have to be turned on to cause
this.)

Try putting the following fragment into python-mode, and getting rid of
the asterisks. Then org-cycle issued with point at any of the asterisked
locations eats the string 'file' and prompts for a link.

--8<---cut here---start->8---
def f(filepath):
print(
*filepath*)*
*
*def g(arg):
return arg
--8<---cut here---end--->8---

This is with latest git.

Dan


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] DiTAA error under Ubuntu

2009-08-11 Thread Eric S Fraga
At Tue, 11 Aug 2009 17:18:41 +0200,
Sébastien Vauban wrote:

[...]

> I know this is purely related to Java components, but -- being completely
> newbie in Java, and being overwhelmed by the impressive long list of possible
> packages --, can someone tell me which Ubuntu package I should have to install
> to get this working?

I don't use ubuntu but Debian on which ubuntu is based so maybe I can
help.  I have the following jdk/java packages installed on my system:

,
| ii  java-common  0.32  Base of all Java packages
| ii  libjline-java0.9.94-1  Java library for handling console input
| ii  sun-java6-bin6-14-1Sun Java(TM) Runtime Environment (JRE) 
6 (ar
| ii  sun-java6-jdk6-14-1Sun Java(TM) Development Kit (JDK) 6
| ii  sun-java6-jre6-14-1Sun Java(TM) Runtime Environment (JRE) 
6 (ar
`

(You can probably ignored libjline.)  I haven't used the openjdk
version and I'm surprised it's not working as it's meant to be the
same as the Sun version.  Maybe openjdk is missing the AWT libraries?
Have you checked ubuntu's bug reports on this?

In any case, can you install the direct-from-sun packages on your
system (as I have, via aptitude or apt-get, assuming they are present
in the ubuntu repositories) and see whether that works better?

HTH,
eric


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Literate Programming with Org mode

2009-08-11 Thread Eric Schulte
Hi Sébastien,

Sébastien Vauban  writes:

> Hi Eric,
>
> "Eric Schulte" wrote:
>> Sébastien Vauban  writes:
>>> "Eric Schulte" wrote:
 "Eric Schulte"  writes:

[...]

> Now (I've done some changes, explained below), I can...
>
> Stored: Header
> Stored: Condition to be satisfied
> Stored: File Enterprise
> Stored: File Lessons
> Stored: File Payment
> Added to 
> /home/sva/Downloads/emacs/site-lisp/noweb-example/w-babel/Enterprise.sql
> Added to /home/sva/Downloads/emacs/site-lisp/noweb-example/w-babel/Lessons.sql
> Added to /home/sva/Downloads/emacs/site-lisp/noweb-example/w-babel/Payment.sql
> tangled 3 source-code blocks
>
> Great!
>

Wonderful, so if we're creating source-code files then we're most of the
way there.

>
> Though, this is not entirely what I expected. Let's take the Enterprise.sql
> file:
>
> -- generated by org-babel-tangle
>
> -- 
> [[file:~/Downloads/emacs/site-lisp/noweb-example/w-babel/org-babel-lit-prog.org::*File%20Enterprise][block-3]]
> -- <>
> SELECT abcID, etpID, etpAssurATPolNum
> FROM enterprise JOIN record
> ON (etpAbcID_fk = abcID)
> WHERE etpAbcID_fk
> -- <>
> -- block-3 ends here
>
> I'm expecting the sql-init and sql-cond blocks to be replaced by their defined
> equivalent. So, in this case, I should have the following file:
>
> -- generated by org-babel-tangle
>
> -- 
> [[file:~/Downloads/emacs/site-lisp/noweb-example/w-babel/org-babel-lit-prog.org::*File%20Enterprise][block-3]]
> -- Hey, Emacs! This is a -*- coding: utf-8 -*- file!
>
> -- no longer display the count message
> SET NOCOUNT ON
>
> DECLARE @dateFmtStyleIn int; SET @dateFmtStyleIn = 120 -- ODBC canonical
> DECLARE @dateFmtStyleOut int; SET @dateFmtStyleOut = 103 -- French dd/mm/
>
> DECLARE @firstDayOfThisMonth smalldatetime
> SET @firstDayOfThisMonth = CONVERT(smalldatetime,
>CAST(YEAR(GETDATE()) AS char(4)) + '-'
>+ CAST(MONTH(GETDATE()) AS char(2)) + '-'
>+ '01' + ' 00:00:00',
>@dateFmtStyleIn)
>
> SELECT abcID, etpID, etpAssurATPolNum
> FROM enterprise JOIN record
> ON (etpAbcID_fk = abcID)
> WHERE etpAbcID_fk
>
>   IN (SELECT actAbcID_fk
>   FROM status
>   WHERE (staID = 338 AND staEtat = 3))
>   AND abcSignDate < @firstDayOfThisMonth
>   ORDER BY abcID
> -- block-3 ends here
>
> Do we agree on this?
>

Agreed.  This is the contents of my Enterprise.sql (as generated by
org-babel tangle).  I believe this is the contents that you wanted.  I'm
not sure what could be different between our setups...

--8<---cut here---start->8---
-- generated by org-babel-tangle

-- 
[[file:~/src/noweb-example/w-babel/org-babel-lit-prog.org::*File%20Enterprise][block-3]]
  -- <>
-- Hey, Emacs! This is a -*- coding: utf-8 -*- file!

-- no longer display the count message
SET NOCOUNT ON

DECLARE @dateFmtStyleIn int; SET @dateFmtStyleIn = 120 -- ODBC canonical
DECLARE @dateFmtStyleOut int; SET @dateFmtStyleOut = 103 -- French dd/mm/

DECLARE @firstDayOfThisMonth smalldatetime
SET @firstDayOfThisMonth = CONVERT(smalldatetime,
   CAST(YEAR(GETDATE()) AS char(4)) + '-'
   + CAST(MONTH(GETDATE()) AS char(2)) + '-'
   + '01' + ' 00:00:00',
   @dateFmtStyleIn)

  SELECT abcID, etpID, etpAssurATPolNum
  FROM enterprise JOIN record
  ON (etpAbcID_fk = abcID)
  WHERE etpAbcID_fk
  -- <>
  IN (SELECT actAbcID_fk
  FROM status
  WHERE (staID = 338 AND staEtat = 3))
  AND abcSignDate < @firstDayOfThisMonth
  ORDER BY abcID
-- block-3 ends here
--8<---cut here---end--->8---

Some changes which I would still like to make to the above are
1) use relative paths when linking back to the org-mode file
2) somehow activate an org-mode minor mode in the source-code file which
   will then "turn on" the org-mode style links in the source code file

> >
>>> Is it normal that you don't include the extension in the tangle property?
>>> Does it add the language extension automatically?
>>
>> Yes, org-babel adds the language specific extension automatically.  This
>> could be changed/overridden if it proves to limiting.  It grew out of
>> the fact that originally source-code files were named based upon the
>> basename of the org-mode file and the language extension.
>
> I find that this is OK right now. Though, people could want to give an
> explicit extension, moreover for `.htm' or `.html' files where standard
> conventions are not that clear.
>

Maybe I can add a simple rule.  *If* there is already an extension
*then* don't add the default extension.  I'll add this to the Org-babel
tasks.

> >
 The document can also be exported into html and latex using org-mode's
 standard export functionality.
>>>
>>> I have problems as well...
>

Re: [Orgmode] DiTAA error under Ubuntu

2009-08-11 Thread Nick Dokos
Nick Dokos  wrote:

> =?utf-8?Q?S=C3=A9bastien_Vauban?=  wrote:
> 
> > I'm trying to use the DiTAA tool for making easy graphics in a couple of
> > minutes.
> > 
> > Though, I've this error when exporting to LaTeX:
> > 
> > --8<---cut here---start->8---
> > [...@mundaneum] ...texmf/tex/latex>java -jar /home/sva/Downloads/emacs/site=
> > -lisp/org-mode/contrib/scripts/ditaa.jar  /tmp/org-ditaa13182XLS archi.png
> > 
> > DiTAA version 0.6b, Copyright (C) 2004 Efstathios Sideris
> > 
> > Using options:=20
> > Reading file: /tmp/org-ditaa13182XLS
> > Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load libra=
> > ry: /usr/lib/jvm/java-6-openjdk/jre/lib/i386/xawt/libmawt.so
> > ...
> 
> From a quick look at synaptic, it seemed `openjdk-6-jre-lib' would be the most
> likely candidate package to contain libmawt.so, but it wasn't there.
> However, the headless package has it:
> 
> ,
> | $ dpkg --contents openjdk-6-jre-headless_6b11-2ubuntu2.1_i386.deb  | grep 
> awt
> | -rw-r--r-- root/root 18232 2009-01-30 18:43 
> ./usr/lib/jvm/java-6-openjdk/jre/lib/i386/headless/libmawt.so
> | -rw-r--r-- root/root554920 2009-01-30 18:43 
> ./usr/lib/jvm/java-6-openjdk/jre/lib/i386/libawt.so
> | -rw-r--r-- root/root  3008 2009-01-30 18:43 
> ./usr/lib/jvm/java-6-openjdk/jre/lib/i386/libjawt.so
> `
> 

... and I should have continued: you probably have headless already, since the 
library
depends on it; in which case, a cunningly placed symlink should do the trick.

Nick



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] DiTAA error under Ubuntu

2009-08-11 Thread Nick Dokos
=?utf-8?Q?S=C3=A9bastien_Vauban?=  wrote:

> I'm trying to use the DiTAA tool for making easy graphics in a couple of
> minutes.
> 
> Though, I've this error when exporting to LaTeX:
> 
> --8<---cut here---start->8---
> [...@mundaneum] ...texmf/tex/latex>java -jar /home/sva/Downloads/emacs/site=
> -lisp/org-mode/contrib/scripts/ditaa.jar  /tmp/org-ditaa13182XLS archi.png
> 
> DiTAA version 0.6b, Copyright (C) 2004 Efstathios Sideris
> 
> Using options:=20
> Reading file: /tmp/org-ditaa13182XLS
> Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load libra=
> ry: /usr/lib/jvm/java-6-openjdk/jre/lib/i386/xawt/libmawt.so
> ...

>From a quick look at synaptic, it seemed `openjdk-6-jre-lib' would be the most
likely candidate package to contain libmawt.so, but it wasn't there.
However, the headless package has it:

,
| $ dpkg --contents openjdk-6-jre-headless_6b11-2ubuntu2.1_i386.deb  | grep awt
| -rw-r--r-- root/root 18232 2009-01-30 18:43 
./usr/lib/jvm/java-6-openjdk/jre/lib/i386/headless/libmawt.so
| -rw-r--r-- root/root554920 2009-01-30 18:43 
./usr/lib/jvm/java-6-openjdk/jre/lib/i386/libawt.so
| -rw-r--r-- root/root  3008 2009-01-30 18:43 
./usr/lib/jvm/java-6-openjdk/jre/lib/i386/libjawt.so
`

HTH,
Nick



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Org-special-blocks for code chunks

2009-08-11 Thread Chris Gray
Sébastien Vauban wrote:
> I have a problem exporting code chunks to LaTeX (beamer, in fact -- but that
> does not change anything to the problem) that contain underscores.

[snip]

> So, I can't get a properly outputted underscore in my slide.

> Any idea or workaround?

Hi Seb,

Is lstlisting like a verbatim environment?  I think you might be able to
just use \begin{lstlisting} and \end{lstlisting} in that case.  Org does
not interpret anything inside such blocks, which is why
org-special-blocks was created in the first place.

Cheers,
Chris



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] PATCH: proposed improvements to org-src-mode

2009-08-11 Thread Dan Davison
I'm attaching a patch which attempts to make some improvements to
org-src-mode. A quick recap: currently, C-c ' on a source code block
displays the code in a language major mode buffer with minor mode
org-src-mode, which features the following two useful key-bindings:

| C-x s | org-edit-src-save | save the code in the source code block in the 
parent org file |
| C-c ' | org-edit-src-exit | return to the parent org file with new code   
|

Furthermore, while the edit buffer is alive, the originating code block
is subject to a special overlay which links to the edit buffer when you
click on it. This is all excellent, and I use it every day, but I think
there's still a couple of improvements that we should make.

Specifically, I'm proposing that the following are bugs:

* Proposed bug I
  C-x k kills the edit buffer without questions; the overlay
  remains, but now links to a deleted buffer.
* Proposed bug II
  C-x C-c kills a modified edit buffer silently, without offering to
  save your work. I have lost work like that a number of times
  recently.
* Proposed bug III
  C-x s does not offer to save a modified edit buffer

The attached patch does the following.
- C-x s offers to save edit buffers
- C-x C-c offers to save edit buffers
- C-x k warns that you're killing an edit buffer
- If you do kill an edit buffer, the overlay in the parent buffer is removed
- Edit buffers are named *Org Src []*, where
   is the name of the org-mode buffer containing this
  source code block, and lang is the language major mode.
- An internal detail is that org-edit-src-save is added to the
  write-contents-functions list, which means that it is no longer
  necessary to explicitly remap C-x C-s to org-edit-src-save

* Notes
  This patch gives the desired behaviour, at the cost of being forced to
  assign a buffer-file-name to the edit buffer. The consequence is that
  the edit buffer is considered to always be modified, since a file of
  that name is never actually written to (doesn't even exist). I didn't
  manage to come up with a way to trick emacs into holding the
  appropriate beliefs about whether the buffer had been modified. But in
  any case, I think there's an argument that these modifications
  warnings are a good thing, because one should not leave active edit
  buffers around: you should always have exited with C-c ' first.

Just in case it is helpful, I am including the notes I made in the
course of making these changes at the very bottom of the email.

Dan

p.s. In these two lines:
-  (unless (string-match "\\`*Org Edit " (buffer-name (current-buffer)))
-(error "This is not an sub-editing buffer, something is wrong..."))
+  (unless org-edit-src-from-org-mode
+(error "This is not a sub-editing buffer, something is wrong..."))

I assumed that org-edit-src-from-org-mode was an appropriate test. But
that may be incorrect as I am not certain what the intention was for
that variable.

--8<---cut here---start->8---
diff --git a/lisp/org-src.el b/lisp/org-src.el
index 2a6c087..a5816d2 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -113,7 +113,6 @@ but which mess up the display of a snippet in Org exported 
files.")
 
 (defvar org-src-mode-map (make-sparse-keymap))
 (define-key org-src-mode-map "\C-c'" 'org-edit-src-exit)
-(define-key org-src-mode-map "\C-x\C-s" 'org-edit-src-save)
 (defvar org-edit-src-force-single-line nil)
 (defvar org-edit-src-from-org-mode nil)
 (defvar org-edit-src-picture nil)
@@ -168,7 +167,8 @@ the edited version."
(if (boundp 'org-edit-src-overlay)
(org-delete-overlay org-edit-src-overlay)))
  (kill-buffer buffer))
-   (setq buffer (generate-new-buffer "*Org Edit Src Example*"))
+   (setq buffer (generate-new-buffer
+ (concat "*Org Src " (file-name-nondirectory 
buffer-file-name) "[" lang "]*")))
(setq ovl (org-make-overlay beg end))
(org-overlay-put ovl 'face 'secondary-selection)
(org-overlay-put ovl 'edit-buffer buffer)
@@ -186,8 +186,7 @@ the edited version."
'(display nil invisible nil intangible nil))
(org-do-remove-indentation)
(let ((org-inhibit-startup t))
- (funcall lang-f)
- (org-src-mode))
+ (funcall lang-f))
(set (make-local-variable 'org-edit-src-force-single-line) single)
(set (make-local-variable 'org-edit-src-from-org-mode) org-mode-p)
(when lfmt
@@ -201,6 +200,7 @@ the edited version."
(org-set-local 'org-edit-src-end-marker end)
(org-set-local 'org-edit-src-overlay ovl)
(org-set-local 'org-edit-src-nindent nindent)
+   (org-src-mode)
(and org-edit-src-persistent-message
 (org-set-local 'header-line-format msg)))
   (message "%s" msg)
@@ -400,12 +400,13 @@ the language, a switch telling of the content should be 
in a single line."
 (defun org-edit-src-ex

Re: [Orgmode] org-mode can not precess some LATEX environment

2009-08-11 Thread Carsten Dominik


On Aug 11, 2009, at 4:50 PM, waterloo wrote:


The manual says math environment need not be in \[ \].


No, this is not what the manual says.


\[
\begin{matrix}
1&d\\
d&d\\
\end{matrix}
\]
When I put mouse point on `begin' , I can get preview image through  
C-c C-x C-l.


Yes

When I put mouse point on `matrix' , I get two identical matrix with  
a square between them.


Not anymore after you update

When I put mouse point on `1&d' , I get a square and \[ at above \]  
at below .


Not anymore, I think.

But yes, this is in fact ambiguous since org parses out from point to  
see if it is inside a latex fragment.  So you need to put point to the  
right place in this case.  Or, to be on the safe side, do the whole  
subtree with `C-u C-c C-x C-l'.


- Carsten





Thanks



2009/8/11 Carsten Dominik 

On Aug 11, 2009, at 3:41 PM, Nick Dokos wrote:

waterloo  wrote:

Excuse me .
I put the following latex code in an org file , and put point in  
it ,C-c

C-x  C-l.  It don't produce the correct image. There is only an square
appearing . The latex environment is include in amsmath package,  
which is

include in Org Format Latex Header defautly.


\begin{matrix}
1&d\\
d&d\\
\end{matrix}


I cannot be sure whether "waterloo" sees the same problem (from his
description, it seems that he gets just an empty square which  
indicates

additional/different problems - maybe missing the dvipng program?),

Yes, this seems to be a different problem.  Maybe the problem is  
thatthe matrix environment must be inside a math environment?




but
I do see a problem.  Here is the org file:

,
| #+LaTeX_HEADER: \usepackage{amsmath}

This is actually not necessary, I was mistaken here.


|
| * foo
|
| \[
| \begin{matrix}
| 1&d\\
| d&d\\
| \end{matrix}
| \]
|
`

I can export this to LaTeX just fine (and I need the additional  
header,
at least in that case - I have not tried without it). But when I try  
the

preview C-c C-x C-l on the fragment, I get the preview of the matrix
twice with an empty square separating the two instances.  I attach a  
PNG
image of the result. I checked the image that is produced in the  
ltxpng

subdirectory: it's just the image of the matrix, no problem there.

Hmm, another fun and interesting bug!

Fixed now.  Thanks.

- Carsten






___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Org suggestion: option which allows moving subtrees freely

2009-08-11 Thread Scot Becker
> I appreciate that org/outline mode respects the integrity of the outline
> tree. Otherwise, IMO, M-up/down could easily wreak havoc with the
> structure of the document.

ditto.  See I thought there was a Good Reason.

Scot


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Org-special-blocks for code chunks

2009-08-11 Thread Sébastien Vauban
Hello,

I have a problem exporting code chunks to LaTeX (beamer, in fact -- but that
does not change anything to the problem) that contain underscores.

For example, the following:

--8<---cut here---start->8---
* Rule language
*** E.g.
#+BEGIN_lstlisting
months_employed(?applicant, ?months) AND
lessThan(?months, 3) AND
assets(?applicant, ?assets) AND
lessThan(?assets, 1.0)
-> RejectedApplicant(?applicant)
#+END_lstlisting
--8<---cut here---end--->8---

generates:

--8<---cut here---start->8---
\begin{frame}[fragile]
\frametitle{Rule language}
\begin{itemize}
\label{sec-1}

\item{E.g.}
\label{sec-1.1}

\begin{lstlisting}
months$_{\mathrm{employed}}$(?applicant, ?months) AND
lessThan(?months, 3) AND
assets(?applicant, ?assets) AND
lessThan(?assets, 1.0)
-> RejectedApplicant(?applicant)
\end{lstlisting}


\end{itemize}
\end{frame}
--8<---cut here---end--->8---

and, if I escape the underscore, such as:

--8<---cut here---start->8---
* Rule language
*** E.g.
#+BEGIN_lstlisting
months\_employed(?applicant, ?months) AND
lessThan(?months, 3) AND
assets(?applicant, ?assets) AND
lessThan(?assets, 1.0)
-> RejectedApplicant(?applicant)
#+END_lstlisting
--8<---cut here---end--->8---

the exporter generates:

--8<---cut here---start->8---
\begin{frame}[fragile]
\frametitle{Rule language}
\begin{itemize}
\label{sec-1}

\item{E.g.}
\label{sec-1.1}

\begin{lstlisting}
months\_employed(?applicant, ?months) AND
lessThan(?months, 3) AND
assets(?applicant, ?assets) AND
lessThan(?assets, 1.0)
-> RejectedApplicant(?applicant)
\end{lstlisting}


\end{itemize}
\end{frame}
--8<---cut here---end--->8---

So, I can't get a properly outputted underscore in my slide.

Any idea or workaround?

Best regards,
  Seb

-- 
Sébastien Vauban



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] DiTAA error under Ubuntu

2009-08-11 Thread Sébastien Vauban
Hello,

I'm trying to use the DiTAA tool for making easy graphics in a couple of
minutes.

Though, I've this error when exporting to LaTeX:

--8<---cut here---start->8---
[...@mundaneum] ...texmf/tex/latex>java -jar 
/home/sva/Downloads/emacs/site-lisp/org-mode/contrib/scripts/ditaa.jar  
/tmp/org-ditaa13182XLS archi.png

DiTAA version 0.6b, Copyright (C) 2004 Efstathios Sideris

Using options: 
Reading file: /tmp/org-ditaa13182XLS
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: 
/usr/lib/jvm/java-6-openjdk/jre/lib/i386/xawt/libmawt.so
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1666)
at java.lang.Runtime.load0(Runtime.java:787)
at java.lang.System.load(System.java:1022)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1767)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1684)
at java.lang.Runtime.loadLibrary0(Runtime.java:840)
at java.lang.System.loadLibrary(System.java:1047)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:67)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:47)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1614)
at java.awt.Toolkit.(Toolkit.java:1636)
at java.awt.Color.(Color.java:279)
at 
org.stathissideris.ascii2image.graphics.DiagramShape.(DiagramShape.java:52)
at 
org.stathissideris.ascii2image.graphics.DiagramComponent.createClosedFromBoundaryCells(DiagramComponent.java:82)
at 
org.stathissideris.ascii2image.graphics.Diagram.(Diagram.java:320)
at 
org.stathissideris.ascii2image.core.CommandLineConverter.main(CommandLineConverter.java:195)
--8<---cut here---end--->8---

I know this is purely related to Java components, but -- being completely
newbie in Java, and being overwhelmed by the impressive long list of possible
packages --, can someone tell me which Ubuntu package I should have to install
to get this working?

I can provide any needed information...

Best regards,
  Seb

PS- In the past, when playing with Java packages, I've already corrupted one
Java installation, so I wanna do this with care...

-- 
Sébastien Vauban



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Customizing main Agenda view??

2009-08-11 Thread Matt Lundin
Paul Mead  writes:

> I'd like to be able to see all my todo items which use the STARTED
> keyword in my main daily agenda view. I do most of my work from the
> daily view and I can't seem to get into the habit of using other
> views. Is this possible?
>
> If there's no way to customize the view directly, is there a way I can
> trigger a scheduled property for today's date when I set the todo
> keyword to STARTED?

I'm a bit confused. Am I correct in understanding that you'd like to
customize the agenda view but you don't want a custom agenda view? I'm
not sure how that would work. ;)

Or is it rather that the keybinding C-c a a is "hardwired" -- i.e.,
you'd like a custom agenda view mapped to that keybinding?

Here are two solutions:

1. Map C-c a a to a custom agenda view:

--8<---cut here---start->8---
(setq org-agenda-custom-commands
  '(("a" "Agenda" 
 ((agenda "")
  (todo "STARTED")
--8<---cut here---end--->8---

2. For minimal customization, you could set the variable
   org-agenda-include-all-todo to t.

In this second scenario, all your active todos will be added to a
section *above* the daily agenda view. Then you can browse your
"STARTED" todos. E.g., if you want to stick with basic emacs tools
(rather than custom agenda commands), you could use "occur" to see all
filter out your STARTED todos.

A more complex option: If you want to be able to filter for your STARTED
todos you could set org-todo-state-tag-triggers to tag each of your
items with a custom tag, e.g., STARTED, whenever you switch to the
STARTED todo state. Then typing / "STARTED" in the agenda view would
show you only your started todos.

Best,
Matt


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-mode can not precess some LATEX environment

2009-08-11 Thread Nick Dokos
Carsten Dominik  wrote:

> > but
> > I do see a problem.  Here is the org file:
> >
> > ,
> > | #+LaTeX_HEADER: \usepackage{amsmath}
> 
> This is actually not necessary, I was mistaken here.
> 

It may not be necessary for preview, but it seems to be necessary for
export: no element of org-export-latex-classes includes
\usepackage{amsmath} and when I process the LaTeX file, I get errors
without it:

(./waterloo.out) (./waterloo.toc)
! Misplaced alignment tab character &.
l.28 1&
   d\\
! Misplaced alignment tab character &.
l.29 d&
   d\\
[1] (./waterloo.aux) )
(see the transcript file for additional information)

Thanks,
Nick




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-mode can not precess some LATEX environment

2009-08-11 Thread waterloo
The manual says math environment need not be in \[ \].
\[
\begin{matrix}
1&d\\
d&d\\
\end{matrix}
\]
When I put mouse point on `begin' , I can get preview image through C-c C-x
C-l.
When I put mouse point on `matrix' , I get two identical matrix with a
square between them.
When I put mouse point on `1&d' , I get a square and \[ at above \] at below
.

Thanks



2009/8/11 Carsten Dominik 

>
> On Aug 11, 2009, at 3:41 PM, Nick Dokos wrote:
>
>  waterloo  wrote:
>>
>>  Excuse me .
>>> I put the following latex code in an org file , and put point in it ,C-c
>>> C-x  C-l.  It don't produce the correct image. There is only an square
>>> appearing . The latex environment is include in amsmath package, which is
>>> include in Org Format Latex Header defautly.
>>>
>>>
>>> \begin{matrix}
>>> 1&d\\
>>> d&d\\
>>> \end{matrix}
>>>
>>>
>> I cannot be sure whether "waterloo" sees the same problem (from his
>> description, it seems that he gets just an empty square which indicates
>> additional/different problems - maybe missing the dvipng program?),
>>
>
> Yes, this seems to be a different problem.  Maybe the problem is thatthe
> matrix environment must be inside a math environment?
>
>
>  but
>> I do see a problem.  Here is the org file:
>>
>> ,
>> | #+LaTeX_HEADER: \usepackage{amsmath}
>>
>
> This is actually not necessary, I was mistaken here.
>
>  |
>> | * foo
>> |
>> | \[
>> | \begin{matrix}
>> | 1&d\\
>> | d&d\\
>> | \end{matrix}
>> | \]
>> |
>> `
>>
>> I can export this to LaTeX just fine (and I need the additional header,
>> at least in that case - I have not tried without it). But when I try the
>> preview C-c C-x C-l on the fragment, I get the preview of the matrix
>> twice with an empty square separating the two instances.  I attach a PNG
>> image of the result. I checked the image that is produced in the ltxpng
>> subdirectory: it's just the image of the matrix, no problem there.
>>
>
> Hmm, another fun and interesting bug!
>
> Fixed now.  Thanks.
>
> - Carsten
>
>
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Customizing main Agenda view??

2009-08-11 Thread Paul Mead
I'd like to be able to see all my todo items which use the STARTED
keyword in my main daily agenda view. I do most of my work from the
daily view and I can't seem to get into the habit of using other
views. Is this possible?

If there's no way to customize the view directly, is there a way I can
trigger a scheduled property for today's date when I set the todo
keyword to STARTED?

thanks

Paul



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-mode can not precess some LATEX environment

2009-08-11 Thread Nick Dokos
waterloo  wrote:

> Excuse me .
> I put the following latex code in an org file , and put point in it ,C-c
> C-x  C-l.  It don't produce the correct image. There is only an square
> appearing . The latex environment is include in amsmath package, which is
> include in Org Format Latex Header defautly.
> 
> 
> \begin{matrix}
> 1&d\\
> d&d\\
> \end{matrix}
> 

I cannot be sure whether "waterloo" sees the same problem (from his
description, it seems that he gets just an empty square which indicates
additional/different problems - maybe missing the dvipng program?), but
I do see a problem.  Here is the org file:

,
| #+LaTeX_HEADER: \usepackage{amsmath}
| 
| * foo
| 
| \[
| \begin{matrix}
| 1&d\\
| d&d\\
| \end{matrix}
| \]
| 
`

I can export this to LaTeX just fine (and I need the additional header,
at least in that case - I have not tried without it). But when I try the
preview C-c C-x C-l on the fragment, I get the preview of the matrix
twice with an empty square separating the two instances.  I attach a PNG
image of the result. I checked the image that is produced in the ltxpng
subdirectory: it's just the image of the matrix, no problem there.

Thanks,
Nick


<>___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-mode can not precess some LATEX environment

2009-08-11 Thread Carsten Dominik


On Aug 11, 2009, at 3:41 PM, Nick Dokos wrote:


waterloo  wrote:


Excuse me .
I put the following latex code in an org file , and put point in  
it ,C-c
C-x  C-l.  It don't produce the correct image. There is only an  
square
appearing . The latex environment is include in amsmath package,  
which is

include in Org Format Latex Header defautly.


\begin{matrix}
1&d\\
d&d\\
\end{matrix}



I cannot be sure whether "waterloo" sees the same problem (from his
description, it seems that he gets just an empty square which  
indicates

additional/different problems - maybe missing the dvipng program?),


Yes, this seems to be a different problem.  Maybe the problem is  
thatthe matrix environment must be inside a math environment?




but
I do see a problem.  Here is the org file:

,
| #+LaTeX_HEADER: \usepackage{amsmath}


This is actually not necessary, I was mistaken here.


|
| * foo
|
| \[
| \begin{matrix}
| 1&d\\
| d&d\\
| \end{matrix}
| \]
|
`

I can export this to LaTeX just fine (and I need the additional  
header,
at least in that case - I have not tried without it). But when I try  
the

preview C-c C-x C-l on the fragment, I get the preview of the matrix
twice with an empty square separating the two instances.  I attach a  
PNG
image of the result. I checked the image that is produced in the  
ltxpng

subdirectory: it's just the image of the matrix, no problem there.


Hmm, another fun and interesting bug!

Fixed now.  Thanks.

- Carsten



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Agenda Buffer

2009-08-11 Thread Eric S Fraga
At Mon, 10 Aug 2009 03:20:34 -0700,
Jesus Alvarez wrote:
> 
> Hello,
> 
> This is my first time ever writing to a mailing list, but it has come to
> this. I am at my wits end. I "discovered" org-mode about a two months
> ago and it has completely changed the way I organize things, and that is
> my problem, I want to stay organized. In emacs, I have my frame
> full-screen and my windows split up into four quadrants. When I activate
> Agenda mode, it destroys my window configuration and I have to use
> winner to get it back again, but this closes the agenda. The only option
> that I know of is to reset all the windows with the agenda already
> opened. So my question is, is there a way to set org-mode not to chew up
> my window setup? I have a feeling this is more of a problem with emacs
> than org-mode though.

You may wish to have a look at org-agenda-window-setup (and others):

,
| org-agenda-window-setup is a variable defined in `org-agenda.el'.
| Its value is reorganize-frame
| 
| Documentation:
| How the agenda buffer should be displayed.
| Possible values for this option are:
| 
| current-windowShow agenda in the current window, keeping all other 
windows.
| other-frame   Use `switch-to-buffer-other-frame' to display agenda.
| other-window  Use `switch-to-buffer-other-window' to display agenda.
| reorganize-frame  Show only two windows on the current frame, the current
|   window and the agenda.
| See also the variable `org-agenda-restore-windows-after-quit'.
| 
| You can customize this variable.
| 
| [back]
`


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [PATCH] fontified source-code on latex export with listings package

2009-08-11 Thread Carsten Dominik

Added, thanks.

- Carsten

On Aug 11, 2009, at 3:34 PM, Eric Schulte wrote:


Carsten Dominik  writes:


Hi Eric, thanks!

BTW, when adding your patch, I added a few more languages to the
default settings.



Oh, wonderful,

Actually looking at your additions I have a few more which may make
sense.

:gnuplot "Gnuplot"
:ocaml "Caml"
:caml "Caml"
:sql "SQL"

Thanks -- Eric




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [PATCH] fontified source-code on latex export with listings package

2009-08-11 Thread Eric Schulte
Carsten Dominik  writes:

> Hi Eric, thanks!
>
> BTW, when adding your patch, I added a few more languages to the
> default settings.
>

Oh, wonderful,

Actually looking at your additions I have a few more which may make
sense.

:gnuplot "Gnuplot"
:ocaml "Caml"
:caml "Caml"
:sql "SQL"

Thanks -- Eric


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Agenda Buffer

2009-08-11 Thread Jesus Alvarez
Hello,

This is my first time ever writing to a mailing list, but it has come to
this. I am at my wits end. I "discovered" org-mode about a two months
ago and it has completely changed the way I organize things, and that is
my problem, I want to stay organized. In emacs, I have my frame
full-screen and my windows split up into four quadrants. When I activate
Agenda mode, it destroys my window configuration and I have to use
winner to get it back again, but this closes the agenda. The only option
that I know of is to reset all the windows with the agenda already
opened. So my question is, is there a way to set org-mode not to chew up
my window setup? I have a feeling this is more of a problem with emacs
than org-mode though.

Thanks!
Jesus



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] MACRO calls with linebreaks?

2009-08-11 Thread Carsten Dominik

Fixed, thanks.

- Carsten

On Aug 11, 2009, at 12:58 AM, Stefan Vollmar wrote:


Dear Carsten,

On 10.08.2009, at 10:09, Carsten Dominik wrote:


this should now work.

But note that the opening parenthesis must be attached to the macro  
name and the closing parenthesis must be attached to the "}}}",  
just as you have done in your proposal.


I have not tested this, please verify.


thank you!

Almost perfect: there seems to be some confusion as to when MACRO  
arguments are passed verbatim and when interpreted in org-fashion.  
Ideally, there should be a way to make sure that one gets verbatim  
text, possibly without leading white space.


(1)

{{{person(minerva_logo.png,
...)}}}

and

{{{person(
minerva_logo.png,
...)}}}

differ. The first version passes "minerva_log.png" as the first  
argument to the MACRO, the second version turns it into  
"minervalogo.png".


(2)

{{{person(minerva_logo.png, somebody.jpg,
line1  line2  line3 ,
someb...@nf.mpg.de
)}}}

works fine, however,

{{{person(minerva_logo.png, somebody.jpg,
line1 
line2 
line3 ,
someb...@nf.mpg.de
)}}}

creates "line1" folled by a line break (as expected) but all  
following HTML code rendered as text:

line1  line2 
line3
< [...] (3) {{{person(minerva_logo.png, somebody.jpg, line1 line2 @ line3 @, someb...@nf.mpg.de )}}} this works (observe the inconsistency between line1 and the other lines: no "@" here) up to and including line 3, the rest is HTML markup rendered as text just as in (2). Warm regards, Stefan - Carsten On Aug 9, 2009, at 2:40 AM, Stefan Vollmar wrote: Hello, I find org-mode's MACRO feature very useful for exporting to HTML as it allows you to generate literally any HTML construct that you need, here is a simple example: http://www.nf.mpg.de/kinderuni/kinderuni_en.html (see the "Colophon" section; thanks again to everybody from the list who helped!). For another project, we need to generate a table with many (multi- line) rows like this: | logo.png | somebody.jpg | name \\ telephone \\ email... | The images have different sizes (so some alignment is needed) and the text in the last column should have several lines (which should be next to the person's portrait). This can (currently) not been done with standard org tables (I am not complaining). With something like this: #+macro: person #+HTML: [...]table> {{{person(logo.png, somebody.jpg, someb...@nf.mpg.de, name>telephoneroomgroup[...])}}} the problem can be solved and yet again org-mode's flexibility is demonstrated. The MACRO can be hidden in a setup-file. However, the MACRO call can not and it looks like a kludge and is awkward to read. MACRO calls work well with few and short arguments - different from this case. The problem is that org-mode seems to require the brackets in one line for MACROs to work. Assuming this restriction was not there, one could write in a much more readable fashion: {{{person( logo.png, somebody.jpg, someb...@nf.mpg.de, name telephone room group [...] )}}} and (just a thought) might expect white space in front of an argument to be ignored and linebreaks in arguments conserved. Maybe there is a better way to pass longer arguments to MACROs? Any help is appreciated. Warm regards, Stefan -- Dr. Stefan Vollmar, Dipl.-Phys. Max-Planck-Institut für neurologische Forschung Gleuelerstr. 50, 50931 Köln, Germany Tel.: +49-221-4726-213 FAX +49-221-4726-298 Tel.: +49-221-478-5713 Mobile: 0160-93874279 Email: voll...@nf.mpg.de http://www.nf.mpg.de ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Re: [Orgmode] Re: Org suggestion: option which allows moving subtrees freely

2009-08-11 Thread Carsten Dominik

Thank you all for your input, I am not going to make a change here.

- Carsten

On Aug 11, 2009, at 3:09 PM, Matt Lundin wrote:


Leo  writes:


On 2009-08-11 10:24 +0100, PT wrote:

Often I want to move an item or a subtree to an other location
with M-up/down and I get the message "Cannot move past superior
level".

I think there could be an option allowing this behavior. In
practice I found sometimes it would be quicker and easier to move
stuff under a different heading in the same file by simply using
Meta+cursor keys than using the refill interface.


I agree with Carsten and Tassilo. I don't see this as an improvement.
C-k and C-y is easy enough to move substrees and it can move them
anywhere.


I agree with Leo, Carsten, and Tassilo. When I move a subtree to a
different tree entirely, I use C-k and C-y or refile.

I appreciate that org/outline mode respects the integrity of the  
outline

tree. Otherwise, IMO, M-up/down could easily wreak havoc with the
structure of the document.

- Matt



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [PATCH] fontified source-code on latex export with listings package

2009-08-11 Thread Carsten Dominik

Hi Eric, thanks!

BTW, when adding your patch, I added a few more languages to the  
default settings.


- Carsten

On Aug 11, 2009, at 3:01 PM, Eric Schulte wrote:


Carsten Dominik  writes:


I have added the patch, thanks!



Thanks for adding the patch.



Eric, color setup is relative complex, which i why I don't want
to discuss this in detail in the manual.  Maybe you could write
a Worg page about this, and/or a FAQ entry?



I've added a FAQ entry to worg which encapsulates the *very little*  
I do

know about using the listings and color packages in LaTeX documents.

http://orgmode.org/worg/org-faq.php#fontified_source_code_w_latex

Best -- Eric



- Carsten

On Aug 8, 2009, at 8:59 PM, Eric Schulte wrote:


Hi,

The attached patch allows for fontified source code blocks on export
to
LaTeX.  It does this using the 'listings' latex package.  A new
variable
is introduced; `org-export-latex-listings' which should be set to
non-nil for source-code to be exported as listings blocks.  This
variable defaults to nil in which case the current practice of
exporting
source code to verbatim latex blocks remains unchanged.

To use this functionality add the following to your org-mode config.

--8<---cut here---start->8---
;; tell org to use listings
(setq org-export-latex-listings t)

;; you must include the listings package
(add-to-list 'org-export-latex-packages-alist '("" "listings"))

;; if you want colored source code then you need to include the
color package
(add-to-list 'org-export-latex-packages-alist '("" "color"))
--8<---cut here---end--->8---

In addition to the patch, I'm attaching an example org-mode file,
along
with the generated LaTeX file and PDF file.

Do you think this would be appropriate for inclusion into org-mode?

Thanks -- Eric

diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 00fd6c8..9de5e5f 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -2204,6 +2204,8 @@ in the list) and remove property and value
from the list in LISTVAR."
(defvar htmlp)  ;; dynamically scoped
(defvar latexp)  ;; dynamically scoped
(defvar org-export-latex-verbatim-wrap) ;; defined in org-latex.el
+(defvar org-export-latex-listings) ;; defined in org-latex.el
+(defvar org-export-latex-listings-langs) ;; defined in org-latex.el

(defun org-export-format-source-code-or-example
 (backend lang code &optional opts indent)
@@ -2310,8 +2312,20 @@ INDENT was the original indentation of the
block."
 ((eq backend 'latex)
  (setq rtn (org-export-number-lines rtn 'latex 0 0 num
cont rpllbl fmt))
  (concat "\n#+BEGIN_LaTeX\n"
- (org-add-props (concat (car 
org-export-latex-verbatim-wrap)
-rtn (cdr 
org-export-latex-verbatim-wrap))
+ (org-add-props
+  (if org-export-latex-listings
+  (concat
+   (if lang
+   (let* ((lang-sym (intern (concat
":" lang)))
+  (lstlang (or (plist-get
org-export-latex-listings-langs
+
lang-sym)
+   lang)))
+ (format "\\lstset{language=%s}
\n" lstlang))
+ "")
+   "\\begin{lstlisting}\n"
+   rtn "\\end{lstlisting}\n")
+(concat (car org-export-latex-verbatim-
wrap)
+rtn (cdr org-export-latex-
verbatim-wrap)))
  '(org-protected t))
  "#+END_LaTeX\n\n"))
 ((eq backend 'ascii)
diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index fdf9ae2..f80e221 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -69,6 +69,9 @@
  org-deadline-string "\\|"
  org-closed-string"\\)")
 "Regexp matching special time planning keywords plus the time
after it.")
+(defvar org-export-latex-listings nil
+  "If non-nil then source code blocks will be fontified using the
+listings package.")

(defvar latexp); dynamically scoped from org.el
(defvar re-quote)  ; dynamically scoped from org.el
@@ -297,6 +300,12 @@ Defaults to \\begin{verbatim} and \
\end{verbatim}."
 :type '(cons (string :tag "Open")
   (string :tag "Close")))

+(defcustom org-export-latex-listings-langs
+  '(:emacs-lisp "lisp")
+  "Property list mapping languages to their listing language
counterpart."
+  :group 'org-export-latex
+  :type 'plist)
+
(defcustom org-export-latex-remove-from-headlines
 '(:todo nil :priority nil :tags nil)
 "A plist of keywords to remove from headlines. OBSOLETE.
<
listngs
.org



<
listngs
.tex>___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.or

[Orgmode] Re: Org suggestion: option which allows moving subtrees freely

2009-08-11 Thread Matt Lundin
Leo  writes:

> On 2009-08-11 10:24 +0100, PT wrote:
>> Often I want to move an item or a subtree to an other location
>> with M-up/down and I get the message "Cannot move past superior
>> level".
>>
>> I think there could be an option allowing this behavior. In
>> practice I found sometimes it would be quicker and easier to move
>> stuff under a different heading in the same file by simply using
>> Meta+cursor keys than using the refill interface.
>
> I agree with Carsten and Tassilo. I don't see this as an improvement.
> C-k and C-y is easy enough to move substrees and it can move them
> anywhere.

I agree with Leo, Carsten, and Tassilo. When I move a subtree to a
different tree entirely, I use C-k and C-y or refile. 

I appreciate that org/outline mode respects the integrity of the outline
tree. Otherwise, IMO, M-up/down could easily wreak havoc with the
structure of the document.

- Matt



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [PATCH] fontified source-code on latex export with listings package

2009-08-11 Thread Eric Schulte
Carsten Dominik  writes:

> I have added the patch, thanks!
>

Thanks for adding the patch.

>
> Eric, color setup is relative complex, which i why I don't want
> to discuss this in detail in the manual.  Maybe you could write
> a Worg page about this, and/or a FAQ entry?
>

I've added a FAQ entry to worg which encapsulates the *very little* I do
know about using the listings and color packages in LaTeX documents.

http://orgmode.org/worg/org-faq.php#fontified_source_code_w_latex

Best -- Eric

>
> - Carsten
>
> On Aug 8, 2009, at 8:59 PM, Eric Schulte wrote:
>
>> Hi,
>>
>> The attached patch allows for fontified source code blocks on export
>> to
>> LaTeX.  It does this using the 'listings' latex package.  A new
>> variable
>> is introduced; `org-export-latex-listings' which should be set to
>> non-nil for source-code to be exported as listings blocks.  This
>> variable defaults to nil in which case the current practice of
>> exporting
>> source code to verbatim latex blocks remains unchanged.
>>
>> To use this functionality add the following to your org-mode config.
>>
>> --8<---cut here---start->8---
>>  ;; tell org to use listings
>>  (setq org-export-latex-listings t)
>>
>>  ;; you must include the listings package
>>  (add-to-list 'org-export-latex-packages-alist '("" "listings"))
>>
>>  ;; if you want colored source code then you need to include the
>> color package
>>  (add-to-list 'org-export-latex-packages-alist '("" "color"))
>> --8<---cut here---end--->8---
>>
>> In addition to the patch, I'm attaching an example org-mode file,
>> along
>> with the generated LaTeX file and PDF file.
>>
>> Do you think this would be appropriate for inclusion into org-mode?
>>
>> Thanks -- Eric
>>
>> diff --git a/lisp/org-exp.el b/lisp/org-exp.el
>> index 00fd6c8..9de5e5f 100644
>> --- a/lisp/org-exp.el
>> +++ b/lisp/org-exp.el
>> @@ -2204,6 +2204,8 @@ in the list) and remove property and value
>> from the list in LISTVAR."
>> (defvar htmlp)  ;; dynamically scoped
>> (defvar latexp)  ;; dynamically scoped
>> (defvar org-export-latex-verbatim-wrap) ;; defined in org-latex.el
>> +(defvar org-export-latex-listings) ;; defined in org-latex.el
>> +(defvar org-export-latex-listings-langs) ;; defined in org-latex.el
>>
>> (defun org-export-format-source-code-or-example
>>   (backend lang code &optional opts indent)
>> @@ -2310,8 +2312,20 @@ INDENT was the original indentation of the
>> block."
>>   ((eq backend 'latex)
>>(setq rtn (org-export-number-lines rtn 'latex 0 0 num
>> cont rpllbl fmt))
>>(concat "\n#+BEGIN_LaTeX\n"
>> -  (org-add-props (concat (car 
>> org-export-latex-verbatim-wrap)
>> - rtn (cdr 
>> org-export-latex-verbatim-wrap))
>> +  (org-add-props
>> +  (if org-export-latex-listings
>> +  (concat
>> +   (if lang
>> +   (let* ((lang-sym (intern (concat
>> ":" lang)))
>> +  (lstlang (or (plist-get
>> org-export-latex-listings-langs
>> +
>> lang-sym)
>> +   lang)))
>> + (format "\\lstset{language=%s}
>> \n" lstlang))
>> + "")
>> +   "\\begin{lstlisting}\n"
>> +   rtn "\\end{lstlisting}\n")
>> +(concat (car org-export-latex-verbatim-
>> wrap)
>> +rtn (cdr org-export-latex-
>> verbatim-wrap)))
>>'(org-protected t))
>>"#+END_LaTeX\n\n"))
>>   ((eq backend 'ascii)
>> diff --git a/lisp/org-latex.el b/lisp/org-latex.el
>> index fdf9ae2..f80e221 100644
>> --- a/lisp/org-latex.el
>> +++ b/lisp/org-latex.el
>> @@ -69,6 +69,9 @@
>>org-deadline-string "\\|"
>>org-closed-string"\\)")
>>   "Regexp matching special time planning keywords plus the time
>> after it.")
>> +(defvar org-export-latex-listings nil
>> +  "If non-nil then source code blocks will be fontified using the
>> +listings package.")
>>
>> (defvar latexp); dynamically scoped from org.el
>> (defvar re-quote)  ; dynamically scoped from org.el
>> @@ -297,6 +300,12 @@ Defaults to \\begin{verbatim} and \
>> \end{verbatim}."
>>   :type '(cons (string :tag "Open")
>> (string :tag "Close")))
>>
>> +(defcustom org-export-latex-listings-langs
>> +  '(:emacs-lisp "lisp")
>> +  "Property list mapping languages to their listing language
>> counterpart."
>> +  :group 'org-export-latex
>> +  :type 'plist)
>> +
>> (defcustom org-export-latex-remove-from-headlines
>>   '(:todo nil :priority nil :tags nil)
>>   "A plist of keywords to remove from headlines. OBSOLETE.
>> <
>> listngs
>> .org
>> >
>> <
>> listngs
>> .tex>__

Re: [Orgmode] 6.29c export latex bug?

2009-08-11 Thread Nick Dokos
Carsten Dominik  wrote:

> Hi zwz, thanks for the report.
> Hi Nick, thanks for nailing it.
> 
> This bug is fixed now.
> 

Indeed - my test succeeded.

> Nick, if you are interested, please see the commit log entry for an
> explanation why this bug was happening.
> 

I feel like a ping-pong ball :-), smacked from one place in the code
to another and back again. Thanks for the explanation!

Nick


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Org suggestion: option which allows moving subtrees freely

2009-08-11 Thread Leo
On 2009-08-11 10:24 +0100, PT wrote:
> Often I want to move an item or a subtree to an other location
> with M-up/down and I get the message "Cannot move past superior
> level".
>
> I think there could be an option allowing this behavior. In
> practice I found sometimes it would be quicker and easier to move
> stuff under a different heading in the same file by simply using
> Meta+cursor keys than using the refill interface.

I agree with Carsten and Tassilo. I don't see this as an improvement.
C-k and C-y is easy enough to move substrees and it can move them
anywhere.

-- 
Emacs uptime: 21 hours, 53 minutes, 48 seconds



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Org suggestion: option which allows moving subtrees freely

2009-08-11 Thread Tassilo Horn
PT  writes:

Hi!

>> So it would spare at least an M-left for the user which doesn't seem
>> much, but small things add up in the long run.
>> 
>
> Maybe the M-right part wouldn't be too hard either. If above the moved
> up header (which is now at the same level as its previous parent
> header after an automatic M-left) there is an other header on the same
> level then it could be put under it with an automatic M-right.
>
> It could spare 2 keypresses which would be a real improvement.

I can't see that this would be a big improvement.  If you want to move
the subtree that far away that the number of keystrokes invoced makes a
difference, then probably you should have used refiling in the first
run.

At least I'm one of those that would accidentially destroy the document
structure with such an automatic reparenting. ;-)

Well, as optional feature I don't have an opinion.  But I think you
could add an around advice to `org-metaup' to get that behavior.  Simply
ad-do-it and catch a possible error.  If there was none, you are ok.  If
there was one, you have to call `org-metaleft' followed by `org-metaup'
again.

Bye,
Tassilo



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Org suggestion: option which allows moving subtrees freely

2009-08-11 Thread PT
PT  gmail.com> writes:
> 
> So it would spare at least an M-left for the user which doesn't seem much, 
> but 
> small things add up in the long run.
> 

Maybe the M-right part wouldn't be too hard either. If above the
moved up header (which is now at the same level as its previous
parent header after an automatic M-left) there is an other header
on the same level then it could be put under it with an automatic
M-right.

It could spare 2 keypresses which would be a real improvement.



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Org suggestion: option which allows moving subtrees freely

2009-08-11 Thread PT
Carsten Dominik  gmail.com> writes:

> 
> I do M-left M-up M-right to get past a parent.  When moving down,
> M-left M-down M-right will get you to the end of that subtree, but
> otherwise it works just fine.

It seems like something which org could also do if the user sets the option.

If I move the tree up with M-up and it sees I'm at the parent heading then it 
could set the header level to the same as the parent's, move the item above the 
parent and leave it there, letting me do the rest of the positioning manually.

So it would spare at least an M-left for the user which doesn't seem much, but 
small things add up in the long run.




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Org suggestion: option which allows moving subtrees freely

2009-08-11 Thread Giovanni Lanzani
> +1
>
> I always supposed there was some Good Reason (tm) for prohibiting
> this, which I hadn't yet understood, so I never asked for it before.
> But since PT asked, I'll join in.
>
> Scot
>
>
> On Tue, Aug 11, 2009 at 10:24 AM, PT wrote:
>> Often I want to move an item or a subtree to an other location
>> with M-up/down and I get the message "Cannot move past superior
>> level".
>>
>> I think there could be an option allowing this behavior. In
>> practice I found sometimes it would be quicker and easier to move
>> stuff under a different heading in the same file by simply using
>> Meta+cursor keys than using the refill interface.
>>



+2

Now what I have to do in order to get it is to to M-right and then M-up,
and M-left to accomplish the same results.

Giovanni



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Org suggestion: option which allows moving subtrees freely

2009-08-11 Thread Eric S Fraga
At Tue, 11 Aug 2009 10:36:16 +0100,
Scot Becker wrote:
> 
> +1
> 
> I always supposed there was some Good Reason (tm) for prohibiting
> this, which I hadn't yet understood, so I never asked for it before.
> But since PT asked, I'll join in.

+1

ditto.  I often find myself doing an arbitrary sequence of M-up,
M-left, M-up, M-right, M-up, with one or more instances of each of
these actions as required, all to move past a higher level heading
/barrier/.

but I can't say I'm all that bothered, especially if there is a Good
Reason why this is not possible!

eric


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Org suggestion: option which allows moving subtrees freely

2009-08-11 Thread Carsten Dominik

The good reason is this:


* heading
** A child
*** a grand child

if you try to move the grand child up, the integrity of the
tree is broken because then you have

* heading
*** a grand child
** A child

Even worse if you move a child beyond the first top-level heading.

I do M-left M-up M-right to get past a parent.  When moving down,
M-left M-down M-right will get you to the end of that subtree, but
otherwise it works just fine.

- Carsten

On Aug 11, 2009, at 11:36 AM, Scot Becker wrote:


+1

I always supposed there was some Good Reason (tm) for prohibiting
this, which I hadn't yet understood, so I never asked for it before.
But since PT asked, I'll join in.

Scot


On Tue, Aug 11, 2009 at 10:24 AM, PT  
wrote:

Often I want to move an item or a subtree to an other location
with M-up/down and I get the message "Cannot move past superior
level".

I think there could be an option allowing this behavior. In
practice I found sometimes it would be quicker and easier to move
stuff under a different heading in the same file by simply using
Meta+cursor keys than using the refill interface.



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Literate Programming with Org mode

2009-08-11 Thread Sébastien Vauban
Hi Eric,

"Eric Schulte" wrote:
> Sébastien Vauban  writes:
>> "Eric Schulte" wrote:
>>> "Eric Schulte"  writes:
>
> Thanks for giving this a try, comments below...

You're welcome. I'm more than interested into this. And I play the easy role.
Just testing... and commenting ;-)

Sorry for answering late, though.


>> [...] the code should be included via the LaTeX `listings' package (thus,
>> colored contextually to the programming language) and not as verbatim.
>
> I agree fontified code would certainly be preferable to the current approach
> of inserting source-code as verbatim. This seems to be a general org-mode
> development issue rather than org-babel specific, so I'm happy to push the
> buck on this one :). I don't know much about the listings package, but would
> another possibly be easier to use htmlize.el (used for fontification on html
> export) along with html -> latex conversion?

I've tried the following new settings on a freshly pulled Org-mode (this
morning):

--8<---cut here---start->8---
;; tell org to use listings
(setq org-export-latex-listings t)

;; you must include the listings package
(add-to-list 'org-export-latex-packages-alist '("" "listings"))

;; if you want colored source code, then you need to include the
;; (x)color package
(add-to-list 'org-export-latex-packages-alist '("" "xcolor")))
--8<---cut here---end--->8---

though, with no luck, right now.


> Please do another git pull before trying the steps below so we can be sure
> we're working off the same code base.

Done one hour ago.


>>> Calling `org-babel-tangle' from within this file will create the
>>> Payment.sql, Lessons.sql, and Enterprise.sql source-code files.
>>
>> Nope...
>>
>> Open ~/Personal/Templates/org-babel-lit-prog.org
>> tangled 0 source-code blocks
>
> I have changed the original org-babel-lit-prog.org so that it should work
> with your configuration of odd levels only and posted it up here [1].
>
>   Note that you can grab all of these referenced files by cloning the git
>   repo at git://github.com/eschulte/noweb-example.git.

Using your repo.


> By calling org-babel-tangle from within this org-mode file I was able to
> generate Enterprise.sql [2], Lessons.sql [3], and Payment.sql [4].

I still couldn't. Void variable: file.

Now (I've done some changes, explained below), I can...

--8<---cut here---start->8---
Stored: Header
Stored: Condition to be satisfied
Stored: File Enterprise
Stored: File Lessons
Stored: File Payment
Added to 
/home/sva/Downloads/emacs/site-lisp/noweb-example/w-babel/Enterprise.sql
Added to /home/sva/Downloads/emacs/site-lisp/noweb-example/w-babel/Lessons.sql
Added to /home/sva/Downloads/emacs/site-lisp/noweb-example/w-babel/Payment.sql
tangled 3 source-code blocks
--8<---cut here---end--->8---

Great!

Though, this is not entirely what I expected. Let's take the Enterprise.sql
file:

--8<---cut here---start->8---
-- generated by org-babel-tangle

-- 
[[file:~/Downloads/emacs/site-lisp/noweb-example/w-babel/org-babel-lit-prog.org::*File%20Enterprise][block-3]]
-- <>
SELECT abcID, etpID, etpAssurATPolNum
FROM enterprise JOIN record
ON (etpAbcID_fk = abcID)
WHERE etpAbcID_fk
-- <>
-- block-3 ends here
--8<---cut here---end--->8---

I'm expecting the sql-init and sql-cond blocks to be replaced by their defined
equivalent. So, in this case, I should have the following file:

--8<---cut here---start->8---
-- generated by org-babel-tangle

-- 
[[file:~/Downloads/emacs/site-lisp/noweb-example/w-babel/org-babel-lit-prog.org::*File%20Enterprise][block-3]]
-- Hey, Emacs! This is a -*- coding: utf-8 -*- file!

-- no longer display the count message
SET NOCOUNT ON

DECLARE @dateFmtStyleIn int; SET @dateFmtStyleIn = 120 -- ODBC canonical
DECLARE @dateFmtStyleOut int; SET @dateFmtStyleOut = 103 -- French dd/mm/

DECLARE @firstDayOfThisMonth smalldatetime
SET @firstDayOfThisMonth = CONVERT(smalldatetime,
   CAST(YEAR(GETDATE()) AS char(4)) + '-'
   + CAST(MONTH(GETDATE()) AS char(2)) + '-'
   + '01' + ' 00:00:00',
   @dateFmtStyleIn)

SELECT abcID, etpID, etpAssurATPolNum
FROM enterprise JOIN record
ON (etpAbcID_fk = abcID)
WHERE etpAbcID_fk

  IN (SELECT actAbcID_fk
  FROM status
  WHERE (staID = 338 AND staEtat = 3))
  AND abcSignDate < @firstDayOfThisMonth
  ORDER BY abcID
-- block-3 ends here
--8<---cut here---end--->8---

Do we agree on this?


>> Is it normal that you don't include the extension in the tangle property?
>> Does it add the language extension automatically?
>
> Yes, org-babel adds the language specific extension automatically.  

Re: [Orgmode] Org suggestion: option which allows moving subtrees freely

2009-08-11 Thread Scot Becker
+1

I always supposed there was some Good Reason (tm) for prohibiting
this, which I hadn't yet understood, so I never asked for it before.
But since PT asked, I'll join in.

Scot


On Tue, Aug 11, 2009 at 10:24 AM, PT wrote:
> Often I want to move an item or a subtree to an other location
> with M-up/down and I get the message "Cannot move past superior
> level".
>
> I think there could be an option allowing this behavior. In
> practice I found sometimes it would be quicker and easier to move
> stuff under a different heading in the same file by simply using
> Meta+cursor keys than using the refill interface.
>
>
>
> ___
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-mode can not precess some LATEX environment

2009-08-11 Thread Scot Becker
>
> `To avoid conflicts with currency specifications, single ‘$’ characters are
> only recognized as math delimiters if the enclosed text contains at most two
> line breaks, is directly attached to the ‘$’ characters with no whitespace
> in between, and if the closing ‘$’ is followed by whitespace, punctuation or
> a dash. '
>

This lists a series of conditions for recognizing $ as a math
delimiter, instead of as a dollar sign.

Basically, if you want it recognized as a math delimiter:
1.  don't make the text you enclose have more than two linebreaks
2.  don't put whitespace between your math and the $
3.  don't follow your $ with anything but whitespace or punctuation.


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-mode can not precess some LATEX environment

2009-08-11 Thread waterloo
Excuse me .
I put the following latex code in an org file , and put point in it ,C-c
C-x  C-l.  It don't produce the correct image. There is only an square
appearing . The latex environment is include in amsmath package, which is
include in Org Format Latex Header defautly.


\begin{matrix}
1&d\\
d&d\\
\end{matrix}


Another question, I cannot understand the sentence.
`To avoid conflicts with currency specifications, single ‘$’ characters are
only recognized as math delimiters if the enclosed text contains at most two
line breaks, is directly attached to the ‘$’ characters with no whitespace
in between, and if the closing ‘$’ is followed by whitespace, punctuation or
a dash. '

Thanks

2009/8/11 Carsten Dominik 

> So then, what do you mean by
>
>  "org-mode can not precess some LATEX environment"
>
> Please, if you want us to spend the time giving you the
> answer, put in the time to explain yourself clearly, if
> possible already in the initial post and not after two
> mails back and forth.  This will allow the experts in the
> group to spend their time efficiently, and it will also
> create better records in the mailing list archives.
>
> - Carsten
>
>
> On Aug 11, 2009, at 10:48 AM, waterloo wrote:
>
>  It is `amsmath' , not `amslatex' .
>> Org include amsmath defaultly .
>>
>>
>> 2009/8/11 Carsten Dominik 
>>
>> On Aug 11, 2009, at 10:37 AM, waterloo wrote:
>>
>> org-mode can not precess some LATEX environment .
>> Such as :
>> \begin{matrix}
>> \end{matrix}
>>
>> which is in amslatex.
>>
>> Org-mode will handle these environments, but you must require the package
>> in the header:
>>
>>
>> #+LaTeX_HEADER: \usepackage{amslatex}
>>
>> Or add to org-export-latex-package-alist
>>
>> - Carsten
>>
>>
>>
>
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Org suggestion: option which allows moving subtrees freely

2009-08-11 Thread PT
Often I want to move an item or a subtree to an other location
with M-up/down and I get the message "Cannot move past superior
level".

I think there could be an option allowing this behavior. In
practice I found sometimes it would be quicker and easier to move
stuff under a different heading in the same file by simply using
Meta+cursor keys than using the refill interface.



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] MACRO calls with linebreaks?

2009-08-11 Thread Carsten Dominik

Hi Stefan,

could you please make a complete example, with the complete macro
definition and calls, i.e. no ...?  This would give me something
to test without having to guess what might be happening.

Thanks.

- Carsten


On Aug 11, 2009, at 12:58 AM, Stefan Vollmar wrote:


Dear Carsten,

On 10.08.2009, at 10:09, Carsten Dominik wrote:


this should now work.

But note that the opening parenthesis must be attached to the macro  
name and the closing parenthesis must be attached to the "}}}",  
just as you have done in your proposal.


I have not tested this, please verify.


thank you!

Almost perfect: there seems to be some confusion as to when MACRO  
arguments are passed verbatim and when interpreted in org-fashion.  
Ideally, there should be a way to make sure that one gets verbatim  
text, possibly without leading white space.


(1)

{{{person(minerva_logo.png,
...)}}}

and

{{{person(
minerva_logo.png,
...)}}}

differ. The first version passes "minerva_log.png" as the first  
argument to the MACRO, the second version turns it into  
"minervalogo.png".


(2)

{{{person(minerva_logo.png, somebody.jpg,
line1  line2  line3 ,
someb...@nf.mpg.de
)}}}

works fine, however,

{{{person(minerva_logo.png, somebody.jpg,
line1 
line2 
line3 ,
someb...@nf.mpg.de
)}}}

creates "line1" folled by a line break (as expected) but all  
following HTML code rendered as text:

line1  line2 
line3
< [...] (3) {{{person(minerva_logo.png, somebody.jpg, line1 line2 @ line3 @, someb...@nf.mpg.de )}}} this works (observe the inconsistency between line1 and the other lines: no "@" here) up to and including line 3, the rest is HTML markup rendered as text just as in (2). Warm regards, Stefan - Carsten On Aug 9, 2009, at 2:40 AM, Stefan Vollmar wrote: Hello, I find org-mode's MACRO feature very useful for exporting to HTML as it allows you to generate literally any HTML construct that you need, here is a simple example: http://www.nf.mpg.de/kinderuni/kinderuni_en.html (see the "Colophon" section; thanks again to everybody from the list who helped!). For another project, we need to generate a table with many (multi- line) rows like this: | logo.png | somebody.jpg | name \\ telephone \\ email... | The images have different sizes (so some alignment is needed) and the text in the last column should have several lines (which should be next to the person's portrait). This can (currently) not been done with standard org tables (I am not complaining). With something like this: #+macro: person #+HTML: [...]table> {{{person(logo.png, somebody.jpg, someb...@nf.mpg.de, name>telephoneroomgroup[...])}}} the problem can be solved and yet again org-mode's flexibility is demonstrated. The MACRO can be hidden in a setup-file. However, the MACRO call can not and it looks like a kludge and is awkward to read. MACRO calls work well with few and short arguments - different from this case. The problem is that org-mode seems to require the brackets in one line for MACROs to work. Assuming this restriction was not there, one could write in a much more readable fashion: {{{person( logo.png, somebody.jpg, someb...@nf.mpg.de, name telephone room group [...] )}}} and (just a thought) might expect white space in front of an argument to be ignored and linebreaks in arguments conserved. Maybe there is a better way to pass longer arguments to MACROs? Any help is appreciated. Warm regards, Stefan -- Dr. Stefan Vollmar, Dipl.-Phys. Max-Planck-Institut für neurologische Forschung Gleuelerstr. 50, 50931 Köln, Germany Tel.: +49-221-4726-213 FAX +49-221-4726-298 Tel.: +49-221-478-5713 Mobile: 0160-93874279 Email: voll...@nf.mpg.de http://www.nf.mpg.de ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Re: [Orgmode] org-mode can not precess some LATEX environment

2009-08-11 Thread Carsten Dominik

So then, what do you mean by

  "org-mode can not precess some LATEX environment"

Please, if you want us to spend the time giving you the
answer, put in the time to explain yourself clearly, if
possible already in the initial post and not after two
mails back and forth.  This will allow the experts in the
group to spend their time efficiently, and it will also
create better records in the mailing list archives.

- Carsten

On Aug 11, 2009, at 10:48 AM, waterloo wrote:


It is `amsmath' , not `amslatex' .
Org include amsmath defaultly .


2009/8/11 Carsten Dominik 

On Aug 11, 2009, at 10:37 AM, waterloo wrote:

org-mode can not precess some LATEX environment .
Such as :
\begin{matrix}
\end{matrix}

which is in amslatex.

Org-mode will handle these environments, but you must require the  
package in the header:



#+LaTeX_HEADER: \usepackage{amslatex}

Or add to org-export-latex-package-alist

- Carsten






___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-mode can not precess some LATEX environment

2009-08-11 Thread waterloo
It is `amsmath' , not `amslatex' .
Org include amsmath defaultly .


2009/8/11 Carsten Dominik 

>
> On Aug 11, 2009, at 10:37 AM, waterloo wrote:
>
>  org-mode can not precess some LATEX environment .
>> Such as :
>> \begin{matrix}
>> \end{matrix}
>>
>> which is in amslatex.
>>
>
> Org-mode will handle these environments, but you must require the package
> in the header:
>
>
> #+LaTeX_HEADER: \usepackage{amslatex}
>
> Or add to org-export-latex-package-alist
>
> - Carsten
>
>
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-mode can not precess some LATEX environment

2009-08-11 Thread Carsten Dominik


On Aug 11, 2009, at 10:37 AM, waterloo wrote:


org-mode can not precess some LATEX environment .
Such as :
\begin{matrix}
\end{matrix}

which is in amslatex.


Org-mode will handle these environments, but you must require the  
package in the header:



#+LaTeX_HEADER: \usepackage{amslatex}

Or add to org-export-latex-package-alist

- Carsten



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] org-mode can not precess some LATEX environment

2009-08-11 Thread waterloo
org-mode can not precess some LATEX environment .
Such as :
\begin{matrix}
\end{matrix}

which is in amslatex.

How to do with it ?

Thanks
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] 6.29c export latex bug?

2009-08-11 Thread Carsten Dominik



On Aug 11, 2009, at 5:26 AM, Nick Dokos wrote:


Nick Dokos  wrote:



31ceed47ffd3070418dd34316fef8869d2434c26 is first bad commit
commit 31ceed47ffd3070418dd34316fef8869d2434c26
Author: Carsten Dominik 
Date:   Tue Jun 30 07:24:57 2009 +0200

   New minor mode org-indent-mode

   This mode implements outline indentation similar to clean view,  
but in

   a dynamic and virtual way, at display time.



I looked over the commit and saw this change to org-table.el:

   ...
   (if (equal (char-before) ?\n)
   ;; This hack is for org-indent, to force redisplay of the
   ;; line prefix of the first line. Apparently the redisplay
   ;; is tied to the newline, which is, I think, a bug.
   ;; To force this redisplay, we remove and re-insert the
   ;; newline, so that the redisplay engine thinks it belongs
   ;; to the changed text.
   (progn
 (backward-delete-char 1)
 (insert "\n")))
   ...

I commented it out and the export of the table worked - but I have no
idea why.


Hi zwz, thanks for the report.
Hi Nick, thanks for nailing it.

This bug is fixed now.

Nick, if you are interested, please see the commit log entry for an
explanation why this bug was happening.

- Carsten




Nick




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode