Re: [Orgmode] Re: Positioning Latex diagram on PDF output

2009-08-09 Thread Graham Smith
Leo,

Thanks again, it seems the answer lies in Latex, rather than OrgMode,
so I will work  away at that.

having said that, the commands you gave me are extremely useful for
making a stand alone diagram to insert as a graphic into some other
document. So well worth knowing.

Graham

2009/8/8 Leo sdl@gmail.com:
 On 2009-08-08 22:14 +0100, Graham Smith wrote:
 Based on this I have altered the headers in orgmode to

 #+LATEX_HEADER: \usepackage{tikz}
 #+LATEX_HEADER: \usetikzlibrary{mindmap,trees}
 #+LATEX_HEADER: \usepackage[active,tightpage]{preview}
 #+LATEX_HEADER: \PreviewEnvironment{tikzpicture}
 #+LATEX_HEADER: \setlength\PreviewBorder{20pt}

 This has certainly solved the mindmap position problem, but now the
 resultant pdf loses all the text from the original orgmode file. :-(

 I assume I don't need to add the document class line?

 In that case, you can use geometry package or scale your tikz picture so
 that it fits into the textwidth.

 --
 Emacs uptime: 1 day, 5 hours, 57 minutes, 35 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



___
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 LaTeX export (Org Format Latex Header)

2009-08-09 Thread Charles Howard
Hi. I'm still failing to understand how to customize latex export.

I've set up a new clean install of Debian 5.02 with emacs 22.2 and
org-mode 6.27a
(the version for testing). Org-mode was installed using synaptic.

With no header lines in the .org file the latex preamble is

% Created 2009-08-07 Fri 21:53
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{hyperref}

This already seems strange because when I go to org-customize in emacs
what I see
in Org Format Latex Header, in lisp is

\\documentclass{article}\n\\usepackage{fullpage}         % do not
remove\n\\usepackage{amssymb}\n\\usepackage[usenames]{color}\n\\usepackage{amsmath}\n\\usepackage{latexsym}\n\\usepackage[mathscr]{eucal}\n\\pagestyle{empty}
            % do not remove

which doesn't correspond to the actual preamble. Anyway I added some
lines to change a
couple of features, as follows:

\\documentclass{article}\n\\usepackage{fullpage}         % do not
remove\n\\usepackage{amssymb}\n\\usepackage[usenames]{color}\n\\usepackage{amsmath}\n\\usepackage{latexsym}\n\\usepackage[mathscr]{eucal}\n\\pagestyle{empty}
            % do not
remove\n\\setlength{\\parindent}{0mm}\n\\setlength{\\parskip}{2mm}\n\\setlength{\\textwidth}{15cm}\n\\setlength{\\textheight}{23cm}

and this had no effect on the exported tex file. (I do set and save.)

I don't want to write a new class file for LaTeX. I just want to be
able to add a couple
of dozen setlength and (re)newcommand lines (as well as usepackage
lines) to every LaTeX
export. I did experiment briefly with using per-file export settings,
but this didn't
work for me either.

I expect I'm missing something obvious. Pointer would be much appreciated.

Chas


___
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] Cannot install 6.29c on Ubuntu 8.04 with emacs 22.1.1

2009-08-09 Thread Charles Howard
I am trying to install 6.29c onto Ubuntu 8.04 with emacs 22.1.1 and
not getting past go. I have had 6.06 running successfully on the same
system with the same emacs for a year and cannot understand why 6.29c
is not succeeding. I am installing in a home directory ~/org-6.29c/
I have tried both as an ordinary user and with sudo; the extracts below
refer to ordinary user.

Below is:

1. Extract of the warning messages that scroll past after the `make'
command. (Several hundred lines) `khave' is my user name.

2. Extract from .emacs file

3. Extract from Makefile

On starting up an .org file, emacs does not load the Org menu or recognize
the sectioning structure, etc.

It seems that no files have gone into the target dirs
($(prefix)/share/emacs/site-lisp
and $(prefix)/share/info).

I'm a moderately sophisticated user of (La)TeX (20 years) and emacs (12 years)
but don't have much experience with make and make install. I'll be
very grateful
for advice.

==
1.

 make
emacs -batch -q -no-site-file -eval (progn (add-to-list (quote
load-path) \/usr/local/share/emacs/site-lisp\) (add-to-list (quote
load-path) (expand-file-name \./lisp/\))) -f batch-byte-compile
lisp/org.el

In end of data:
org.el:16880:1:Warning: the following functions might not be defined at
runtime: calendar-forward-day, parse-time-string, calendar-goto-date,
calendar-goto-today
org.el:16880:1:Warning: the following functions are not known to be defined:
table--at-cell-p, org-clock-update-mode-line, org-default-export-plist,
org-infile-export-plist, org-clock-save-markers-for-cut-and-paste,
org-agenda-save-markers-for-cut-and-paste, dired-get-filename,
org-id-store-link, org-agenda-copy-local-variable, org-gnus-follow-link,
org-inlinetask-remove-END-maybe, org-get-current-options, org-agenda-skip,
org-format-agenda-item, org-agenda-new-marker,
org-agenda-change-all-lines, org-columns-number-to-string,
org-columns-get-format-and-top-level, org-columns-compute,
calendar-absolute-from-iso, calendar-iso-from-absolute,
org-id-locations-save, org-id-locations-load, iswitchb-read-buffer,
cdlatex-tab, beginning-of-visual-line, org-agenda-set-restriction-lock,
speedbar-line-directory, org-agenda-maybe-redo
Wrote /home/khave/org-6.29c/lisp/org.elc
emacs -batch -q -no-site-file -eval (progn (add-to-list (quote
load-path) \/usr/local/share/emacs/site-lisp\) (add-to-list (quote
load-path) (expand-file-name \./lisp/\))) -f batch-byte-compile
lisp/org-agenda.el

In org-finalize-agenda:
org-agenda.el:2415:26:Warning: reference to free variable
`org-agenda-overriding-columns-format'

In end of data:
org-agenda.el:6512:1:Warning: the following functions might not be defined at
runtime: calendar-goto-date, calendar-iso-date-string,
calendar-julian-date-string, calendar-astro-date-string,
calendar-hebrew-date-string, calendar-islamic-date-string,
calendar-french-date-string, calendar-bahai-date-string,
calendar-mayan-date-string, calendar-coptic-date-string,
calendar-ethiopic-date-string, calendar-persian-date-string,
calendar-chinese-date-string
org-agenda.el:6512:1:Warning: the following functions are not known to be
defined: org-columns-quit, calendar-iso-from-absolute,
calendar-absolute-from-iso
Wrote /home/khave/org-6.29c/lisp/org-agenda.elc
emacs -batch -q -no-site-file -eval (progn (add-to-list (quote
load-path) \/usr/local/share/emacs/site-lisp\) (add-to-list (quote
load-path) (expand-file-name \./lisp/\))) -f batch-byte-compile
lisp/org-ascii.el
Wrote /home/khave/org-6.29c/lisp/org-ascii.elc
emacs -batch -q -no-site-file -eval (progn (add-to-list (quote
load-path) \/usr/local/share/emacs/site-lisp\) (add-to-list (quote
load-path) (expand-file-name \./lisp/\))) -f batch-byte-compile
lisp/org-attach.el
Wrote /home/khave/org-6.29c/lisp/org-attach.elc
emacs -batch -q -no-site-file -eval (progn (add-to-list (quote
load-path) \/usr/local/share/emacs/site-lisp\) (add-to-list (quote
load-path) (expand-file-name \./lisp/\))) -f batch-byte-compile
lisp/org-archive.el

In end of data:
org-archive.el:436:1:Warning: the function `org-inlinetask-remove-END-maybe'
is not known to be defined.
Wrote /home/khave/org-6.29c/lisp/org-archive.elc
emacs -batch -q -no-site-file -eval (progn (add-to-list (quote
load-path) \/usr/local/share/emacs/site-lisp\) (add-to-list (quote
load-path) (expand-file-name \./lisp/\))) -f batch-byte-compile
lisp/org-bbdb.el

In end of data:
org-bbdb.el:388:1:Warning: the following functions are not known to be
defined: bbdb-record-name, bbdb-current-record, bbdb-record-getprop,
bbdb-name, bbdb-company, bbdb, bbdb-split, bbdb-string-trim, bbdb-records,
calendar-leap-year-p, diary-ordinal-suffix, bbdb-completing-read-record
Wrote /home/khave/org-6.29c/lisp/org-bbdb.elc
emacs -batch -q -no-site-file -eval (progn (add-to-list (quote
load-path) \/usr/local/share/emacs/site-lisp\) (add-to-list (quote
load-path) (expand-file-name 

[Orgmode] Re: Positioning Latex diagram on PDF output

2009-08-09 Thread Leo
On 2009-08-09 08:33 +0100, Graham Smith wrote:
 Leo,

 Thanks again, it seems the answer lies in Latex, rather than OrgMode,
 so I will work  away at that.

 having said that, the commands you gave me are extremely useful for
 making a stand alone diagram to insert as a graphic into some other
 document. So well worth knowing.

You're welcome, Graham.

Leo

-- 
Emacs uptime: 1 day, 17 hours, 41 minutes, 13 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


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

2009-08-09 Thread Carsten Dominik

Hi Eric,

I would like to include your patch, this was on my todo list for a  
long time, thanks for doing it!


- 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 
.texlistngs.pdf___

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] [PATCH] Remove some blank leading blank lines from ASCII export.

2009-08-09 Thread Andrew Stribblehill
With the following org file:
--
Foo

In which foos are described.
#+OPTIONS: num:nil author:nil creator:nil timestamp:nil d:nil toc:nil skip:t
#+TITLE:
* The construction of a foo
** Armaments
--
I found exporting to ASCII gave five leading blank lines. The
following patch reduces that to one. (I'd love some help in tracking
down that final one.)

---
 lisp/ChangeLog|5 +
 lisp/org-ascii.el |   11 +++
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index dd00a9a..2c477d7 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2009-08-09  Andrew Stribblehill  a...@wompom.org
+
+   * org-ascii.el (org-export-as-ascii): Remove some leading blank
+   lines from output when skipping preamble.
+
 2009-08-08  Bastien Guerry  b...@altern.org

* org.el (org-iswitchb): Fix bug when aborting the `org-iswitchb'
diff --git a/lisp/org-ascii.el b/lisp/org-ascii.el
index ede4ccc..846be8a 100644
--- a/lisp/org-ascii.el
+++ b/lisp/org-ascii.el
@@ -266,11 +266,13 @@ publishing directory.

 ;; File header
 (unless body-only
-  (if title (org-insert-centered title ?=))
-  (insert \n)
+  (when (and title (not (string=  title)))
+   (org-insert-centered title ?=)
+   (insert \n))
+
   (if (and (or author email)
   org-export-author-info)
- (insert (concat (nth 1 lang-words) :  (or author )
+ (insert(concat (nth 1 lang-words) :  (or author )
  (if email (concat   email ) )
  \n)))

@@ -283,7 +285,8 @@ publishing directory.
   (if (and date org-export-time-stamp-file)
  (insert (concat (nth 2 lang-words) :  date\n)))

-  (insert \n\n))
+  (unless (= (point) (point-min))
+   (insert \n\n)))

 (if (and org-export-with-toc (not body-only))
(progn
-- 
1.6.3.GIT


___
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] Remove some blank leading blank lines from ASCII export.

2009-08-09 Thread Carsten Dominik

Applied, thanks.

- Carsten

On Aug 9, 2009, at 1:20 PM, Andrew Stribblehill wrote:


With the following org file:
--
Foo

In which foos are described.
#+OPTIONS: num:nil author:nil creator:nil timestamp:nil d:nil  
toc:nil skip:t

#+TITLE:
* The construction of a foo
** Armaments
--
I found exporting to ASCII gave five leading blank lines. The
following patch reduces that to one. (I'd love some help in tracking
down that final one.)

---
lisp/ChangeLog|5 +
lisp/org-ascii.el |   11 +++
2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index dd00a9a..2c477d7 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2009-08-09  Andrew Stribblehill  a...@wompom.org
+
+   * org-ascii.el (org-export-as-ascii): Remove some leading blank
+   lines from output when skipping preamble.
+
2009-08-08  Bastien Guerry  b...@altern.org

* org.el (org-iswitchb): Fix bug when aborting the `org-iswitchb'
diff --git a/lisp/org-ascii.el b/lisp/org-ascii.el
index ede4ccc..846be8a 100644
--- a/lisp/org-ascii.el
+++ b/lisp/org-ascii.el
@@ -266,11 +266,13 @@ publishing directory.

;; File header
(unless body-only
-  (if title (org-insert-centered title ?=))
-  (insert \n)
+  (when (and title (not (string=  title)))
+   (org-insert-centered title ?=)
+   (insert \n))
+
  (if (and (or author email)
   org-export-author-info)
- (insert (concat (nth 1 lang-words) :  (or author )
+ (insert(concat (nth 1 lang-words) :  (or author )
  (if email (concat   email ) )
  \n)))

@@ -283,7 +285,8 @@ publishing directory.
  (if (and date org-export-time-stamp-file)
  (insert (concat (nth 2 lang-words) :  date\n)))

-  (insert \n\n))
+  (unless (= (point) (point-min))
+   (insert \n\n)))

(if (and org-export-with-toc (not body-only))
(progn
--
1.6.3.GIT


___
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-09 Thread Carsten Dominik

I have added the patch, thanks!

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?

- 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 
.texlistngs.pdf___

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-link-mode ...

2009-08-09 Thread Lennart Borgman
On Sun, Aug 9, 2009 at 7:02 AM, Eric Schulteschulte.e...@gmail.com wrote:
 Bastien bastiengue...@googlemail.com writes:

 Hi Lennart,

 (I'm copying the Orgmode mailing list because it helps to get people's
 opinion on such ideas...)

 Lennart Borgman lennart.borg...@gmail.com writes:

 I am missing the minor mode org-link-mode. I just had a look at
 linkd.el again and decided I wanted to ask you to make a minor mode
 out of the link handling in org instead.

 Org already lets you create links from nearly anywhere in Emacs.

 What would such a minor mode do?


 Not sure if this is apropos to this conversation, but I've been thinking
 for some time that it would be useful to have a minor mode which would
 activate org-style links in non-org files.  For example if an org link
 in the comment section of a source-code document could be highlighted
 and activated so that the C-c C-o keybinding can be used to follow said
 link. -- Eric


That is exactly what I am thinking of.

But the key binding could perhaps be rethought. Beside that I would
want som unification of link handling where it is possible. Things to
uniffy are for example:

- Mouse handling
- Keyboard keys
- Opening in windows/frames
- Opening in external apps
- Moving between links
- Coordination with moving between widget and buttons (like tab
stops in common GUIs)
- Link faces
- Link information


___
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] Latex export to documentclass beamer

2009-08-09 Thread RC
Hi,
 Following an earlier suggestion on the list:
http://thread.gmane.org/gmane.emacs.orgmode/15010/focus=15077

I added the following to my .emacs file:

(add-to-list 'org-export-latex-classes
 '(beamer
   \\documentclass[11pt]{beamer}
\\usepackage[utf8]{inputenc}
\\usepackage[T1]{fontenc}

\\usepackage{amsmath,amssymb,graphicx,bm,multirow,colortbl,vector}
\\usepackage{hyperref}
\\usepackage{verbatim}
\\setbeameroption{show notes}
\\usetheme{Goettingen}
\\useoutertheme{infolines}
   (\\begin{frame}\\frametitle{%s}\\begin{itemize}
\\end{itemize}\\end{frame}
\\begin{frame}\\frametitle{%s}\\begin{itemize} 
\\end{itemize}\\end{frame})
   (\\item{%s} . \\item*{%s})))

However, this gives me the error:
Debugger entered--Lisp error: (void-variable org-export-latex-classes)

I am using Emacs 23.1 and org-mode 6.29trans in Windows Vista.

Any suggestions to fix the error are appreciated.
RC



___
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] suggestion: native orgmode XML export (and import?)

2009-08-09 Thread B Smith-Mannschott
On Sat, Aug 8, 2009 at 22:25, Ilya Shlyakhterilya_...@alum.mit.edu wrote:
 In the meantime, it would be useful to describe what kind of XML output
 do you want, because XML does not really describe anything per se.

 I'm looking for XML output that would closely mirror the logical
 structure of the org file, and that would contain all the information
 in the orgfile (since it's easy to ignore the parts you don't need
 during XML processing).  So, something like

 orgfile
   entry
      headlineTasks/headline
      bodyHere are the tasks I need to do/body
      children
          entry
             headlineBuy bread/headline
             todo-statusDONE/todo-status
             tagstagfood/tagtagerrands/tag/tags
             properties
                 propertynameImportance/namevalue1/value/property

 propertynameDeadline/namevaluedateday07/daymonth08/monthyear09/year/date/value/property
             /properties
           /entry
        /children
      /entry
   /orgfile

 The details of the XML schema can of course change.   But it should
 let you process org file data without having to parse any elements of
 the org file (ideally, even dates) -- it would all be parsed by
 orgmode's native parsing code and put into XML elements.

 If there are questions about how to represent specific org elements in
 XML I can try to write a more detailed spec.


Out of curiosity, how would you want to handle textual content? Pass
it through unchanged with org's wiki-like markup in tact, or somehow
xml-ified?:

*foo* -- *foo*
*foo* -- strongfoo/strong

// Ben


___
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] suggestion: native orgmode XML export (and import?)

2009-08-09 Thread Ilya Shlyakhter
 Out of curiosity, how would you want to handle textual content? Pass
 it through unchanged with org's wiki-like markup in tact, or somehow
 xml-ified?:

 *foo* -- *foo*
 *foo* -- strongfoo/strong

Probably the latter, since converting XMLified content to wiki markup
(or any other form) is easy and does not require manual parsing, while
the other direction is harder.
But for a first version, just leaving the markup as text would be fine too.

What would help a lot is, if XML content could be imported as a subtree.
Then you could have python plugins that take a subtree (or an entire orgfile)
converted to XML, process it into updated XML, and then that updated
XML gets imported
back into org and replaces the original subtree.   This would make it
easy for users
to implement something like http://tinyurl.com/nskzs8 , and probably
other custom
functions.

On Sun, Aug 9, 2009 at 3:19 PM, B Smith-Mannschottbsmith.o...@gmail.com wrote:
 On Sat, Aug 8, 2009 at 22:25, Ilya Shlyakhterilya_...@alum.mit.edu wrote:
 In the meantime, it would be useful to describe what kind of XML output
 do you want, because XML does not really describe anything per se.

 I'm looking for XML output that would closely mirror the logical
 structure of the org file, and that would contain all the information
 in the orgfile (since it's easy to ignore the parts you don't need
 during XML processing).  So, something like

 orgfile
   entry
      headlineTasks/headline
      bodyHere are the tasks I need to do/body
      children
          entry
             headlineBuy bread/headline
             todo-statusDONE/todo-status
             tagstagfood/tagtagerrands/tag/tags
             properties
                 propertynameImportance/namevalue1/value/property

 propertynameDeadline/namevaluedateday07/daymonth08/monthyear09/year/date/value/property
             /properties
           /entry
        /children
      /entry
   /orgfile

 The details of the XML schema can of course change.   But it should
 let you process org file data without having to parse any elements of
 the org file (ideally, even dates) -- it would all be parsed by
 orgmode's native parsing code and put into XML elements.

 If there are questions about how to represent specific org elements in
 XML I can try to write a more detailed spec.


 Out of curiosity, how would you want to handle textual content? Pass
 it through unchanged with org's wiki-like markup in tact, or somehow
 xml-ified?:

 *foo* -- *foo*
 *foo* -- strongfoo/strong

 // Ben



___
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] Latex export to documentclass beamer

2009-08-09 Thread Carsten Dominik


On Aug 9, 2009, at 3:05 PM, RC wrote:


Hi,
Following an earlier suggestion on the list:
http://thread.gmane.org/gmane.emacs.orgmode/15010/focus=15077

I added the following to my .emacs file:

(add-to-list 'org-export-latex-classes
'(beamer
   \\documentclass[11pt]{beamer}
   \\usepackage[utf8]{inputenc}
   \\usepackage[T1]{fontenc}
   \ 
\usepackage{amsmath,amssymb,graphicx,bm,multirow,colortbl,vector}

   \\usepackage{hyperref}
   \\usepackage{verbatim}
   \\setbeameroption{show notes}
   \\usetheme{Goettingen}
   \\useoutertheme{infolines}
   (\\begin{frame}\\frametitle{%s}\\begin{itemize}
\\end{itemize}\\end{frame}
		\\begin{frame}\\frametitle{%s}\\begin{itemize} \\end{itemize}\ 
\end{frame})

   (\\item{%s} . \\item*{%s})))


For this line to be working, the variable must have been defined.

Either precede the code with

 (require 'org-latex)

or wrap it into

(eval-after-load org-latex '(add-to-list))

- Carsten



However, this gives me the error:
Debugger entered--Lisp error: (void-variable org-export-latex-classes)

I am using Emacs 23.1 and org-mode 6.29trans in Windows Vista.

Any suggestions to fix the error are appreciated.
RC



___
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: Latex export to documentclass beamer

2009-08-09 Thread RC
Carsten Dominik carsten.dominik at gmail.com writes:

 
 
 On Aug 9, 2009, at 3:05 PM, RC wrote:
 
  Hi,
  Following an earlier suggestion on the list:
  http://thread.gmane.org/gmane.emacs.orgmode/15010/focus=15077
 
  I added the following to my .emacs file:
 
  (add-to-list 'org-export-latex-classes
 ...

 For this line to be working, the variable must have been defined.
 Either precede the code with
   (require 'org-latex)
 or wrap it into
 (eval-after-load org-latex '(add-to-list))
 - Carsten

Thanks! That worked.

I had a a couple more questions about using latex-export.

1. 
* Slide 5
\uncover2-
{appear from slide 2 on\\ }
\uncover3-4
{appears from 3 to slide 4\\ }
\uncover4{appears on slide 4\\ }
\uncover3-{appears from slide 3 on\\ }

gets output as:

\begin{frame}\frametitle{Slide 5}
\label{sec-5}
\uncover2-
\{appear from slide 2 on\\ \}
\uncover3-4
\{appears from 3 to slide 4\\ \}
\uncover4\{appears on slide 4\\ \}
\uncover3-\{appears from slide 3 on\\ \}
\end{frame}

Is there a way to avoid { and } being output as \{ and \} , respectively.

2. Is there a way to add an attribute to latex lists (itemize, enumerate,
description} so that:

* Slide 1
 - x
 - y
 - z

gets output as:
\begin{itemize}[+-]
\item x
\item y
\item z
\end{itemize}

Thanks again for the help, and the invaluable org-mode.

RC



___
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-09 Thread Sebastian Rose
Ahhh - yeees, yes, yes!

I'm looking forward to stop using my old \variable{name} stuff!!!

:)

Thanks a bunch!

  Sebastian


Eric Schulte schulte.e...@gmail.com writes:
 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.


   ;; 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))

 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.



___
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] I can not modify org-format-latex-header in customizer .

2009-08-09 Thread waterloo
I can not modify org-format-latex-header in customizer .

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] If org-mode can be used with auctex ?

2009-08-09 Thread waterloo
If org-mode can be used with auctex ?

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] Cannot install 6.29c on Ubuntu 8.04 with emacs 22.1.1

2009-08-09 Thread Manish
On Mon, Aug 10, 2009 at 3:31 AM, Charles Howard wrote:
[snip: making 6.29c work (26 lines)]
 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
[snip: excerpt from *Message file (40 lines)]


I tested Latex export on the latest git and it works flawlessly; most likely
it's somthing to do with your specific setup.  Again, I don't know the
solution to your problem but I would start with creating a sample .org
file and a minimal .emacs loaded manually after starting Emacs with -Q.  Keep
adding/removing from/to the .emacs till you find the offending setting.  May
be someone more knowledgeable might have a better clue.  Sorry.

-- 
Manish


___
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