Re: [Orgmode] How can I keep spaces while publishing html?

2009-09-20 Thread Water Lin
Water Lin  writes:

> I am using org to publish some context to html now. There are some code
> in my file, so I need to keep the code original even don't lose the
> spaces.
>
> But even I used @ @ at the begin and end of my code, after I
> published the context, the spaces disappeared withou trace!
>
> How can I keep the spaces?
>
> I am using command
> C-u M-x org-export-region-as-html
> to publish my file.

I think the following way is Ok:

 #+BEGIN_SRC emacs-lisp
 (defun org-xor (a b)
"Exclusive or."
(if a (not b) b))
 #+END_SRC

The link is :
--
http://orgmode.org/manual/Literal-examples.html#Literal-examples

-- 
Water Lin's blog: http://blog.waterlin.org
Email: water...@ymail.com
__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



___
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 can I keep spaces while publishing html?

2009-09-20 Thread Water Lin

I am using org to publish some context to html now. There are some code
in my file, so I need to keep the code original even don't lose the
spaces.

But even I used @ @ at the begin and end of my code, after I
published the context, the spaces disappeared withou trace!

How can I keep the spaces?

I am using command
C-u M-x org-export-region-as-html
to publish my file.

-- 
Water Lin's blog: http://blog.waterlin.org
Email: water...@ymail.com
__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



___
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: dir or folder structure into org-file?

2009-09-20 Thread Sebastian Rose
Hi Erwin,


if you don't need links, you could use Eric Schultes org-babel package,
too.

Provided `tree' is installed, this here will put the tree beneath
~/.emacs.d below, and export the results only. The `-d' option tells
`tree' to show directories only.


#+begin_src sh :results output :exports results
  echo "Directory structure:"
  tree -d ~/.emacs.d/
#+end_src


If you now pres `C-c C-c' inside the source block, the result will be
added. Here's what it looks like on my machine (org's contrib directory
only in this case:


#+resname:
#+begin_example
Directory structure:
/home/sebastian/.emacs.d/lisp/ext/org-mode/contrib/
|-- babel
|   `-- lisp
|   `-- langs
|-- lisp
|-- packages
|   `-- org-export-freemind-0.1.0
`-- scripts
#+end_example



Best wishes

Sebastian



Erwin Panen  writes:
> Matt, thanks a lot, this is exactly what I'm looking for :-)
> I've downloaded and enabled it, but up to now I haven't really managed to use
> it...
> I'll have to digg somewhat deeper
>
> Cheers,
>
> Erwin
>
> Matt Lundin wrote:
>> Erwin Panen  writes:
>>
>>> Not sure this is the right place to ask;
>>> I'm looking for a way to import a complete file structure into an
>>> org-mode buffer that will be saved to an org-mode file.
>>>
>>> I assume org or emacs must be able to do this, but I haven't found
>>> anything googling around..
>>>
>>> Thanks for your help!
>>
>> I believe org-fstree is a good option for this:
>>
>> http://burtzlaff.de/org-fstree/
>>
>> 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: Export to LaTeX Beamer. [WAS: Re: [Orgmode] Re: LaTeX export bugs?]

2009-09-20 Thread Thomas S. Dye

On Sep 19, 2009, at 8:03 PM, Alan E. Davis wrote:


Hello:

I was happy to see a simple formula for exporting to Beamer.  The  
following worked initially.  However, this initialization routine  
was able to run only when org-latex had already been loaded.


On Sat, Jul 4, 2009 at 2:52 AM, Nick Dokos   
wrote:


Here's the minimal.emacs - you'll need to adjust the load path for  
your

setup:

,
| (add-to-list 'load-path (expand-file-name "~/src/emacs/org/org- 
mode/lisp"))
| (add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\) 
$" . org-mode))

| (require 'org-install)
| (global-set-key "\C-cl" 'org-store-link)
| (global-set-key "\C-ca" 'org-agenda)
| (global-set-key "\C-cb" 'org-iswitchb)
| (setq org-log-done (quote time))
| (setq org-log-into-drawer t)
|
| (load "org-exp")
| (load "org-latex")
|
| (add-to-list 'org-export-latex-classes
|  '("beamer"
|"\\documentclass[11pt]{beamer}
| \\usepackage[utf8]{inputenc}
| \\usepackage[T1]{fontenc}
| \\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}")
|)
|  )
`


Is it possible to put this inside of a hook (say, when org-latex was  
loaded, or when the document class was beamer during the export  
process)?


Emacs just reports the following when this code is included into the  
init file:


   Symbol's value as variable is void: org-export-latex-classes

After explicitly loading the library "org-latex" the code is  
executed and the procedure works for exporting the example file--- 
given that the latex code must be cleaned up.


I haven't yet tried the following as a heading line:

   #+OPTIONS: toc:nil

Would that solve the problem you reported?

Alan



and here's slides.org:

,
| #+LaTeX_CLASS: beamer
| #+TITLE: Example presentation
| #+AUTHOR: Nick Dokos \\ $<$\href{mailto:nicholas.do...@hp.com}{nicholas.dokos@hp.com 
}$>$

| #+EMAIL: nicholas.do...@hp.com
| #+OPTIONS: toc:nil H:2
|
| * Why
| ** Reason 1.
|Text explaining reason #1.
| ** Reason 2.
|... more explanations.
| ** Reason 3.
|Blah, blah, blah.
|
| ** Reason 4.
|Why not?
|
| * What
| ** First piece.
| ** Second piece.
| ** Third piece.
| ** Fourth piece.
`


Thank you for this helpful advice.

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


Aloha Alan,

Here is a somewhat more elaborate set-up.

In customize org-export-latex-classes (or add to appropriate place  
in .emacs):


\documentclass{beamer}
\mode<{{{beamermode}}}>
{
 \usethemebeamertheme
 \usecolorthemebeamercolortheme
}
\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage{times}
\usepackage[T1]{fontenc}
\institutebeamerinstitute
\subjectbeamersubject

The macros here let me specify things that I like to change on a per- 
file basis.  So, in my org file there is this:


#+MACRO: BEAMERMODE presentation
#+MACRO: BEAMERTHEME Malmoe
#+MACRO: BEAMERCOLORTHEME tsdye
#+MACRO: BEAMERSUBJECT Evolutionary archaeology
#+MACRO: BEAMERINSTITUTE T. S. Dye \& Colleagues \\ B. P. Bishop Museum

I typically use sections and subsections in my talks (and the Malmoe  
theme displays them nicely within beamer).  So, I have this in  
customize org-export-latex-classes:


INS DEL Choice: Value Menu Heading:
numbered: \section{%s}
unnumbered): \section{%s}
INS DEL Choice: Value Menu Heading:
numbered: \subsection{%s}
unnumbered): \subsection{%s}
INS DEL Choice: Value Menu Environment:
Opening (numbered)  : \begin{frame} 
\frametitle{%s}

Closing (numbered)  : \end{frame}
Opening (unnumbered): \begin{frame} 
\frametitle{%s}

Closing (unnumbered): \end{frame}

I have the standard value for org-export-latex-low-levels in customize:
Org Export Latex Low Levels: Hide Value Value Menu Convert as itemized  
list


And then this in my .org file:

#+OPTIONS: H:3
#+OPTIONS: toc:nil

A typical slide show might look like this, in part:

* Introduction
** Evolution
*** Four Components of Evolutionary Processes
 Inheritance = Social learning
 {{{a

Re: [Orgmode] external link to openoffice.org file

2009-09-20 Thread Darlan Cavalcante Moreira
At Sun, 20 Sep 2009 17:28:54 +0200,
Christoph Herzog wrote:
> 
> Having a poor understanding of emacs because I started to use it with 
> org-mode recently, I wonder whether there is a better way to make 
> external links to openoffice.org files than
> [[shell: ooffice -writer /path/to/document.odt]]
> 
> I also wonder whether it is possible to attach other than 
> emacs-compatible files?
> 
> Christoph
> 
> 
> 
> ___
> 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

I often put some links to .odt and .doc files in my org files.
At first i created a link type for open office with

#+LINK: OO elisp:(abrir-no-openoffice "%s")

where the function "abrir-no-openoffice" is defined as

(defun abrir-no-openoffice (documento)
  (start-process-shell-command 
   "openoffice" 
   "*scratch*" 
   (concat "openoffice.org -o " documento)))

With this i can simple use
[[OO:path_to_some_file_openoffice_understands][Description]], but I still have
to answer "yes" to open the file, since org-mode will execute a shell function.

Only later I realized that this is not necessary. I can simple use
[[some_file][Description]] and org-mode will use the information in the mailcap
file to open the file with the correct program, in this case openoffice.

-- 
Darlan Cavalcante Moreira
darc...@gmail.com


___
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 version 6.30e; Error in post-command-hook

2009-09-20 Thread George Pearson
org-submit-bug-report output below.

I have been getting the following message in the minibuffer
area when marking tasks done in the daily agenda:

Error in post-command-hook: (error Cannot switch buffers in a dedicated 
window)

The item in the underlying org file IS marked DONE, and items with
repeaters appear to be rescheduled properly.  HOWEVER, the log lines,
like 

- State "DONE"   from "TODO"   [2009-09-07 Mon 10:36]

do NOT appear.

Note I have been using:

org-agenda-window-setup 'other-frame

for some time now, but I notice there has been a recent change
related to this variable.  Could this be the source of the
problem?

I believe the error message appears on other operations in the
daily agenda as well, but have not yet studied this in detail.

-- bug report output  ---

Emacs  : GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600)
 of 2008-09-06 on SOFT-MJASON
Package: Org-mode version 6.30e

current state:
==
(setq
 org-empty-line-terminates-plain-lists t
 org-remember-interactive-interface 'outline
 org-agenda-files '("~/orgfiles/master.org" "~/orgfiles/recurring.org")
 org-agenda-window-setup 'other-frame
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-agenda-todo-ignore-scheduled t
 org-agenda-skip-scheduled-if-done t
 org-export-preprocess-hook '(org-export-blocks-preprocess)
 org-tab-first-hook '(org-hide-block-toggle-maybe)
 org-src-mode-hook '(org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-default-notes-file "/home/george/orgfiles/master.org"
 org-directory "/home/george/orgfiles/"
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-
drawers
  org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook org-show-block-all
append local]
   5]
 turn-on-font-lock)
 org-agenda-ndays 1
 org-global-properties '(("Effort_ALL" .
  "0 0:05 0:10 0:15 0:20 0:30 0:45 1:00 1:30 2:00")
 )
 org-confirm-elisp-link-function 'yes-or-no-p
 org-agenda-mode-hook '((lambda nil (hl-line-mode 1)))
 org-agenda-start-on-weekday nil
 org-reverse-note-order t
 org-occur-hook '(org-first-headline-recenter)
 org-agenda-todo-ignore-deadlines t
 org-columns-default-format "%CATEGORY %35ITEM %Effort{:} %PRIORITY 
%ALLTAGS"
 org-remember-templates '(("Todo" 116 "* TODO %?\n  %u\n" nil nil nil))
 org-agenda-use-time-grid nil
 )



___
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] external link to openoffice.org file

2009-09-20 Thread Christoph Herzog
Having a poor understanding of emacs because I started to use it with 
org-mode recently, I wonder whether there is a better way to make 
external links to openoffice.org files than

[[shell: ooffice -writer /path/to/document.odt]]

I also wonder whether it is possible to attach other than 
emacs-compatible files?


Christoph



___
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 version 6.30trans; Cursor does not move to end-of-line in agenda view

2009-09-20 Thread David Maus

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


I recently noticed a display glitch: In agenda view the cursor cannot
be moved to end-of-line but only to (end-of-line)-1.

To reproduce it: 

 - C-a t

 - Move cursor to end of line (by -key or cursor-right)

 - And the cursor stops over the last "L

   Global list of TODO items of type: ALL
^
As far as I can tell this causes no harm (for me).

Emacs  : GNU Emacs 23.1.50.1 (i486-pc-linux-gnu, GTK+ Version 2.16.6)
 of 2009-09-09 on elegiac, modified by Debian
Package: Org-mode version 6.30trans

Regards,

  -- David

-- 
OpenPGP... 0x316F4BE4670716FD
Jabber dmj...@jabber.org
Email. maus.da...@gmail.com
ICQ... 241051416


___
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: Using yasnippet with org Mode (C-i works TAB doesn't)

2009-09-20 Thread Eric Schulte
Nicolas Goaziou  writes:

> Jeff Kowalczyk  writes:
>
>> (add-hook 'org-mode-hook
>>   (lambda ()
>>   (org-set-local 'yas/trigger-key [tab])
>>   (define-key yas/keymap [tab] 'yas/next-field-group)))
>
> According to the yasnippet FAQ (or is it on its forum), it should be
>
> (add-hook 'org-mode-hook
>   #'(lambda ()
>   (setq yas/fallback-behavior
> `(apply ,(lookup-key org-mode-map [tab])))
>   (local-set-key [tab] 'yas/expand)))
>
> Anyway, there is one major problem left, it doesn't work with
> org-indent-mode as, when you press TAB to get to the next field of a
> snippet, you are sent to the first headline in the org file.
>
> I have yet to find a workaround about that.
>

After upgrading to the newest version of yasnippet I was dismayed to
find it no longer working in my own org-mode files.  After some painful
trial and error I found that the following setup works for me.

--8<---cut here---start->8---
(defun yas/org-very-safe-expand ()
  (let ((yas/fallback-behavior 'return-nil)) (yas/expand)))

(add-hook 'org-mode-hook
  (lambda ()
;; yasnippet (using the new org-cycle hooks)
(make-variable-buffer-local 'yas/trigger-key)
(setq yas/trigger-key [tab])
(add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand)
(define-key yas/keymap [tab] 'yas/next-field)))
--8<---cut here---end--->8---

-- Eric

>
> Regards,


___
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: Autoloading failed to define function org-mode

2009-09-20 Thread Tamas K Papp
On Sat, 19 Sep 2009 08:04:41 +0100, Ian Barton wrote:

> Tamas K Papp wrote:
>> Hi, I have just switched to Ubuntu from Debian (fresh install on a new
>> machine).  After I installed the relevant packages (emacs-snapshot,
>> org-mode) and tried to edit my todo file, I got the error message
>> 
>> Autoloading failed to define function org-mode
>
> I would suggest using the git version of org. I know this doesn't
> address the problem directly, but it's a good workaround:)

Hi Ian,

Thanks for the suggestion.  It turned out that the error was that I
had a file called org.el (that contains my settings) that somehow ended
up in the load-path during the migration, so it was mistakenly loaded
in place of org-mode's org.el.  An embarrassingly stupid error on my
part.

But at least now I have the git version :-)

Thanks for the help,

Tamas



___
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: Using yasnippet with org Mode (C-i works TAB doesn't)

2009-09-20 Thread Nicolas Goaziou
Jeff Kowalczyk  writes:

> (add-hook 'org-mode-hook
>   (lambda ()
>   (org-set-local 'yas/trigger-key [tab])
>   (define-key yas/keymap [tab] 'yas/next-field-group)))

According to the yasnippet FAQ (or is it on its forum), it should be

(add-hook 'org-mode-hook
  #'(lambda ()
  (setq yas/fallback-behavior
`(apply ,(lookup-key org-mode-map [tab])))
  (local-set-key [tab] 'yas/expand)))

Anyway, there is one major problem left, it doesn't work with
org-indent-mode as, when you press TAB to get to the next field of a
snippet, you are sent to the first headline in the org file.

I have yet to find a workaround about that.

Regards,

-- 
Nicolas Goaziou



___
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-export-as-freemind writes *.mm files that freemind (0.8.1) cannot read

2009-09-20 Thread Daniel Martins
One more vore for integration

I use FreeMind with my non-Emacs post-graduate students before thay
write anything with pretty good results.

Daniel

PS I am considering Emacs as a requisite to be a post-graduate student!

2009/9/19 Friedrich Delgado Friedrichs :
> Hi!
>
> Carsten Dominik schrieb:
>> http://www.emacswiki.org/emacs/FreeMind
> ---Zitatende---
>
> Interesting. I was talking about the org-freemind package in the
> contrib dir of org. The emacswiki page talks about a completely
> different library.
>
> To make this one work, I have to convert my org file to oddeven levels
> (since it checks if the level step is > 1), but then I can just open
> the resulting freemind file with freemind 0.9.0~rc4 (from the
> experimental branch of the debian repository).
>
> So: Yay! Thanks! ;)
>
> Maybe it would be worth considering to add this to the org-mode
> documentation. Since it's already part of nxhtml it would probably be
> useless to add it to org's contrib dir.
>
>
> --
>        Friedrich Delgado Friedrichs 
>                             TauPan on Ircnet and Freenode ;)
>
> ___
> 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