Re: [O] Color entries according to assigned priority

2014-05-03 Thread Sebastien Vauban
Uwe Ziegenhagen wrote:
 is it possible to color the different entries in an org file according to
 the priority assigned to them?

See color header based on priority/tags rather than level on
http://lists.gnu.org/archive/html/emacs-orgmode/2014-01/msg00625.html.

 I'd like to have #a items in black and #b, #c and non-prioritized items in
 gray tones.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Exporting org-mode source

2014-05-03 Thread Sebastien Vauban
Vikas Rawal wrote:
 I want to export a block of org-mode source code in a tutorial I am
 writing.

 I have tried variations of the following. But nothing seems to give me
 org-mode code in the exported pdf.

 #+BEGIN_SRC org :results code replace
 org-mode code here
 #+END_SRC

 What is the right way to do it?

The following Org code block...

#+begin_src org
,#+begin_src LANGUAGE HEADER-ARGS
BODY
,#+end_src
#+end_src

... works for me (that is, is fontified correctly in the HTML export).

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [RFC] Rewrite indentation functions

2014-05-03 Thread Eric Abrahamsen
Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 Eric Abrahamsen e...@ericabrahamsen.net writes:

 Wish I was competent to actually review this, but... In lieu of that,
 I'd be happy to run it and report errors. If you think a separate
 testing branch is warranted, that might be an idea. Otherwise I'd say
 let it drop and we'll pick up the pieces :)

 You can create a local branch in your git repo and apply the patches
 I sent (be sure to use the second version of the first patch) there.

 I can certainly wait for your feedback. If it turns out to be mostly
 good and no one objects, I will then apply the patches and fix the
 remnant issues on master branch.

Hi Nicolas,

Right now I'm seeing breakage with `org-set-property' -- this only
happens on the indentation patches branch. Adding an EXPORT_AUTHOR
property with that command, value of asdfadsf, gives me this:

* Test Heading
  :PROPERTIES:

  :EXPORT_AUTHOR: asdfasdfnilnil

Extra blank nil, spurious nils, and no :END:

I'm starting dinner and won't be able to go spelunking right now. I'll
get to soon, if you aren't seeing this, or don't sort it out first.

Eric




Re: [O] :mkdirp without path specifier

2014-05-03 Thread Achim Gratz
R. Michael Weylandt writes:
 ;; Possibly create the parent directories for file.
 (when (let ((m (funcall get-spec :mkdirp)))
(and m (not (string= m no
 - (make-directory (file-name-directory file-name) 
 'parents))
 + (if (file-name-directory file-name)
 + (make-directory (file-name-directory file-name) 
 'parents)))

If the else clause is intentionally missing, some folks prefer to use
when instead of if to advertise that fact (see some surrounding code
for example).  In this case the additional if should be rolled into
the condition check of the former when anyway (and let-bind the result
to avoid the duplicate file-name-directory call).  The conditional is
actually superfluous since we can short-circuit from the and.

A patch to that effect has been installed in 063c8b03b7.


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

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables




Re: [O] [RFC] Rewrite indentation functions

2014-05-03 Thread Eric Abrahamsen
Eric Abrahamsen e...@ericabrahamsen.net writes:

 Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 Eric Abrahamsen e...@ericabrahamsen.net writes:

 Wish I was competent to actually review this, but... In lieu of that,
 I'd be happy to run it and report errors. If you think a separate
 testing branch is warranted, that might be an idea. Otherwise I'd say
 let it drop and we'll pick up the pieces :)

 You can create a local branch in your git repo and apply the patches
 I sent (be sure to use the second version of the first patch) there.

 I can certainly wait for your feedback. If it turns out to be mostly
 good and no one objects, I will then apply the patches and fix the
 remnant issues on master branch.

 Hi Nicolas,

 Right now I'm seeing breakage with `org-set-property' -- this only
 happens on the indentation patches branch. Adding an EXPORT_AUTHOR
 property with that command, value of asdfadsf, gives me this:

 * Test Heading
   :PROPERTIES:

   :EXPORT_AUTHOR: asdfasdfnilnil

 Extra blank nil, spurious nils, and no :END:

 I'm starting dinner and won't be able to go spelunking right now. I'll
 get to soon, if you aren't seeing this, or don't sort it out first.

 Eric

Specifically, in this section of `org-indent-line':

(when (eq type 'node-property)
   (let ((column (current-column)))
 (save-excursion
   (beginning-of-line)
   (looking-at org-property-re))
 (replace-match (concat (match-string 4)
(format org-property-format
(match-string 1)
(match-string 3)))
t t)
 (org-move-to-column column)))

Those match-string calls toward the end both return nil, and the
nils get inserted directly into the buffer. I tried this with a
minimal setup (load-paths only, and a blank Org file) and could
reproduce.

E




Re: [O] Heading vs Headline

2014-05-03 Thread Eric Abrahamsen
Sebastien Vauban sva-n...@mygooglest.com
writes:

 Hello,

 Particularly in the Org Beamer documentation, headlines seems the most
 used term while there is a tag ignoreheading...

 I have the impression that both terms (heading and headline) are
 synonyms. Though, is this true, or is there some subtle nuance?

 Best regards,
   Seb

I've had the same confusion before, and have ended up trying to stick to
heading. Having worked in journalism, headline has very definite
associations for me. Heading is seen in other equivalent contexts,
like Latex, but so is header. Header stomps on the toes of
email/HTML/HTTP, though, so I come back to heading...

Two cents,
Eric




Re: [O] loading all agenda files at startup

2014-05-03 Thread Eric Abrahamsen
Alexander Baier lexi.ba...@gmail.com writes:

 On 2014-04-30 10:44 Eric Abrahamsen wrote:
 Daimrod daim...@gmail.com writes:

 Eric Abrahamsen e...@ericabrahamsen.net writes:

 Hi Eric,

 I've got a few top-level user commands, related to org, that load at
 startup. Specifically org-agenda and org-ido-switchb are bound to keys
 that are available after emacs starts up. Before Org loads properly,
 however, things like the agenda file list and the list of valid tags and
 TODO keywords are unavailable. That makes it hard to boot emacs and go
 directly into a call to `org-todo-list': the TODO keywords aren't loaded
 yet.

 I've looked into this before but couldn't find a single function that
 would boot my local data. `org-agenda-files' reads the file list, but
 it doesn't actually parse the files and do all the setup routines.

 Is there a single-function entry point that I could put in my init
 files, that would get me where I want to be? ie, in a state as though
 `org-agenda' had already been called, though it hasn't yet?

 I call `org-agenda-list' in my `after-init-hook' but it is not silent,
 that is, it displays the agenda list.

 Best,

 Right, just calling the agenda directly will certainly solve the issue,
 and I suppose as a member of the Org faithful I should be booting to the
 agenda! But it would be nice to get the same effect, but be left in
 *scratch*...

 Maybe hacking around it with something like the following in
 'org-agenda-after-show-hook' or some similar hook?

 #+begin_src emacs-lisp
 (defun my-switch-to-sratch ()
   (switch-to-buffer *scratch*)
   (delete-other-windows))
 #+end_src

 HTH,

Yup, that's worth considering. I guess I was just hoping to get at the
plumbing a little more directly. But yes, on balance this is probably
a better approach.

Thanks,
Eric




Re: [O] [RFC] Rewrite indentation functions

2014-05-03 Thread Nicolas Goaziou
Hello,

Eric Abrahamsen e...@ericabrahamsen.net writes:

 Right now I'm seeing breakage with `org-set-property' -- this only
 happens on the indentation patches branch. Adding an EXPORT_AUTHOR
 property with that command, value of asdfadsf, gives me this:

 * Test Heading
   :PROPERTIES:

   :EXPORT_AUTHOR: asdfasdfnilnil

 Extra blank nil, spurious nils, and no :END:

[...]

 Specifically, in this section of `org-indent-line':

 (when (eq type 'node-property)
  (let ((column (current-column)))
(save-excursion
  (beginning-of-line)
  (looking-at org-property-re))
(replace-match (concat (match-string 4)
   (format org-property-format
   (match-string 1)
   (match-string 3)))
   t t)
(org-move-to-column column)))

 Those match-string calls toward the end both return nil, and the
 nils get inserted directly into the buffer. I tried this with a
 minimal setup (load-paths only, and a blank Org file) and could
 reproduce.

Indeed. I attach a replacement for both patch 1 and 2.

Thank you.


Regards,

-- 
Nicolas Goaziou
From 104a091d127b746662adfa7b3f71a602ef5f816e Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou n.goaz...@gmail.com
Date: Tue, 24 Dec 2013 14:04:17 +0100
Subject: [PATCH 1/3] Rewrite `org-indent-line'

* lisp/org.el (org--get-expected-indentation,
  org--align-node-property): New functions.
(org-indent-line): Use new function.  Also merge functionalities with
`org-src-native-tab-command-maybe'.

* lisp/org-src.el (org-src-native-tab-command-maybe): Remove function.

* testing/lisp/test-org.el (test-org/indent-line): New test.
---
 lisp/org-src.el  |  11 --
 lisp/org.el  | 281 +--
 testing/lisp/test-org.el | 157 ++
 3 files changed, 330 insertions(+), 119 deletions(-)

diff --git a/lisp/org-src.el b/lisp/org-src.el
index 791f934..8d60f68 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -895,17 +895,6 @@ issued in the language major mode buffer.
   :version 24.1
   :group 'org-babel)
 
-(defun org-src-native-tab-command-maybe ()
-  Perform language-specific TAB action.
-Alter code block according to what TAB does in the language major mode.
-  (and org-src-tab-acts-natively
-   (org-in-src-block-p)
-   (not (equal this-command 'org-shifttab))
-   (let ((org-src-strip-leading-and-trailing-blank-lines nil))
-	 (org-babel-do-key-sequence-in-edit-buffer (kbd TAB)
-
-(add-hook 'org-tab-first-hook 'org-src-native-tab-command-maybe)
-
 (defun org-src-font-lock-fontify-block (lang start end)
   Fontify code block.
 This function is called by emacs automatic fontification, as long
diff --git a/lisp/org.el b/lisp/org.el
index 44a4e44..3559209 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -22206,116 +22206,181 @@ hierarchy of headlines by UP levels before marking the subtree.
 
 ;;; Indentation
 
+(defun org--get-expected-indentation (element contentsp)
+  Expected indentation column for current line, according to ELEMENT.
+ELEMENT is an element containing point.  CONTENTSP is non-nil
+when indentation is to be computed according to contents of
+ELEMENT.
+  (let ((type (org-element-type element))
+	(start (org-element-property :begin element)))
+(org-with-wide-buffer
+ (cond
+  (contentsp
+   (case type
+	 (footnote-definition 0)
+	 ((headline inlinetask nil)
+	  (if (not org-adapt-indentation) 0
+	(let ((level (org-current-level)))
+	  (if level (1+ level) 0
+	 ((item plain list)
+	  (org-list-item-body-column
+	   (or (org-element-property :post-affiliated element) start)))
+	 (otherwise
+	  (goto-char start)
+	  (org-get-indentation
+  ((memq type '(headline inlinetask nil))
+   (if (save-excursion (beginning-of-line) (looking-at [ \t]*$))
+	   (org--get-expected-indentation element t)
+	 0))
+  ((eq type 'footnote-definition) 0)
+  ;; First paragraph of a footnote definition or an item.
+  ;; Indent like parent.
+  (( (line-beginning-position) start)
+   (org--get-expected-indentation
+	(org-element-property :parent element) t))
+  ;; At first line: indent according to previous sibling, if any,
+  ;; ignoring footnote definitions and inline tasks, or parent's
+  ;; contents.
+  ((= (line-beginning-position) start)
+   (catch 'exit
+	 (while t
+	   (if (= (point-min) start) (throw 'exit 0)
+	 (goto-char (1- start))
+	 (let ((previous (org-element-at-point)))
+	   (while (let ((parent (org-element-property :parent previous)))
+			(and parent
+			 (setq previous parent)
+			 (= (org-element-property :end parent) start
+	   (cond ((or (not previous)
+			  ( (org-element-property :end previous) start))
+		  (throw 'exit 

Re: [O] :mkdirp without path specifier

2014-05-03 Thread R. Michael Weylandt
On Sat, May 3, 2014 at 4:19 AM, Achim Gratz strom...@nexgo.de wrote:
 R. Michael Weylandt writes:
 ;; Possibly create the parent directories for file.
 (when (let ((m (funcall get-spec :mkdirp)))
(and m (not (string= m no
 - (make-directory (file-name-directory file-name) 
 'parents))
 + (if (file-name-directory file-name)
 + (make-directory (file-name-directory file-name) 
 'parents)))

 If the else clause is intentionally missing, some folks prefer to use
 when instead of if to advertise that fact (see some surrounding code
 for example).  In this case the additional if should be rolled into
 the condition check of the former when anyway (and let-bind the result
 to avoid the duplicate file-name-directory call).  The conditional is
 actually superfluous since we can short-circuit from the and.

 A patch to that effect has been installed in 063c8b03b7.


Thanks for the feedback and applying a fix.



[O] First attempt at exporting to PDF.

2014-05-03 Thread Sharon Kimble
I've spent most of the day writing something in org-mode and then
exporting it to PDF. But, it doesn't come out as I wanted,
presumably because I've not got the org-mode/latex headers right,
but this is what I have -
--8---cut here---start-8---
-*- Mode:org; mode:reftex; coding:utf-8  -*-
# 
#+LINK: notes #%s
\bibliography{~/.emacs.d/research/refs.bib}
#% Title


\tableofcontents
--8---cut here---end---8---
First off, it seems to be taking its title from what the file is
saved as, but I need something different from that, so how do I get
it please? \Title The foobar mystery?, but that doesn't seem to
work either. And I need to have two people listed as the authors,
but it only seems to be taking me, so how do I do it then please?

Secondly, none of my bibliographic references show in the pdf except
as ?, although I cite them like this
--8---cut here---start-8---
males have more testosterone \cite{6}.
--8---cut here---end---8---
which correlates with this -
--8---cut here---start-8---
@Article{,
  author =   {MacRae K. Pattison J.},
  title ={Home chemotherapy.},
  journaltitle = {Nursing Times},
  ALTyear =  {2002},
  OPTkey =   {6},
  OPTvolume ={98},
  OPTnumber ={35},
  OPTpages = {34-35},
}
--8---cut here---end---8---
So how do I get the references to show in the pdf please?

This shows in the *pdf output log*
--8---cut here---start-8---
LaTeX Warning: Citation `6' on page 3 undefined on input line 146.
--8---cut here---end---8---
but it is defined in the biblatex refs.bib file. So how do I get
them to both agree and recognise each other please?

I'll meanwhile trawl through the emails that I've saved from this
group trying to find some working headers, but any tutorials or conf
files gratefully received.

Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
my git repo = https://bitbucket.org/boudiccas/dots
TGmeds = http://www.tgmeds.org.uk
Debian testing, Fluxbox 1.3.5, emacs 24.4.50.18


signature.asc
Description: PGP signature


Re: [O] First attempt at exporting to PDF.

2014-05-03 Thread Martin Schöön
Here is how my first org-mode file for export to pdf using LaTeX starts:

#+LATEX_CLASS: article
#+LATEX_CLASS_OPTIONS: [a4paper]
#+OPTIONS: toc:nil
#+OPTIONS: ^:{}
#+TITLE: Ett första försök att blanda in LaTeX i en Org-mod fil
#+AUTHOR: Martin Schöön

The first two rows should be self explaining and they show the syntax.
The third row prevents the creation of a table of contents.
The fourth row forces me to use the LaTeX convention of ^{something}
and _{something} for super- and sub-scripts.
Line five and six show you how to define title and author.

I have never tried what you are trying to do with references so someone
else must step in and help you there.

-- 
Martin Schöön

http://hem.bredband.net/b262106/index.html


Re: [O] First attempt at exporting to PDF.

2014-05-03 Thread Nick Dokos
Sharon Kimble boudic...@skimble.plus.com writes:

 I've spent most of the day writing something in org-mode and then
 exporting it to PDF. But, it doesn't come out as I wanted,
 presumably because I've not got the org-mode/latex headers right,
 but this is what I have -
 -*- Mode:org; mode:reftex; coding:utf-8  -*-
 # 
 #+LINK: notes #%s
 \bibliography{~/.emacs.d/research/refs.bib}
 #% Title


 \tableofcontents
 First off, it seems to be taking its title from what the file is
 saved as, but I need something different from that, so how do I get
 it please? \Title The foobar mystery?, but that doesn't seem to
 work either. And I need to have two people listed as the authors,
 but it only seems to be taking me, so how do I do it then please?


--8---cut here---start-8---
#+TITLE: The foobar mystery?
#+AUTHOR: A.U. Thor and S. Kimble

* foo
bar

* baz
--8---cut here---end---8---

and you get the TOC automatically - if you don't want it, say

#+OPTIONS: toc:nil

The options are documented in

(info (org) Export settings)


 ...

 I'll meanwhile trawl through the emails that I've saved from this
 group trying to find some working headers, but any tutorials or conf
 files gratefully received.


A long time ago, I used to save messages from the list but no longer.  I
search through the list at gmane.org. A convenient starting point is

http://orgmode.org/community.html

-- 
Nick




[O] [PATCH] orgguide.texi: Replace spaces with tabs in two menu lines to be consistent with all other menu lines.

2014-05-03 Thread Richard Kim
Why this trivial patch?  As I make changes to orgguide.texi, I may
invoke texinfo-all-menus-update or texinfo-every-node-update elisp
commands.  When I do the spaces are replaced with tabs.  I would
rather not have to deal with these changes when I view git diff.
Besides I think using white spaces consistently is a good thing.

I submitted this email following the instruction at
http://orgmode.org/worg/org-contribute.html.
Please let me know if I could have done better.
Thanks.

---
 doc/orgguide.texi |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/orgguide.texi b/doc/orgguide.texi
index f93b99a..a3470bd 100644
--- a/doc/orgguide.texi
+++ b/doc/orgguide.texi
@@ -211,7 +211,7 @@ Exporting
 * ASCII/Latin-1/UTF-8 export:: Exporting to flat files with encoding
 * HTML export::Exporting to HTML
 * @LaTeX{} and PDF export::Exporting to @LaTeX{}, and processing to PDF
-* iCalendar export::Exporting to iCalendar
+* iCalendar export::   Exporting to iCalendar
 
 Miscellaneous
 
@@ -2307,7 +2307,7 @@ that planning information can be incorporated into 
desktop calendars.
 * ASCII/Latin-1/UTF-8 export:: Exporting to flat files with encoding
 * HTML export::Exporting to HTML
 * @LaTeX{} and PDF export::Exporting to @LaTeX{}, and processing to PDF
-* iCalendar export::Exporting to iCalendar
+* iCalendar export::   Exporting to iCalendar
 @end menu
 
 @node Export options, The export dispatcher, Exporting, Exporting
-- 
1.7.9.5




Re: [O] [BUG] Cannot export a raw link

2014-05-03 Thread Michael Brand
Hi Nicolas

On Wed, Apr 16, 2014 at 9:15 AM, Nicolas Goaziou n.goaz...@gmail.com wrote:
 I suggest the following for the 8.2.6 release:

   - revert the whole patches line

   - at the parser level

 - if scheme is not file or derived (e.g., file+sys or
   docview), assume PATH is a correct URI and do not change
   anything ;

 - otherwise, if PATH is absolute and do not start with two or more
   slashes, append // to it ;

   - at the back-ends level, simply add file: if PATH is absolute and
 use PATH otherwise.

 I think it is sufficient for 8.2.6.  We can still discuss if more
 parsing is needed for 8.3.

 WDYT?

I am not 100 % sure whether it is related with the above changes. But
could you please check again if the merge conflict in lisp/ox-html.el
between maint and master was resolved correctly with your merging
commit fffd055ac5e920e744e350a1ad164494aec9fa91 on master? I think on
master it should not be

(org-link-escape
 (org-link-unescape
  (concat type : raw-path)) org-link-escape-chars-browser))

but

(org-link-escape-browser
 (org-link-unescape (concat type : raw-path

like it was after my commit 54e3009d7319e4bece967be165061331070635e5.

Michael



Re: [O] First attempt at exporting to PDF.

2014-05-03 Thread Sharon Kimble
Martin Schöön martin.sch...@gmail.com writes:

 Here is how my first org-mode file for export to pdf using LaTeX
 starts:

 #+LATEX_CLASS: article
 #+LATEX_CLASS_OPTIONS: [a4paper]
 #+OPTIONS: toc:nil
 #+OPTIONS: ^:{}
 #+TITLE: Ett första försök att blanda in LaTeX i en Org-mod fil
 #+AUTHOR: Martin Schöön

 The first two rows should be self explaining and they show the syntax.
 The third row prevents the creation of a table of contents.
 The fourth row forces me to use the LaTeX convention of ^{something}
 and _{something} for super- and sub-scripts.
 Line five and six show you how to define title and author.

Thanks for this, I've now just created a PDF with your headings, and
apart from the lack of references it looks good! :)

 I have never tried what you are trying to do with references so
 someone
 else must step in and help you there.

Just hope someone steps up to the plate?

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
my git repo = https://bitbucket.org/boudiccas/dots
TGmeds = http://www.tgmeds.org.uk
Debian testing, Fluxbox 1.3.5, emacs 24.4.50.18


signature.asc
Description: PGP signature


Re: [O] First attempt at exporting to PDF.

2014-05-03 Thread Thomas S. Dye
Aloha Sharon,

Sharon Kimble boudic...@skimble.plus.com writes:

 I have never tried what you are trying to do with references so
 someone
 else must step in and help you there.

 Just hope someone steps up to the plate?

This was written for the old exporter, but it might be useful to you:

http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-17

Also, the BibTeX entry in your original post was mal-formed.  It lacked
a key and the author field looked wrong, IIRC.  You might want to check out
the BibTeX file format:

http://www.bibtex.org/Format/

hth,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] Heading vs Headline

2014-05-03 Thread Kyle Meyer
Sebastien Vauban wrote:
[...]
 Particularly in the Org Beamer documentation, headlines seems the most
 used term while there is a tag ignoreheading...

Function names in org.el tend to use heading.

#+begin_src sh
  grep defun org.el | grep heading | wc -l
#+end_src

#+RESULTS:
: 28

#+begin_src sh
  grep defun org.el | grep headline | wc -l
#+end_src

#+RESULTS:
: 3

 I have the impression that both terms (heading and headline) are
 synonyms. Though, is this true, or is there some subtle nuance?

I think Org uses them interchangeably. One of the three functions above
that use headline is `org-find-exact-headline-in-buffer', and the
function immediately below it is `org-find-exact-heading-in-directory'.

--
Kyle



Re: [O] Color entries according to assigned priority

2014-05-03 Thread Uwe Ziegenhagen
Sebastien Vauban sva-news@... writes:

 
 Uwe Ziegenhagen wrote:
  is it possible to color the different entries in an org file according to
  the priority assigned to them?
 
 See color header based on priority/tags rather than level on
 http://lists.gnu.org/archive/html/emacs-orgmode/2014-01/msg00625.html.
 
  I'd like to have #a items in black and #b, #c and non-prioritized items in
  gray tones.
 
 Best regards,
   Seb
 


I copied and pasted the given code, however I do not see any change. I'll
try my luck again tomorrow and will get back to you.

Uwe




Re: [O] First attempt at exporting to PDF.

2014-05-03 Thread John Kitchin
you should be able to get references with \cite{key1} and \cite{key2}.
where key1 and key2 are bibtex keys in a bibtex file called references.bib.

you need at the end of your org-file where you want the bibliography to
appear:

\bibliographystyle{unsrt}
\bibliography{references}


In your init file, you may need to do this:
;; for minted you must run latex with -shell-escape because it calls
pygmentize as an external program
(setq org-latex-pdf-process
  '(pdflatex -shell-escape -interaction nonstopmode -output-directory
%o %b
bibtex %b
pdflatex -shell-escape -interaction nonstopmode -output-directory
%o %b
pdflatex -shell-escape -interaction nonstopmode -output-directory
%o %b))

I do not think org-mode runs bibtex by default. After that you should see
the references.

John

---
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu



On Sat, May 3, 2014 at 4:00 PM, Thomas S. Dye t...@tsdye.com wrote:

 Aloha Sharon,

 Sharon Kimble boudic...@skimble.plus.com writes:

  I have never tried what you are trying to do with references so
  someone
  else must step in and help you there.
 
  Just hope someone steps up to the plate?

 This was written for the old exporter, but it might be useful to you:

 http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-17

 Also, the BibTeX entry in your original post was mal-formed.  It lacked
 a key and the author field looked wrong, IIRC.  You might want to check out
 the BibTeX file format:

 http://www.bibtex.org/Format/

 hth,
 Tom

 --
 Thomas S. Dye
 http://www.tsdye.com




Re: [O] Color entries according to assigned priority

2014-05-03 Thread Alexander Baier
On 2014-05-03 22:07 Uwe Ziegenhagen wrote:
 I copied and pasted the given code, however I do not see any change. I'll
 try my luck again tomorrow and will get back to you.

Just to be sure, did you eval the pasted code? And restarting org-mode
(M-x fundamental-mode M-x org-mode) could be necessary, too?

HTH,
-- 
Alexander Baier



[O] Seeking advice on a worg contribution

2014-05-03 Thread James Harkins
I finally finished a draft (attached, and not carefully proofread yet) of a 
new worg page to outline what I had to do for a big Beamer publishing 
project. Could somebody look it over and advise of any formatting problems? 
I guess it should be basically OK; I copied the standard worg header, and I 
stuck to normal org markup throughout.


A specific formatting question: I have several source code blocks with 
captions. The captions are formatted exactly the same as normal paragraphs. 
Will worg use a different CSS style for captions? If not, what do I have to 
do to make it do that? (At least, display the captions slightly smaller.)


Thanks,
hjh#+TITLE: Using Beamer export to produce slideshows and article-style 
handouts from the same org source
#+AUTHOR:James Harkins
#+EMAIL: 
#+DATE:  
#+LANGUAGE:  en
#+OPTIONS:   H:2 num:nil toc:t \n:nil ::t |:t ^:t -:t f:t *:t
#+OPTIONS:   tex:t d:(HIDE) tags:not-in-toc
#+STARTUP:   fold
#+CATEGORY:   worg

* Project overview

The project is training material for a one-week intensive workshop in audio 
synthesis and live-performance control in the SuperCollider programming 
language. The workshop was commissioned by CHEARS, the China 
ElectroAcoustic Resource Survey, and will be given first in Shenyang, PRC.

I wanted to have thorough presentation slides available, for some kinds of 
explanation that are difficult otherwise, and also give a PDF book to 
workshop attendees for their future reference. During the writing process, 
the book became more important, as a way to provide copyright-free 
tutorials for translation into Chinese. The book eventually grew to 237 
pages (with, admittedly, more white space per page than a standard prose 
layout), rendered from 10849 lines of LaTeX code, all of which were 
generated directly by the org Beamer exporter with no manual edits to any 
of the =tex= files.

Achieving that required some ingenuity in both org mode and LaTeX. This 
worg page documents the project's design and implementation.

* Requirements

- One org source to produce slideshows and printed material.
  - Beamer export for both formats.
- Normal /beamer/ document class for slides.
- Document class /article/ for the book, with
  =\usepackage{beamerarticle}= in the preamble.
  - Header files to determine PDF layout.
  - Additional explanatory text that will be omitted from slideshows.
- Use the beamer class option /ignorenonframetext/ for slides.
- Put notes under frame-level headings, with the beamer tag
  =B_ignoreheading=.

- Indexed glossaries of terms, classes and methods, without writing
  cumbersome LaTeX syntax for the glossaries package.
  - Keep glossary definitions in org tables.
  - Convert to LaTeX syntax using emacs-lisp source blocks.
  - Convert only once in the book combining all chapters, but once per 
slideshow.

- Extract captioned source blocks into plain-text files for SuperCollider.
  - =org-element-map= did all the hard work.

* Implementation

** One source: File structure
The LaTeX preamble controls the output format; so, to have different output 
from the same org source, the preamble must be separate from the content. 
Here, we have two headers:

- =slidehead.org=, which specifies the document class /beamer/ with
  the /presentation/ option.
- =printhead2.org=, which specifies the /article/ class and adds the
  /beamerarticle/ package so that the article class can interpret
  beamer formatting commands.

Other formatting differences are implemented here. For instance, inline 
code fragments are colored green in the slides, but remain black in the 
article.

Header files contain nothing specific to any chapter, and content files are 
strictly content, no formatting definitions. Neither of these are exported 
directly. The export files provide the title and author fields, and include 
(=#+INCLUDE:=) the appropriate header and content files. They also include 
the glossary file; details to follow.

#+name: slidehead
#+caption: Primary export options for slideshow format.
#+begin_src org
  ,#+startup: beamer
  ,#+LaTeX_CLASS: beamer
  ,#+LaTeX_CLASS_OPTIONS: [ignorenonframetext,presentation]
  ,#+BEAMER_THEME: default
#+end_src

#+name: printhead
#+caption: Primary export options for article format.
#+begin_src org
  ,#+startup: beamer
  ,#+LaTeX_CLASS: article
  ,#+LaTeX_CLASS_OPTIONS: [a4paper,twoside,11pt]
  ,#+BEAMER_THEME: default
  ,#+LATEX_HEADER: \usepackage{beamerarticle}
#+end_src

#+name: contents
#+caption: Beginning of one of the contents files.
#+begin_src org
  ,#+startup: beamer
  
  ,* Workshop introduction
  ,** Workshop introduction
  ,*** Workshop goals
  , Teach synthesis techniques by experimentation
   - SC lets us take apart synthesizer components, and put them back 
together.
   - SC's /Just-In-Time library/ makes it easy to re-patch components 
interactively.
  , Teach techniques for live control and performance
   - Control by graphic interfaces and 

[O] Schedule for the World Cup in org format

2014-05-03 Thread Rafael

Hi all,

Following https://github.com/djcb/org-euro2012 as a template, I have
produced a schedule for the upcoming world cup in org format, which can
be obtained from https://github.com/rvf0068/org-wc2014

The times are Mexico City time, which is GMT-5. There is a function I
copied from the org-euro file to shift times, but which I haven't used.




Re: [O] (org-insert-headline '(4)) should insert new headline before point

2014-05-03 Thread Leonard Randall
Hi Bastien,

Just to follow up on the error, reverting commit 0ca4092 fixes the bug that
I mentioned in my last email and reverting the fourth hunk of commit
b8c85a1 should fix the bug that you tried to fix with that commit.  Carsten
had added an 'unless (bolp)' condition to the function that controls
inserting new lines outside of headlines to avoid deleting whitespace.
However, so far as I can tell, the other measures Carsten put in place with
that commit made adding this condition unnecessary. Outside of the contexts
where it produces the first bug I mentioned it does not seem to affect
headline insertion behaviour.

Anyway, reverting those commits should get headline insertion to work as
advertised.

All best

Leonard


Re: [O] [RFC] Rewrite indentation functions

2014-05-03 Thread Eric Abrahamsen
Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 Eric Abrahamsen e...@ericabrahamsen.net writes:

 Right now I'm seeing breakage with `org-set-property' -- this only
 happens on the indentation patches branch. Adding an EXPORT_AUTHOR
 property with that command, value of asdfadsf, gives me this:

 * Test Heading
   :PROPERTIES:

   :EXPORT_AUTHOR: asdfasdfnilnil

 Extra blank nil, spurious nils, and no :END:

 [...]

 Specifically, in this section of `org-indent-line':

 (when (eq type 'node-property)
 (let ((column (current-column)))
   (save-excursion
 (beginning-of-line)
 (looking-at org-property-re))
   (replace-match (concat (match-string 4)
  (format org-property-format
  (match-string 1)
  (match-string 3)))
  t t)
   (org-move-to-column column)))

 Those match-string calls toward the end both return nil, and the
 nils get inserted directly into the buffer. I tried this with a
 minimal setup (load-paths only, and a blank Org file) and could
 reproduce.

 Indeed. I attach a replacement for both patch 1 and 2.

Looks good! Nothing else to report so far...




Re: [O] [RFC] Rewrite indentation functions

2014-05-03 Thread Eric Abrahamsen
Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 Eric Abrahamsen e...@ericabrahamsen.net writes:

 Right now I'm seeing breakage with `org-set-property' -- this only
 happens on the indentation patches branch. Adding an EXPORT_AUTHOR
 property with that command, value of asdfadsf, gives me this:

 * Test Heading
   :PROPERTIES:

   :EXPORT_AUTHOR: asdfasdfnilnil

 Extra blank nil, spurious nils, and no :END:

 [...]

 Specifically, in this section of `org-indent-line':

 (when (eq type 'node-property)
 (let ((column (current-column)))
   (save-excursion
 (beginning-of-line)
 (looking-at org-property-re))
   (replace-match (concat (match-string 4)
  (format org-property-format
  (match-string 1)
  (match-string 3)))
  t t)
   (org-move-to-column column)))

 Those match-string calls toward the end both return nil, and the
 nils get inserted directly into the buffer. I tried this with a
 minimal setup (load-paths only, and a blank Org file) and could
 reproduce.

 Indeed. I attach a replacement for both patch 1 and 2.

One other thing: I was going to poke around with code block indentation
and see if I could break it, but I can't get the third patch to apply
cleanly any more. I don't know if it's because I rebased this testing
branch against an update master, or if your changes to the first two
patches mean the third needs to be edited accordingly...

It fails at org.el:22368, which is this line inside `org-indent-line':

(skip-chars-backward  \r\t\n)

Perhaps we need a new version of patch 3?

Eric




Re: [O] [RFC] Rewrite indentation functions

2014-05-03 Thread Eric Abrahamsen
Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 Eric Abrahamsen e...@ericabrahamsen.net writes:

 Right now I'm seeing breakage with `org-set-property' -- this only
 happens on the indentation patches branch. Adding an EXPORT_AUTHOR
 property with that command, value of asdfadsf, gives me this:

 * Test Heading
   :PROPERTIES:

   :EXPORT_AUTHOR: asdfasdfnilnil

 Extra blank nil, spurious nils, and no :END:

One last thing! In the course of this I also noticed that, in a buffer
that contains a broken property drawer, you can't set properties on
*any* other heading. When `org-buffer-property-keys' goes looking for
valid keys used elsewhere in the current buffer, it calls
`org-get-property-block' on the broken drawer, and errors when that
function returns nil.

I tried changing the call to (org-get-property-block nil nil t), and
that seems to solve it: at least the broken drawer is repaired, and I
can successfully set properties. Dunno if that's the right way to handle
it, though.

Eric




Re: [O] Schedule for the World Cup in org format

2014-05-03 Thread Igor Sosa Mayor
Rafael rvf0...@gmail.com writes:

 Hi all,

 Following https://github.com/djcb/org-euro2012 as a template, I have
 produced a schedule for the upcoming world cup in org format, which can
 be obtained from https://github.com/rvf0068/org-wc2014

 The times are Mexico City time, which is GMT-5. There is a function I
 copied from the org-euro file to shift times, but which I haven't used.

thanks!

-- 
:: Igor Sosa Mayor :: joseleopoldo1...@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/  ::
:: jabberid: rogorido  ::::