Re: [O] header arguments, inheritance, and noweb expansion Was: «Macro» expansion in source blocks; code-sharing between blocks

2014-09-19 Thread Andreas Kiermeier
On 19 September 2014 20:29, Rainer M Krug  wrote:
> This boils down to the question I asked earlier about header-args and
> +header args, inheritance of header arguments and this in contrast to
> normal header args.
>
> Based on this discussion, I thought that the header arguments count
> *where the code is executed* and not where it is defined - well -
> surprise for me.
>
> You could try and put the code block with the definition of the code
> into a subtree where you set
>
> ,
> | :PROPERTIES:
> | :headser-args+: eval no
> | :END:
> `
>
> This might work?

Hi Rainer & list,

I've set the following property for the subtree that both code blocks are
in:

:header-args+: :eval no

but this results in no execution of either block
​​
.

I noticed in a separate thread (
https://lists.gnu.org/archive/html/emacs-orgmode/2014-09/msg00547.html)
​ that there is also :float header argument.​ The manual seems to indicate
that it only applies to org tables (exported to latex) - I've tried using
it on the original source block that produces a latex table as output,
which of course didn't work.

But ... if it did, that is,
if this float (and placement) header argument was utilised by the latex
source block, and so wrapped the output in a float (with optional caption
​ & label​
), then this
​c​ould
 circumvent the need for the second noweb source block.

The alternative mentioned by Chuck Berry is the xtable function (in R) (
https://lists.gnu.org/archive/html/emacs-orgmode/2014-09/msg00519.html). I
just tried it and am happy to share that it does created the whole output
in one go, i.e. it does exactly what I need, including table float, caption
and label. Now I just got to sort out how to created the tables without the
use of tabular ...

Thanks to all for your help!

Cheers,

Andreas


Re: [O] CV in orgmode for export to pdf (and html?)

2014-09-19 Thread Joseph Vidal-Rosset
Le sam.  20 sept. 2014  à 02:49:03  , Dan Griswold   a
envoyé ce message:
> Not sure anybody saw this the first time, so I'll try again, with some 
> expansion.
>
> Unlike the others who've commented, I moved my CV from LaTeX to org-mode and 
> I'm happy with the results. Two things make it work well.
>
> First, a "cv" class added to org-latex-classes:
>
> (add-to-list '("cv" 
> "\\documentclass[10pt]{article}\n\\usepackage[margin=.75in]{geometry}\n%\\usepackage{palatino}\n\\usepackage{sectsty}\n\\sectionfont{\\normalsize\\selectfont\\
> itshape}\n\\usepackage[T1]{fontenc}\n\\usepackage{libertine}\n\\renewcommand*\\oldstylenums[1]{{\\fontfamily{fxlj}\\selectfont
>  #1}}"
> ("\\section{%s}" . "\\section*{%s}")))
Hello Dan, hello the list,

I guess that there  is a code problem in this (add-to-list  ...) , in my
init.el (or custom.el) , it produces this warning:

Wrong number of arguments: #[(list-var element &optional append compare-fn) 
\204  
J\235\202>\305=\203
J>\202>\306=\203&\307  
J"\202>
J\211\203< @"\204<A\211\204-)\203D
J\207
\203R\304
J   C"\202V 
JBL\207  [compare-fn  element  list-var  lst  append  eq  eql  memql]  5
1615569], 1

Now a suggestion:  there is "moderncv" class in texlive  and I wonder if
it is difficult to make an add-to-list for this class in order to export
a CV both in latex and in html. 

I have no time at the moment to try this solution. 

Best wishes,

Jo. 



Re: [O] CV in orgmode for export to pdf (and html?)

2014-09-19 Thread Vikas Rawal
I know I am being lazy in not trying it out, but if you could share a PDF, it 
would give us an idea of what this gives you.

Vikas
 
On 20-Sep-2014, at 6:19 am, Dan Griswold  wrote:

> Not sure anybody saw this the first time, so I'll try again, with some 
> expansion.
> 
> Unlike the others who've commented, I moved my CV from LaTeX to org-mode and 
> I'm happy with the results. Two things make it work well.
> 
> First, a "cv" class added to org-latex-classes:
> 
> (add-to-list '("cv" 
> "\\documentclass[10pt]{article}\n\\usepackage[margin=.75in]{geometry}\n%\\usepackage{palatino}\n\\usepackage{sectsty}\n\\sectionfont{\\normalsize\\selectfont\\itshape}\n\\usepackage[T1]{fontenc}\n\\usepackage{libertine}\n\\renewcommand*\\oldstylenums[1]{{\\fontfamily{fxlj}\\selectfont
>  #1}}"
>   ("\\section{%s}" . "\\section*{%s}")))
> 
> Second, something like the following at the top of the org file (replace with 
> your particulars):
> 
> #+OPTIONS: author:nil timestamp:nil
> #+TITLE:
> #+DATE:
> #+LaTeX_CLASS: cv
> 
> #+BEGIN_LATEX
> \begin{flushleft}
>   \bfseries\Large Curriculum Vitae\hfill Daniel M. Griswold\normalfont
> \end{flushleft}
> 
> \vspace{-12pt}%
> \begin{flushright}
>   69 Stratton Road\\
>   Rochester, NY 14610\\
>   (585) xxx-\\
>   dgris...@x.com\\
>   \hrulefill
> \end{flushright}
> #+END_LATEX
> 
> Main headings are things like:
> 
> * Education
> * Specialization
> * Employment
> * Publications
> * Awards and Honors
> 
> and the details below each of these headings are simply unordered lists
> 
> I really like the easy of editing in org-mode this gives me.
> 
> Hope this helps,
> 
> Dan
> 



Re: [O] CV in orgmode for export to pdf (and html?)

2014-09-19 Thread Dan Griswold
Not sure anybody saw this the first time, so I'll try again, with some
expansion.

Unlike the others who've commented, I moved my CV from LaTeX to org-mode
and I'm happy with the results. Two things make it work well.

First, a "cv" class added to org-latex-classes:

(add-to-list '("cv"
"\\documentclass[10pt]{article}\n\\usepackage[margin=.75in]{geometry}\n%\\usepackage{palatino}\n\\usepackage{sectsty}\n\\sectionfont{\\normalsize\\selectfont\\itshape}\n\\usepackage[T1]{fontenc}\n\\usepackage{libertine}\n\\renewcommand*\\oldstylenums[1]{{\\fontfamily{fxlj}\\selectfont
#1}}"
  ("\\section{%s}" . "\\section*{%s}")))

Second, something like the following at the top of the org file (replace
with your particulars):

#+OPTIONS: author:nil timestamp:nil
#+TITLE:
#+DATE:
#+LaTeX_CLASS: cv

#+BEGIN_LATEX
\begin{flushleft}
  \bfseries\Large Curriculum Vitae\hfill Daniel M. Griswold\normalfont
\end{flushleft}

\vspace{-12pt}%
\begin{flushright}
  69 Stratton Road\\
  Rochester, NY 14610\\
  (585) xxx-\\
  dgris...@x.com\\
  \hrulefill
\end{flushright}
#+END_LATEX

Main headings are things like:

* Education
* Specialization
* Employment
* Publications
* Awards and Honors

and the details below each of these headings are simply unordered lists

I really like the easy of editing in org-mode this gives me.

Hope this helps,

Dan


Re: [O] [RFC] [PATCH] [babel] read description lists as lists of lists

2014-09-19 Thread Charles Berry
Aaron Ecay  gmail.com> writes:

> 
> 
> Hello all,
> 
> The attached patch makes babel read description lists as lists of the
> following format: (("term" "description") ...).  The present default is
> to simply read in the text of each list item, yielding:
> ("term :: description" ...).
> 
> Of course, it’s possible to interconvert between the two formats, but I
> think the greater structure of this proposal makes things easier for
> babel authors.  (Another way of thinking of the proposal is that it
> treats description lists like two-column tables.)
> 
> What do people think?

With that change 

#+BEGIN_SRC R :var a=my-desc-list
a
#+END_SRC

returns a data.frame with one column of terms and one of descriptions!

Which, no doubt, is what you were thinking.

This will be handy for creating DESCRIPTION files for R packages.

I love it. 

FWIW, rgrep-ing org-babel-\(ref-resolve\)\|\(read-result\) and clicking
on the links, I didn't catch any obvious problem cases.

HTH,

Chuck





Re: [O] CV in orgmode for export to pdf (and html?)

2014-09-19 Thread Rasmus
Nicolas Goaziou  writes:

> Hello,
>
> Brady Trainor  writes:
>
>> And I did have a decent export to LaTeX resume from org, but after 
>> discovering moderncv, I've switched, though I will be curious to read 
>> others' methods of org-to-moderncv export.
>
> One option could be to define a specialized latex back-end dedicated to
> moderncv class, much like "ox-koma-letter.el" does for "scrlttr2".

You can even do it all on the LaTeX side, e.g. redefining description
(or using ¤+ATTR_LATEX) to make use of the description form

"- year :: item"

Together with rebinding the title-command it should be pretty easy to
make a CV.

I never worked the LaTeX CV classes as I did not care for their
default looks, but it's very easy to use KOMA for CVs.

—Rasmus

-- 
⠠⠵




Re: [O] CV in orgmode for export to pdf (and html?)

2014-09-19 Thread Nicolas Goaziou
Hello,

Brady Trainor  writes:

> And I did have a decent export to LaTeX resume from org, but after 
> discovering moderncv, I've switched, though I will be curious to read 
> others' methods of org-to-moderncv export.

One option could be to define a specialized latex back-end dedicated to
moderncv class, much like "ox-koma-letter.el" does for "scrlttr2".


Regards,

-- 
Nicolas Goaziou



Re: [O] [RFC] [PATCH] ox-latex: support :float no with caption for minted listings

2014-09-19 Thread Nicolas Goaziou
Hello,

Aaron Ecay  writes:

> See the attached patch.

Thanks for the patch.

> I updated ORG-NEWS, but the manual (info "(org) LaTeX specific
> attributes") is already sufficiently general IMO.

OK.

> +- capt-of: for captions on `:float nil' source blocks

I think this is too limiting as we might use this package in other
places. "for captions outside of floats" may be more appropriate.

> +You can have listings with a caption which nonetheless do not
> +float.  This is useful in case the source code takes up more than
> +a page, in which case trying to float it will also truncate it.
> +To achieve this, you should specifying the following attributes
> +on the source block:
> +
> +  #+caption: ...
> +  #+attr_latex: :float no
> +  #+begin_src
> +...
> +  #+end_src

I wonder if this is even needed. ":float nil" is described in the
manual, and "capt-of" is loaded by default. IOW there's no real need to
warn the user about a natural feature which doesn't require any
intervention.

> + (cond ((and (not float) (plist-member attributes :float) 
> caption)
> +(format "%%s\n%s" (replace-regexp-in-string
> +   "caption" "\\captionof{listing}"
> +   caption-str t t)))
> +   ((and (not float) (plist-member attributes :float)) "%s")

This can do for now. Ultimately, however, I think we could merge
`org-latex--wrap-label' into `org-latex--caption/label-string' (which
should then produce "\captionof" command when appropriate). By then, the
`replace-regexp-in-string' would not be needed anymore. WDYT?

In any case, I think you can apply the patch once the docstrings
questions above have been sorted out.


Regards,

-- 
Nicolas Goaziou



Re: [O] CV in orgmode for export to pdf (and html?)

2014-09-19 Thread Brady Trainor

On 9/19/2014 2:18 AM, Rainer M Krug wrote:

Hi

- How do you do it (I don't assume you write your CVs in Word?), or are
you using LaTeX directly?


Nice question, I will enjoy reading all the examples in this thread.

For a bit, I tried to make org do everything, like export resumes to 
Word, Writer, LaTeX and ASCII from one tree. Eventually, I couldn't 
justify managing all the moving parts, but maybe one day...


So I abandoned the export to word processors, though I had succeeded in 
applying template files. Too much going on behind the scenes for me, and 
requests for Word resumes should be rare enough that I just have notes 
on how to quickly format a resume there. After all, with so many OS and 
fonts, sending a Word document across OS can have unpredictable results. 
PDF or plain text is the way to go. (Interpretive dance is okay too.)


And I did have a decent export to LaTeX resume from org, but after 
discovering moderncv, I've switched, though I will be curious to read 
others' methods of org-to-moderncv export.


But what I do still use is export to ASCII, as editing an ASCII resume 
layout is a pain. Here is the crux of my template for that


#+OPTIONS: toc:nil num:nil
#+NAME: setup # I have no idea what this line is for, I found it on worg
#+BEGIN_SRC emacs-lisp :results silent :exports none
(setq org-ascii-headline-spacing '(0 . 1))
(setq org-ascii-inner-margin 5)
(setq org-ascii-underline '((ascii nil ?= nil)))
#+END_SRC

* resume :export:

#+BEGIN_CENTER
Brady Trainor\\
algeb...@uw.edu -- (206) 898-4124
#+END_CENTER

** Experience
*** Jan -Present Position
Location\\
Job description.

... etc.

This is nice for sites that seem to prefer plain text, or demand it. I'm 
considering removing the centering, as some sites seem to remove the 
whitespace up to first character (B).


Brady




Re: [O] [RFC] [PATCH] Warn about unexpanded macros on export

2014-09-19 Thread Nicolas Goaziou
Hello,

Aaron Ecay  writes:

> Currently, if a macro is not defined, it will silently produce an empty
> string while exporting.  This situation could arise for example if a
> macro name is acidentally mistyped.  I think it’s desirable to warn the
> user in this case.  The attached patch introduces a function to do so,
> and shows how it would be integrated in the latex backend.  This raises
> several questions:
>
> 1. Should the warning be a “message” (allows the export process to
>continue) or a “user-error” (stops the export process)?  Or, should
>this be configurable?

Certainly not a message, due to asynchronous export.

> 2. Since this is a feature that many backends will want to use, should
>we introduce a new “abstract” backend from which other backends can
>inherit, which incorporates this feature, and others like it in the
>future?  The idea would be similar to prog-mode in emacs, the major
>mode from which programming-language modes can derive.  The
>alternative is adding the (macro . org-export-macro-warn) entry
>manually to all the relevant backends, and relying on future backend
>authors to do the same.
>
> 3. Should this even be implemented as part of the backend’s
>translate-alist, or at a lower level?

Don't bother with export back-ends, they never get to see macros, which
are expanded very early in the export process. This explains, for
example, why there is no `macro' translator.

You have two options. Either report an error, as you suggested, or
insert an obnoxious message in the output, e.g., "UNKNOWN MACRO", à la
"DEFINITION NOT FOUND." for footnote definitions. In any case, this
should happen in "org-macro.el", not in the export framework.


Regards,

-- 
Nicolas Goaziou



[O] [RFC] [PATCH] [babel] read description lists as lists of lists

2014-09-19 Thread Aaron Ecay

Hello all,

The attached patch makes babel read description lists as lists of the
following format: (("term" "description") ...).  The present default is
to simply read in the text of each list item, yielding:
("term :: description" ...).

Of course, it’s possible to interconvert between the two formats, but I
think the greater structure of this proposal makes things easier for
babel authors.  (Another way of thinking of the proposal is that it
treats description lists like two-column tables.)

What do people think?

Thanks,

-- 
Aaron Ecay
>From a7e01675f2c89fb648e528c3efe535ed0b2389f1 Mon Sep 17 00:00:00 2001
From: Aaron Ecay 
Date: Fri, 19 Sep 2014 14:39:26 -0400
Subject: [PATCH] ob-core.el: Read description lists as lisp lists.

* lisp/ob-core.el (org-babel-read-list): Read description lists as
lisp lists.

This allows description lists to be used as structured input to a
babel block.
---
 lisp/ob-core.el | 18 +++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index e01c4d2..f1661cb 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -2035,9 +2035,21 @@ following the source block."
   (org-table-to-lisp)))
 
 (defun org-babel-read-list ()
-  "Read the list at `point' into emacs-lisp."
-  (mapcar (lambda (el) (org-babel-read el 'inhibit-lisp-eval))
-	  (mapcar #'cadr (cdr (org-list-parse-list)
+  "Read the list at `point' into emacs-lisp.
+
+The result is a list of strings \(the list items), unless the
+input list is a description list.  In that case, the result will
+be a list of lists; each of the latter lists will have two
+elements: the term and the description."
+  (let* ((parsed (org-list-parse-list))
+	 (elements (mapcar #'cadr (cdr parsed
+(if (eq (car parsed) 'descriptive)
+	(mapcar (lambda (el)
+		  (let ((s (split-string el " :: ")))
+		(list (nth 0 s) (mapconcat #'identity (cdr s) " :: "
+		elements)
+  (mapcar (lambda (el) (org-babel-read el 'inhibit-lisp-eval))
+	  elements
 
 (defvar org-link-types-re)
 (defun org-babel-read-link ()
-- 
2.1.0



[O] [RFC] [PATCH] Warn about unexpanded macros on export

2014-09-19 Thread Aaron Ecay
Hello all,

Currently, if a macro is not defined, it will silently produce an empty
string while exporting.  This situation could arise for example if a
macro name is acidentally mistyped.  I think it’s desirable to warn the
user in this case.  The attached patch introduces a function to do so,
and shows how it would be integrated in the latex backend.  This raises
several questions:

1. Should the warning be a “message” (allows the export process to
   continue) or a “user-error” (stops the export process)?  Or, should
   this be configurable?

2. Since this is a feature that many backends will want to use, should
   we introduce a new “abstract” backend from which other backends can
   inherit, which incorporates this feature, and others like it in the
   future?  The idea would be similar to prog-mode in emacs, the major
   mode from which programming-language modes can derive.  The
   alternative is adding the (macro . org-export-macro-warn) entry
   manually to all the relevant backends, and relying on future backend
   authors to do the same.

3. Should this even be implemented as part of the backend’s
   translate-alist, or at a lower level?

Thanks,

-- 
Aaron Ecay
>From 1c9f85bcb93dbc56d01b138f5a4a11ad0933b5c6 Mon Sep 17 00:00:00 2001
From: Aaron Ecay 
Date: Fri, 19 Sep 2014 14:46:37 -0400
Subject: [PATCH] ox: warn if unexpanded macros are found when exporting

* lisp/ox.el (org-export-macro-warn): New function.
* lisp/ox-latex.el: Use it.
---
 lisp/ox-latex.el | 1 +
 lisp/ox.el   | 5 +
 2 files changed, 6 insertions(+)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index f59d6b2..7670ccb 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -65,6 +65,7 @@
 (latex-fragment . org-latex-latex-fragment)
 (line-break . org-latex-line-break)
 (link . org-latex-link)
+(macro . org-export-macro-warn)
 (node-property . org-latex-node-property)
 (paragraph . org-latex-paragraph)
 (plain-list . org-latex-plain-list)
diff --git a/lisp/ox.el b/lisp/ox.el
index f01f951..a4988f4 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -5619,6 +5619,11 @@ to `:default' encoding. If it fails, return S."
 	(plist-get translations :default)
 	s)))
 
+(defun org-export-macro-warn (macro contents info)
+  ;; TODO: should this be a user-error?
+  (message "WARNING: undefined macro %s" (org-element-property :key macro))
+  ;; Return empty string to avoid interfering with the export output.
+  "")
 
 
 ;;; Asynchronous Export
-- 
2.1.0



Re: [O] issue with `org-insert-heading'

2014-09-19 Thread Nicolas Goaziou
Hello,

Oleh  writes:

> I just wanted to point out what I think is a bug in `org-insert-heading'.

[...]

> The effect of this code is that when I do "M-RET" 3 times in a blank
> file, the first two stars don't get a space after them and get
> highlighted differently than the third.

This should be fixed. Thank you for reporting it.


Regards,

-- 
Nicolas Goaziou



Re: [O] [RFC] [PATCH] ox-latex: support :float no with caption for minted listings

2014-09-19 Thread Aaron Ecay
Hi Nicolas,

2014ko abuztuak 28an, Nicolas Goaziou-ek idatzi zuen:
> 
> Hello,
> 
> Aaron Ecay  writes:
> 
>> The other application I can think of is to allow captioned images and
>> tables not to float.  The LaTeX world is full of tutorials on how to
>> un-float floating images and tables, but IME the org community doesn’t
>> ask for this.  (perhaps they implement their own solutions in latex.)
>> 
>> Given that the capt-of package is just two lines of code, defines just
>> one new command, and doesn’t modify any existing code, I’m inclined to
>> the belief that adding it to the default packages list is tolerable.
>> If capt-of is added to the default packages, then > org-latex-listing = nil> source blocks can also be handled.  
> 
> I agree. Do you want to take care of this? This requires an entry in
> ORG-NEWS and some documentation changes too.

See the attached patch.  I updated ORG-NEWS, but the manual
(info "(org) LaTeX specific attributes") is already sufficiently general
IMO.

Thanks,

-- 
Aaron Ecay
>From 15ced3a12b8882292f43eb7351988be4ddf3d63f Mon Sep 17 00:00:00 2001
From: Aaron Ecay 
Date: Sat, 23 Aug 2014 03:16:11 -0400
Subject: [PATCH] ox-latex: support :float nil with caption for minted listings
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* lisp/ox-latex.el (org-latex-src-block): Support :float nil with
caption for minted.
(org-latex-listings): Edit docstring to describe this usecase.
* lisp/org.el (org-latex-default-packages-alist): Add “capt-of”
package.

This takes advantage of the capt-of package’s \captionof command,
which allows to insert a caption (with autogenerated number and
\ref-able label) without creating a floating environment.  One example
of where this is useful is in the case of a minted source code listing
that spans more than one page.  (Latex floats can’t be larger than a
page, generally speaking.)

The listings package handles this case using its own mechanism.
---
 etc/ORG-NEWS | 11 +++
 lisp/org.el  |  2 ++
 lisp/ox-latex.el | 18 +-
 3 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 62181cb..08f813b 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -84,6 +84,9 @@ parameters are now supported: ~:raw~, ~:backend~.  Moreover, there are
 new parameters specific to some pre-defined translators, e.g.,
 ~:environment~ and ~:booktabs~ for ~orgtbl-to-latex~.  See translators
 docstrings (including ~orgtbl-to-generic~) for details.
+*** Non-floating minted listings in Latex export
+It is not possible to specify =#+attr_latex: :float nil= in conjunction with
+source blocks exported by the minted package.
 ** Miscellaneous
 *** File names in links accept are now compatible with URI syntax
 Absolute file names can now start with =///= in addition to =/=. E.g.,
@@ -137,7 +140,7 @@ So you need to replace
 
 : #+HTML_INCLUDE_STYLE: t
 
-by 
+by
 
 : #+OPTIONS: :html-include-style t
 
@@ -191,13 +194,13 @@ of the list.
   now use =amssymb= symbols by default instead.
 
 *** New functions for paragraph motion
-
+
 The commands =C-down= and =C-up= now invoke special commands
 that use knowledge from the org-elements parser to move the cursor
 in a paragraph-like way.
 
 *** New entities in =org-entities.el=
-
+
 Add support for ell, imath, jmath, varphi, varpi, aleph, gimel, beth,
 dalet, cdots, S (§), dag, ddag, colon, therefore, because, triangleq,
 leq, geq, lessgtr, lesseqgtr, ll, lll, gg, ggg, prec, preceq,
@@ -305,7 +308,7 @@ instructions:
 - when updating through ELPA (either from GNU ELPA or from Org ELPA),
   you have to install Org's ELPA package in a session where no Org
   function has been called already.
-  
+
 When in doubt, run =M-x org-version RET= and see if you have a mixed-up
 installation.
 
diff --git a/lisp/org.el b/lisp/org.el
index cd57ec7..1f023be 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4000,6 +4000,7 @@ header, or they will be appended."
 ("" "marvosym"  t)
 ("" "wasysym"   t)
 ("" "amssymb"   t)
+("" "capt-of"   nil)
 ("" "hyperref"  nil)
 "\\tolerance=1000")
   "Alist of default packages to be inserted in the header.
@@ -4021,6 +4022,7 @@ Org mode to function properly:
 - textcomp, marvosymb, wasysym, amssymb: for various symbols used
   for interpreting the entities in `org-entities'.  You can skip
   some of these packages if you don't use any of their symbols.
+- capt-of: for captions on `:float nil' source blocks
 - hyperref: for cross references
 
 Therefore you should not modify this variable unless you know
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index f59d6b2..5d0a31c 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -725,6 +725,18 @@ using customize, or with
   \(require 'ox-latex)
   \(add-to-list 'org-latex-packages-alist '(\"\" \"minted\"))
 
+You can have listings with a caption which nonetheless do not
+float.  This is useful in case th

Re: [O] How to tangle contents of a noweb-ref block that as source block indicators in it?

2014-09-19 Thread Nick Dokos
Grant Rettke  writes:

> Good afternoon,
>
> I work in:
>
> ╭
> │ (print emacs-version)
> │ (print org-version)
> ╰
>
> ╭
> │ "24.3.1"
> │
> │ "8.2.7c"
> ╰
>
> My `org' configuration specifies source blocks like this:
>
> ╭
> │ (setq org-babel-noweb-wrap-start "«")
> │ (setq org-babel-noweb-wrap-end "»")
> ╰
>
> When I tangle this block the output is bit for bit.
>
> When I tangle this other block:
>
> ╭
> │ (wrap-region-add-wrapper "«" "»" "w" 'org-mode) ;; noweb blocks
> ╰
>
> the guillemot is removed.
>
> What I want is to tangle the source block without having the guillemot
> removed.
>
> I did it wrong because I generated this:
>
> ╭
> │ (wrap-region-add-wrapper "" "w" 'org-mode) ;; noweb blocks
> ╰
>
> What should I do to generate the desired output?
>

Just a guess: you probably *evaluated* the first code block, so your
org-babel-noweb-wrap-{start,end} variables got changed, which affected
the second code block. If you leave the markers unchanged, I'd expect it
to work.

Nick




[O] How to tangle contents of a noweb-ref block that as source block indicators in it?

2014-09-19 Thread Grant Rettke
Good afternoon,

I work in:

╭
│ (print emacs-version)
│ (print org-version)
╰

╭
│ "24.3.1"
│
│ "8.2.7c"
╰

My `org' configuration specifies source blocks like this:

╭
│ (setq org-babel-noweb-wrap-start "«")
│ (setq org-babel-noweb-wrap-end "»")
╰

When I tangle this block the output is bit for bit.

When I tangle this other block:

╭
│ (wrap-region-add-wrapper "«" "»" "w" 'org-mode) ;; noweb blocks
╰

the guillemot is removed.

What I want is to tangle the source block without having the guillemot
removed.

I did it wrong because I generated this:

╭
│ (wrap-region-add-wrapper "" "w" 'org-mode) ;; noweb blocks
╰

What should I do to generate the desired output?

Kind regards,

Grant Rettke
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson



Re: [O] CV in orgmode for export to pdf (and html?)

2014-09-19 Thread Tory S. Anderson
Very nice, John. Thanks for sharing the LaTeX! 

John Hendy  writes:

> Like the rest, I picked straight LaTeX, as it just felt like forcing Org to
> do something unnatural, in my opinion. At least, if you get into any sort
> of formatting stuff, it just didn't feel right. Here's some other mailing
> list discussions if you haven't run into them:
> - https://www.mail-archive.com/emacs-orgmode@gnu.org/msg37000.html
> - http://web.archiveorange.com/archive/v/Fv8aAUnm6O4rHfVY6k0p
>
> And a github repo:
> - https://github.com/fasheng/fsh-orgmode-latex-cv
>
> I still have a bookmarks folder in Chromium from when I was hunting around.
> Here are the ones that, apparently, I found worth to make the Ctrl+D cut
> for future reference if you're interested
> -
> http://linux.dsplabs.com.au/resume-writing-example-latex-template-linux-curriculum-vitae-professional-cv-layout-format-text-p54/
> - http://www.latextemplates.com/templates/curriculum_vitaes/6/cv_6.tex
> - http://jblevins.org/projects/cv-template/
> - http://nitens.org/taraborelli/cvtex
>
> I haven't updated mine since 2011, when I updated it for my current job. I
> went with an internal CV so that I could list accomplishments that would be
> considered confidential (patent applications, internal reports, etc.). I
> did create a dummy version, which I've attached (tex/pdf). Re-looking at
> it, I can't decide if I still like it or not. At the time, I was really
> happy with it as my first LaTeX CV :) I'd also probably consider it a
> hybrid CV/resume -- I liked describe some of my previous job
> responsibilities, while including papers/presentations/etc.
>
>
> Good luck!
> John
>
>
> On Fri, Sep 19, 2014 at 5:29 AM, Andreas Kiermeier <
> andreas.kierme...@gmail.com> wrote:
>
>> Hi Rainer,
>>
>> like Tory I prepare my CV using latex directly. I've been using
>> "moderncv" for several years now and have been quite happy with it
>> (though that was before I've started using org). But even now, I can't
>> see how using org, would add to what I already have.
>>
>> Mind you, I tend to add to my CV (mainly publications and experience)
>> and revise it when needed, rather than adapt it to different
>> situations.
>>
>> Cheers,
>>
>> Andreas
>>
>>
>>
>> On 19 September 2014 19:40, Tory S. Anderson 
>> wrote:
>> > I do mine in LaTeX and haven't had a reason to change that. I keep a
>> "Master" CV/resumé with all the gratuitous information in all categories,
>> then make subdirs for each submission and the trimmed-down versions of my
>> resume that I sent out. At this stage in my career–where I am still
>> tailoring resumés to employers and not really keeping a no-holds-barred CV—
>> this is the best workflow I've found. I'm not sure how I'd go about
>> versioning, trimming, and tracking things as neatly in an all-org
>> environment.
>> >
>> > I'm presuming you just want a full-disclosure CV, though? Org makes more
>> sense there.
>> >
>> > Rainer M Krug  writes:
>> >
>> >> Hi
>> >>
>> >> I am looking for examples / templates for CVs written using org, as I
>> >> decided to ose org for my CV.
>>
>>



Re: [O] Changed behaviours of LaTeX exporter in version 8.0+

2014-09-19 Thread Richard Lawrence
Hi Joseph,

"Kyeong Soo (Joseph) Kim"  writes:

> Great thanks for your answering my two questions, especially sharing your
> experience for cross-referencing in LaTeX export.
>
> Though your suggestion for cross-referencing is an excellent workaround, I
> wonder whether there is any benefit using org-mode in writing papers in
> this case; for instance, manual setting of CUSTOM_ID would be a hassle,
> considering that it can be easily & automatically done in LaTeX with
> AUCTeX/RefTeX's label function.

Don't you need to make sure that your sections have a consistent label
in order to refer to them?

At any rate, one of the reasons I use this solution is that I want to be
able to easily use plain LaTeX at points where I discover that I can't
make Org do everything I want.  One of the cases I was worried about,
for example, is having a section reference inside an embedded LaTeX
block.  If you don't know the label ahead of time, you can't use a raw
\ref command inside #+BEGIN_LATEX...#+END_LATEX.  So I like being able
to set the labels via CUSTOM_ID on an as-needed basis. (I don't do it
for every section.)

You might be able to get away with less; it looks to me like the
[[*Foo][Section Foo]] still produces a link to a headline in LaTeX
output.  Does that not work for you?

> I still don't know why the new export engine has brought so many
> compatibility issues in its behavior.  It seems that I'd better go
> back to the prior version (7.X) in order to focus on my research.

The new export engine was a complete re-write, and came with an attempt
to define and standardize Org syntax.  Some of the incompatibilities are
due to that standardization: the old LaTeX and HTML exporters might
treat some text differently, for example, or not deal with some corner
case, so in writing a new export engine, it was necessary to define the
correct behavior.  Other incompatibilities are just bugs that come with
any new piece of software; the exporter is under heavy development and
those are constantly getting fixed.

The new exporter really is a *lot* better, and in my experience it is
worth the effort to upgrade.  I found myself bumping into the
limitations of the pre-8.0 exporter very frequently.  If you don't, you
can wait, but I think you'll find the new exporter a lot easier to work
with and to get help with.

Best,
Richard

OpenPGP Key ID: CF6FA646
Fingerprint: 9969 43E1 CF6F A646

(See http://www.ocf.berkeley.edu/~rwl/encryption.html for more information.)



Re: [O] CV in orgmode for export to pdf (and html?)

2014-09-19 Thread Dan Griswold
Unlike the others, I moved my CV from LaTeX to org-mode and I'm happy with
the results. Two things make it work well.

First, a "cv" class added to org-latex-classes:

(add-to-list '("cv"
"\\documentclass[10pt]{article}\n\\usepackage[margin=.75in]{geometry}\n%\\usepackage{palatino}\n\\usepackage{sectsty}\n\\sectionfont{\\normalsize\\selectfont\\itshape}\n\\usepackage[T1]{fontenc}\n\\usepackage{libertine}\n\\renewcommand*\\oldstylenums[1]{{\\fontfamily{fxlj}\\selectfont
#1}}"
  ("\\section{%s}" . "\\section*{%s}")))

Second, something like the following at the top of the org file (replace
with your particulars):

#+OPTIONS: author:nil timestamp:nil
#+TITLE:
#+DATE:
#+LaTeX_CLASS: cv

#+BEGIN_LATEX
\begin{flushleft}
  \bfseries\Large Curriculum Vitae\hfill Daniel M. Griswold\normalfont
\end{flushleft}

\vspace{-12pt}%
\begin{flushright}
  69 Stratton Road\\
  Rochester, NY 14610\\
  (585) xxx-\\
  dgris...@x.com\\
  \hrulefill
\end{flushright}
#+END_LATEX




On Fri, Sep 19, 2014 at 5:18 AM, Rainer M Krug  wrote:

> Hi
>
> I am looking for examples / templates for CVs written using org, as I
> decided to ose org for my CV.
>
> I fund this oldish conversation
>
> http://lists.gnu.org/archive/html/emacs-orgmode/2012-04/msg00096.html
>
> and these two templates for using org to write a CV:
>
> https://github.com/punchagan/resume
> https://github.com/fasheng/fsh-orgmode-latex-cv
>
> as well this CV without .org file
>
> http://adamsonj.ninth.su/cv.html
>
> Also, there does not seem to be anything on worg.
>
> - Can somebody give any further info on org and CVs?
> - How do you do it (I don't assume you write your CVs in Word?), or are
> you using LaTeX directly?
> - Any other examples and templates online?
>
> If I get enough, I will compile a summary for worg, but I need examples
> and information.
>
> Thanks,
>
> Rainer
>
> --
> Rainer M. Krug
> email: Rainerkrugsde
> PGP: 0x0F52F982
>


[O] inconsistency -- agenda, jump to specific day

2014-09-19 Thread hymie!
So I think I found an inconsistency in the agenda and/or in the docs.
Maybe it's just my lack of understanding as usual, but here goes.

Emacs  : GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601) of 2013-03-17 on MARVIN
Package: Org-mode version 8.2.7c (8.2.7c-dist @ 
c:/ProgramData/Microsoft/Windows/Start Menu/Programs/emacs-24.3/lisp/org/)

According to the docuemntation:
>v d or short d (org-agenda-day-view)
>v w or short w (org-agenda-week-view)
>v t (org-agenda-fortnight-view)
>v m (org-agenda-month-view)
>v y (org-agenda-year-view)
>v SPC (org-agenda-reset-view)
>Switch to day/week/month/year view. When switching to day or
>week view, this setting becomes the default for subsequent agenda
>refreshes. Since month and year views are slow to create, they do not
>become the default. A numeric prefix argument may be used to jump
>directly to a specific day of the year, ISO week, month, or year,
>respectively. For example, 32 d jumps to February 1st, 9 w to ISO
>week number 9.

"d", however, does not work that way.  Using a numberic prefix before
"d" jumps to that specific day of the **month**, not of the year.
So when I'm looking at the current agenda (for week 15 Sep - 21 Sep),
"5d" takes me to Sept 5th, "26d" takes me to Sept 26th, 35d takes me
to October 5th (the 35th "day of September").

Note that the "current month" had changed, so now, "5d" takes me to
October 5th, not September 5th any more.  To me that's another
inconsistency, but I could see where it's a "feature" and not a "bug".

This is a problem for me because my employer actually **uses** Day Of Year.
So something happening today (19 sep 2014), I would log it as 2014-262.
Being able to jump directly to day 262 would be a very handy feature
for me.

Then, the documentation says
>When setting day, week, or month view, a year may be encoded in the
>prefix argument as well. For example, 200712 w will jump to week 12
>in 2007.  If such a year specification has only one or two digits,
>it will be mapped to the interval 1938-2037.

This does not work with day.  "1407w" indeed takes me to the 7th week of
2014.  From there, "1407d" takes me to December 8th 2017, which I haven't
counted but I think is the "1407th day of February 2014".

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net




Re: [O] Creating new org headers from code blocks

2014-09-19 Thread Rainer M Krug
Thorsten Jolitz  writes:

> Rainer M Krug  writes:
>
>> Thorsten Jolitz  writes:
>>
>>> Rainer M Krug  writes:
>>>
 Thorsten Jolitz  writes:
 I don't quite understand your code below and what it is supposed to do.
>>>
>>> Drawers are probably better in most cases, but this code lets you use
>>> ':results pp replace' while developing, but converts the fixed-width pp
>>> results into raw results when desired (e.g. in a buffer copy before some
>>> action is taken).
>>
>> OK - I see. But what is the advantage in this approach? Drawer do
>> perfectly what I want, i.e. encapsulating an org structure in a for
>> replacement when re-calculated, inside the drawer they behave like
>> normal org structure (folding, ...) and upon export they are exported as
>> org code would be - or am I missing something?
>
> There are none (for you) then, but it might be useful anyway in some
> situations, at least the results look more like part of the document
> when you care about the looks of the org file too (not only the export
> results). 

True.

Thanks a lot,

Rainer

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


pgpRmREnKgjTr.pgp
Description: PGP signature


Re: [O] Creating new org headers from code blocks

2014-09-19 Thread Thorsten Jolitz
Rainer M Krug  writes:

> Thorsten Jolitz  writes:
>
>> Rainer M Krug  writes:
>>
>>> Thorsten Jolitz  writes:
>>> I don't quite understand your code below and what it is supposed to do.
>>
>> Drawers are probably better in most cases, but this code lets you use
>> ':results pp replace' while developing, but converts the fixed-width pp
>> results into raw results when desired (e.g. in a buffer copy before some
>> action is taken).
>
> OK - I see. But what is the advantage in this approach? Drawer do
> perfectly what I want, i.e. encapsulating an org structure in a for
> replacement when re-calculated, inside the drawer they behave like
> normal org structure (folding, ...) and upon export they are exported as
> org code would be - or am I missing something?

There are none (for you) then, but it might be useful anyway in some
situations, at least the results look more like part of the document
when you care about the looks of the org file too (not only the export
results). 

-- 
cheers,
Thorsten




Re: [O] list of agenda files in a file

2014-09-19 Thread Nick Dokos
hy...@lactose.homelinux.net writes:

> Eric S Fraga writes:
>>
>>>(setq org-agenda-files (quote ("~/org/agenda.file.list")))
>>
>>which sets the variable to a list of one string, which is *not* what you
>>want.  Try
>>(setq org-agenda-files "~/org/agenda.file.list")
>
> Oh.  Thank you very much.
>
> I have and/or see things like this:
>  (setq org-tags-exclude-from-inheritance (quote ("crypt")))
>  org-agenda-span (quote month)
>  org-agenda-files (quote ("~/org/project.org"))
>
> and I know that "cons" makes a list.  I didn't realize that "quote"
> also makes a list.
>

`quote' does not make a list - it just prevents evaluation. It's the
inner parentheses you used that made it into a list.

(setq org-agenda-files (quote "~/org/agenda.file.list"))

would work fine, but since strings evaluate to themselves, the quote
is unnecessary in this case.

The point is that lisp generally evaluates arguments to function calls
*before* calling the function (there are things called "special forms"
that do not follow this general rule: e.g setq is a special form that
does not evaluate its first argument). So if you want to call a function
but not evaluate its argument, you have to quote the argument.

-- 
Nick




Re: [O] Creating new org headers from code blocks

2014-09-19 Thread Rainer M Krug
Thorsten Jolitz  writes:

> Rainer M Krug  writes:
>
>> Thorsten Jolitz  writes:
>> I don't quite understand your code below and what it is supposed to do.
>
> Drawers are probably better in most cases, but this code lets you use
> ':results pp replace' while developing, but converts the fixed-width pp
> results into raw results when desired (e.g. in a buffer copy before some
> action is taken).

OK - I see. But what is the advantage in this approach? Drawer do
perfectly what I want, i.e. encapsulating an org structure in a for
replacement when re-calculated, inside the drawer they behave like
normal org structure (folding, ...) and upon export they are exported as
org code would be - or am I missing something?

Rainer



>
>>> #+BEGIN_SRC emacs-lisp :results none
>>>   (defvar tj/fixed-width-to-raw-langs '("R")
>>> "List of Babel langs for `tj/fixed-width-to-raw-results'.")
>>>
>>>   (defun tj/fixed-width-to-raw-results ()
>>> "Call `org-toggle-fixed-width' on ':results pp'."
>>> (org-babel-map-src-blocks nil
>>>   (and (member lang tj/toggle-fixed-width-src-block-langs)
>>>(member "pp" (split-string header-args " " t))
>>>(save-excursion
>>>  (goto-char (org-babel-where-is-src-block-result))
>>>  (forward-line)
>>>  (while (org-in-fixed-width-region-p)
>>>(org-toggle-fixed-width)
>>>(forward-line))
>>>
>>> #+END_SRC
>>> #+begin_src R :results pp replace
>>>  c("** New header2", "[[./graph1.pdf]]", "", "** and second header", "and 
>>> some text" )
>>> #+end_src
>>>
>>> #+results:
>>> : ** New header2
>>> : [[./graph1.pdf]]
>>> : 
>>> : ** and second header
>>> : and some text

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


pgpd83LJU_zOB.pgp
Description: PGP signature


Re: [O] Creating new org headers from code blocks

2014-09-19 Thread Thorsten Jolitz
Rainer M Krug  writes:

> Thorsten Jolitz  writes:
> I don't quite understand your code below and what it is supposed to do.

Drawers are probably better in most cases, but this code lets you use
':results pp replace' while developing, but converts the fixed-width pp
results into raw results when desired (e.g. in a buffer copy before some
action is taken).

>> #+BEGIN_SRC emacs-lisp :results none
>>   (defvar tj/fixed-width-to-raw-langs '("R")
>> "List of Babel langs for `tj/fixed-width-to-raw-results'.")
>>
>>   (defun tj/fixed-width-to-raw-results ()
>> "Call `org-toggle-fixed-width' on ':results pp'."
>> (org-babel-map-src-blocks nil
>>   (and (member lang tj/toggle-fixed-width-src-block-langs)
>>(member "pp" (split-string header-args " " t))
>>(save-excursion
>>  (goto-char (org-babel-where-is-src-block-result))
>>  (forward-line)
>>  (while (org-in-fixed-width-region-p)
>>(org-toggle-fixed-width)
>>(forward-line))
>>
>> #+END_SRC
>> #+begin_src R :results pp replace
>>  c("** New header2", "[[./graph1.pdf]]", "", "** and second header", "and 
>> some text" )
>> #+end_src
>>
>> #+results:
>> : ** New header2
>> : [[./graph1.pdf]]
>> : 
>> : ** and second header
>> : and some text

-- 
cheers,
Thorsten




[O] issue with `org-insert-heading'

2014-09-19 Thread Oleh
Hi all,

I just wanted to point out what I think is a bug in `org-insert-heading'.
The abridged code:

#+begin_src elisp
(let ((adjust-empty-lines t))
  ;; code that does not change `adjust-empty-lines'
  (when adjust-empty-lines
(if (or (not blank)
(and blank (not (org-previous-line-empty-p
(org-N-empty-lines-before-current (if blank 1 0)
#+end_src

So at the very least there's test that always returns t.

The effect of this code is that when I do "M-RET" 3 times in a blank
file, the first two stars don't get a space after them and get
highlighted differently than the third.
Calling `outline-previous-heading' from the third star moves point to
the first star and not the second, which means that they're not
recognized as proper headings.

What I think 3 "M-RET" should do is to insert a space after each star.
That way they are proper headings with empty headlines.

best regards,
Oleh



Re: [O] Creating new org headers from code blocks

2014-09-19 Thread Rainer M Krug
Thorsten Jolitz  writes:

> Rainer M Krug  writes:
>
> Hi,
>
>> I have some R code which generates several graphics. I would now like to
>> generate in R text which is then interpreted by org, upon export, as
>> normal org code. Furthermore, I would like to create new org headers from
>> the R code. Imagine I have the R code block below. Executed, I get the
>> results below:
>>
>> --8<---cut here---start->8---
>> * Some code block
>> #+begin_src R :results raw :wrap :exports both
>> c("** New header", "[[./graph1.pdf]]", "", "** and second header", "and some 
>> text" )
>> #+end_src
>>
>> #+RESULTS:
>> #+BEGIN_RESULTS
>> ,** New header
>> [[./graph1.pdf]]
>>
>> ,** and second header
>> and some text
>> #+END_RESULTS
>> --8<---cut here---end--->8---
>>
>> I can leave the :wrap, but then the results are not overwritten, but
>> appended - otherwise it works as expected.
>>
>> How can I achieve that I get 
>>
>> ,
>> | ** New header
>> | [[./graph1.pdf]]
>> | 
>> | ** and second header
>> | and some text
>> `
>>
>> in the org file, but also that the result gets overwritten upon repeated
>> execution?
>
> I asked about this ':results raw' limitation before and was told to RTFM
> ;)
>
> (although its not really on the page where I would look for it:
> http://orgmode.org/manual/results.html).

Thanks for pointing me to RTFM - there I found "drawer" and

,
| #+begin_src R :results  raw drawer 
| c("*** Mean", "[[file:./netimpacts_mean.pdf]]","", "*** 
Mode","[[file:./netimpacts_mode.pdf]]")
| #+end_src
`

results in

,
| #+RESULTS:
| :RESULTS:
| *** Mean
| [[file:./netimpacts_mean.pdf]]
| 
| *** Mode
| [[file:./netimpacts_mode.pdf]]
| :END:
`

which is nicely highlighted as headers, exported as headers and
replaced.

Perfect.

I don't quite understand your code below and what it is supposed to do.

Thanks,

Rainer

>
> You could look-up that thread in the mailing-list for some tips, and/or
> use this on a temporary buffer-copy just before you want to act on the
> raw results:

>
> #+BEGIN_SRC emacs-lisp :results none
>   (defvar tj/fixed-width-to-raw-langs '("R")
> "List of Babel langs for `tj/fixed-width-to-raw-results'.")
>
>   (defun tj/fixed-width-to-raw-results ()
> "Call `org-toggle-fixed-width' on ':results pp'."
> (org-babel-map-src-blocks nil
>   (and (member lang tj/toggle-fixed-width-src-block-langs)
>(member "pp" (split-string header-args " " t))
>(save-excursion
>  (goto-char (org-babel-where-is-src-block-result))
>  (forward-line)
>  (while (org-in-fixed-width-region-p)
>(org-toggle-fixed-width)
>(forward-line))
>
> #+END_SRC
> #+begin_src R :results pp replace
>  c("** New header2", "[[./graph1.pdf]]", "", "** and second header", "and 
> some text" )
> #+end_src
>
> #+results:
> : ** New header2
> : [[./graph1.pdf]]
> : 
> : ** and second header
> : and some text

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


pgpJN3q49dtBF.pgp
Description: PGP signature


Re: [O] Creating new org headers from code blocks

2014-09-19 Thread Thorsten Jolitz
Rainer M Krug  writes:

Hi,

> I have some R code which generates several graphics. I would now like to
> generate in R text which is then interpreted by org, upon export, as
> normal org code. Furthermore, I would like to create new org headers from
> the R code. Imagine I have the R code block below. Executed, I get the
> results below:
>
> --8<---cut here---start->8---
> * Some code block
> #+begin_src R :results raw :wrap :exports both
> c("** New header", "[[./graph1.pdf]]", "", "** and second header", "and some 
> text" )
> #+end_src
>
> #+RESULTS:
> #+BEGIN_RESULTS
> ,** New header
> [[./graph1.pdf]]
>
> ,** and second header
> and some text
> #+END_RESULTS
> --8<---cut here---end--->8---
>
> I can leave the :wrap, but then the results are not overwritten, but
> appended - otherwise it works as expected.
>
> How can I achieve that I get 
>
> ,
> | ** New header
> | [[./graph1.pdf]]
> | 
> | ** and second header
> | and some text
> `
>
> in the org file, but also that the result gets overwritten upon repeated
> execution?

I asked about this ':results raw' limitation before and was told to RTFM
;)

(although its not really on the page where I would look for it:
http://orgmode.org/manual/results.html).

You could look-up that thread in the mailing-list for some tips, and/or
use this on a temporary buffer-copy just before you want to act on the
raw results:

#+BEGIN_SRC emacs-lisp :results none
  (defvar tj/fixed-width-to-raw-langs '("R")
"List of Babel langs for `tj/fixed-width-to-raw-results'.")

  (defun tj/fixed-width-to-raw-results ()
"Call `org-toggle-fixed-width' on ':results pp'."
(org-babel-map-src-blocks nil
  (and (member lang tj/toggle-fixed-width-src-block-langs)
   (member "pp" (split-string header-args " " t))
   (save-excursion
 (goto-char (org-babel-where-is-src-block-result))
 (forward-line)
 (while (org-in-fixed-width-region-p)
   (org-toggle-fixed-width)
   (forward-line))

#+END_SRC

#+begin_src R :results pp replace
 c("** New header2", "[[./graph1.pdf]]", "", "** and second header", "and some 
text" )
#+end_src

#+results:
: ** New header2
: [[./graph1.pdf]]
: 
: ** and second header
: and some text

-- 
cheers,
Thorsten




Re: [O] list of agenda files in a file

2014-09-19 Thread hymie
Eric S Fraga writes:
>
>>(setq org-agenda-files (quote ("~/org/agenda.file.list")))
>
>which sets the variable to a list of one string, which is *not* what you
>want.  Try
>(setq org-agenda-files "~/org/agenda.file.list")

Oh.  Thank you very much.

I have and/or see things like this:
 (setq org-tags-exclude-from-inheritance (quote ("crypt")))
 org-agenda-span (quote month)
 org-agenda-files (quote ("~/org/project.org"))

and I know that "cons" makes a list.  I didn't realize that "quote"
also makes a list.

TIL.

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net



[O] header arguments, inheritance, and noweb expansion Was: «Macro» expansion in source blocks; code-sharing between blocks

2014-09-19 Thread Rainer M Krug
Andreas Kiermeier  writes:

> Thanks Rainer,
>
> but unfortunately this isn't working. I'm sure I'm doing something
> wrong ... somewhere.
>
> In case this makes any difference I have in the document header:
>
> #+PROPERTY: header-args:R :session *R*
> #+PROPERTY: header-args :results output graphics :exports results
>
> I've now changed the source block header to ":exports none :eval no"
> but now there really is nothing in the output.
>
> In fact, the corresponding .tex file now contains:
>
> \begin{table}[h]
> \label{tbl:refyear}
> \caption{Separation outcomes (death or any type of discharge) by
> reference year.}
> nil
> \end{table}
>
> and in the *Message* buffer I now have:
>
> Evaluation of this R code-block (tbl-refyear) is disabled.
> org-babel-exp processing...
> Evaluation of this R code-block (tbl-refyear) is disabled.
> executing Latex code block...
>
> So, this source block really doesn't evaluated at all.

This boils down to the question I asked earlier about header-args and
+header args, inheritance of header arguments and this in contrast to
normal header args.  

Based on this discussion, I thought that the header arguments count
*where the code is executed* and not where it is defined - well -
surprise for me.

You could try and put the code block with the definition of the code
into a subtree where you set

,
| :PROPERTIES:
| :headser-args+: eval no
| :END:
`

This might work?

Rainer

>
> Thanks
>
> Andreas
>
> On 19 September 2014 18:34, Rainer M Krug  wrote:
>> Andreas Kiermeier  writes:
>>
>>> I don't think you need the ":noweb yes" as part of the setup_fu
>>> header, as this block is not pulling in other materials.
>>>
>>> Having used this type of setup only over the last couple of days, I've
>>> come up with another question. It appears that the setup_fu is
>>> executed twice ... once as it's own source block (though by itself not
>>> need) and once as part of the second noweb block. This isn't a problem
>>> if the execution time is small, but I'm trying to create a summary
>>> table in Latex format from 2 million records - so the time is
>>> considerable.
>>>
>>
>> Check out the :eval header argument: if you use
>>
>> ,
>> | #+BEGIN_SRC R :eval never :exports none
>> `
>>
>> this block is never executed - this should work. There are also other
>> values for :eval. From the help:
>>
>> ,
>> | 14.8.2.25 `:eval'
>> | .
>> |
>> | The `:eval' header argument can be used to limit the evaluation of
>> | specific code blocks.  The `:eval' header argument can be useful for
>> | protecting against the evaluation of dangerous code blocks or to ensure
>> | that evaluation will require a query regardless of the value of the
>> | `org-confirm-babel-evaluate' variable.  The possible values of `:eval'
>> | and their effects are shown below.
>> |
>> | `never or no'
>> |  The code block will not be evaluated under any circumstances.
>> |
>> | `query'
>> |  Evaluation of the code block will require a query.
>> |
>> | `never-export or no-export'
>> |  The code block will not be evaluated during export but may still
>> |  be called interactively.
>> |
>> | `query-export'
>> |  Evaluation of the code block during export will require a query.
>> |
>> |If this header argument is not set then evaluation is determined by
>> | the value of the `org-confirm-babel-evaluate' variable see *Note Code
>> | evaluation security::.
>> `
>>
>> Cheers,
>>
>> Rainer
>>
>>
>>> My two blocks (with some code removed for simplicity) are as follow:
>>>
>>> #+NAME: tbl-refyear
>>> #+BEGIN_SRC R :results silent :exports none
>>>   latex(tabular(   ))
>>> #+END_SRC
>>>
>>> #+BEGIN_SRC latex :noweb yes
>>> \begin{table}[h]
>>> \label{tbl:refyear}
>>> \caption{Separation outcomes (death or any type of discharge) by
>>> reference year.}
>>> <>
>>> \end{table}
>>> #+END_SRC
>>>
>>> I've tried :cache yes as part of the tbl-refyear source block, but
>>> that didn't stop if from being run twice. Am I missing a suitable
>>> header argument?
>>>
>>> This is the only way I could find to wrap the latex table (which has
>>> some complex formatting and hence why I've used it over just producing
>>> a table) in a float with a caption (though I still can't properly
>>> reference the label when I export to a PDF file).
>>>
>>> Any thought would be greatly appreciated. TIA!
>>>
>>> Andreas
>
>

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


pgpbJDZT3tku8.pgp
Description: PGP signature


Re: [O] list of agenda files in a file

2014-09-19 Thread Eric S Fraga
On Friday, 19 Sep 2014 at 10:41, hymie! wrote:
> In our last episode, the evil Dr. Lacto had captured our hero,
>   Thorsten Jolitz , who said:
>>
>>Read again! =>
>
>
>>| If the value of the variable is not a list but a single file name,
>>| then^
>
> That's what I did.
>
>(setq org-agenda-files (quote ("~/org/agenda.file.list")))

which sets the variable to a list of one string, which is *not* what you
want.  Try

(setq org-agenda-files "~/org/agenda.file.list")

instead.  A single file name versus a list with a single file name are
very different constructs!
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.1, Org release_8.3beta-360-ge17ee8


signature.asc
Description: PGP signature


Re: [O] list of agenda files in a file

2014-09-19 Thread hymie!
In our last episode, the evil Dr. Lacto had captured our hero,
  Thorsten Jolitz , who said:
>
>Read again! =>

>| If the value of the variable is not a list but a single file name,
>| then^

That's what I did.

   (setq org-agenda-files (quote ("~/org/agenda.file.list")))

A single file name.

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net




Re: [O] [PATCH][mini] bulk-mark-regexp and -toggle also with time grid

2014-09-19 Thread marcowahlsoft
> (org-agenda-bulk-mark-all)
>
> Mark all entries for future agenda bulk action.

> Currently this is not true if there is a time grid in the agenda buffer.
>
> Please consider to apply the attached patch.

I forgot one line in the previous patch.  Please consider the new patch only.

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index dbc9861..1bec8dc 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -9680,7 +9680,7 @@ This is a command that has to be installed in `calendar-mode-map'."
 	  (overlay-put ov 'type 'org-marked-entry-overlay))
 	(end-of-line 1)
 	(or (ignore-errors
-	  (goto-char (next-single-property-change (point) 'txt)))
+	  (goto-char (next-single-property-change (point) 'org-hd-marker)))
 	(beginning-of-line 2))
 	(while (and (get-char-property (point) 'invisible) (not (eobp)))
 	  (beginning-of-line 2))
@@ -9698,7 +9698,7 @@ This is a command that has to be installed in `calendar-mode-map'."
   (let ((entries-marked 0) txt-at-point)
 (save-excursion
   (goto-char (point-min))
-  (goto-char (next-single-property-change (point) 'txt))
+  (goto-char (next-single-property-change (point) 'org-hd-marker))
   (while (and (re-search-forward regexp nil t)
 		  (setq txt-at-point (get-text-property (point) 'txt)))
 	(when (string-match regexp txt-at-point)
@@ -9734,7 +9734,7 @@ This is a command that has to be installed in `calendar-mode-map'."
   (save-excursion
 (goto-char (point-min))
 (while (ignore-errors
-	 (goto-char (next-single-property-change (point) 'txt)))
+	 (goto-char (next-single-property-change (point) 'org-hd-marker)))
   (org-agenda-bulk-toggle
 
 (defun org-agenda-bulk-toggle ()


Sorry for the extra noise,  Marco
-- 
http://www.wahlzone.de
PGP: 0x0A3AE6F2


Re: [O] CV in orgmode for export to pdf (and html?)

2014-09-19 Thread Andreas Kiermeier
Hi Rainer,

like Tory I prepare my CV using latex directly. I've been using
"moderncv" for several years now and have been quite happy with it
(though that was before I've started using org). But even now, I can't
see how using org, would add to what I already have.

Mind you, I tend to add to my CV (mainly publications and experience)
and revise it when needed, rather than adapt it to different
situations.

Cheers,

Andreas



On 19 September 2014 19:40, Tory S. Anderson  wrote:
> I do mine in LaTeX and haven't had a reason to change that. I keep a "Master" 
> CV/resumé with all the gratuitous information in all categories, then make 
> subdirs for each submission and the trimmed-down versions of my resume that I 
> sent out. At this stage in my career–where I am still tailoring resumés to 
> employers and not really keeping a no-holds-barred CV— this is the best 
> workflow I've found. I'm not sure how I'd go about versioning, trimming, and 
> tracking things as neatly in an all-org environment.
>
> I'm presuming you just want a full-disclosure CV, though? Org makes more 
> sense there.
>
> Rainer M Krug  writes:
>
>> Hi
>>
>> I am looking for examples / templates for CVs written using org, as I
>> decided to ose org for my CV.



Re: [O] «Macro» expansion in source blocks; code-sharing between blocks

2014-09-19 Thread Andreas Kiermeier
Thanks Rainer,

but unfortunately this isn't working. I'm sure I'm doing something
wrong ... somewhere.

In case this makes any difference I have in the document header:

#+PROPERTY: header-args:R :session *R*
#+PROPERTY: header-args :results output graphics :exports results

I've now changed the source block header to ":exports none :eval no"
but now there really is nothing in the output.

In fact, the corresponding .tex file now contains:

\begin{table}[h]
\label{tbl:refyear}
\caption{Separation outcomes (death or any type of discharge) by
reference year.}
nil
\end{table}

and in the *Message* buffer I now have:

Evaluation of this R code-block (tbl-refyear) is disabled.
org-babel-exp processing...
Evaluation of this R code-block (tbl-refyear) is disabled.
executing Latex code block...

So, this source block really doesn't evaluated at all.

Thanks

Andreas

On 19 September 2014 18:34, Rainer M Krug  wrote:
> Andreas Kiermeier  writes:
>
>> I don't think you need the ":noweb yes" as part of the setup_fu
>> header, as this block is not pulling in other materials.
>>
>> Having used this type of setup only over the last couple of days, I've
>> come up with another question. It appears that the setup_fu is
>> executed twice ... once as it's own source block (though by itself not
>> need) and once as part of the second noweb block. This isn't a problem
>> if the execution time is small, but I'm trying to create a summary
>> table in Latex format from 2 million records - so the time is
>> considerable.
>>
>
> Check out the :eval header argument: if you use
>
> ,
> | #+BEGIN_SRC R :eval never :exports none
> `
>
> this block is never executed - this should work. There are also other
> values for :eval. From the help:
>
> ,
> | 14.8.2.25 `:eval'
> | .
> |
> | The `:eval' header argument can be used to limit the evaluation of
> | specific code blocks.  The `:eval' header argument can be useful for
> | protecting against the evaluation of dangerous code blocks or to ensure
> | that evaluation will require a query regardless of the value of the
> | `org-confirm-babel-evaluate' variable.  The possible values of `:eval'
> | and their effects are shown below.
> |
> | `never or no'
> |  The code block will not be evaluated under any circumstances.
> |
> | `query'
> |  Evaluation of the code block will require a query.
> |
> | `never-export or no-export'
> |  The code block will not be evaluated during export but may still
> |  be called interactively.
> |
> | `query-export'
> |  Evaluation of the code block during export will require a query.
> |
> |If this header argument is not set then evaluation is determined by
> | the value of the `org-confirm-babel-evaluate' variable see *Note Code
> | evaluation security::.
> `
>
> Cheers,
>
> Rainer
>
>
>> My two blocks (with some code removed for simplicity) are as follow:
>>
>> #+NAME: tbl-refyear
>> #+BEGIN_SRC R :results silent :exports none
>>   latex(tabular(   ))
>> #+END_SRC
>>
>> #+BEGIN_SRC latex :noweb yes
>> \begin{table}[h]
>> \label{tbl:refyear}
>> \caption{Separation outcomes (death or any type of discharge) by
>> reference year.}
>> <>
>> \end{table}
>> #+END_SRC
>>
>> I've tried :cache yes as part of the tbl-refyear source block, but
>> that didn't stop if from being run twice. Am I missing a suitable
>> header argument?
>>
>> This is the only way I could find to wrap the latex table (which has
>> some complex formatting and hence why I've used it over just producing
>> a table) in a float with a caption (though I still can't properly
>> reference the label when I export to a PDF file).
>>
>> Any thought would be greatly appreciated. TIA!
>>
>> Andreas



Re: [O] «Macro» expansion in source blocks; code-sharing between blocks

2014-09-19 Thread Andreas Kiermeier
Hi Chuck

On 19 September 2014 12:29, Charles Berry  wrote:
>
> Why not use library(xtable) and do it all in R?
>
> If you are not sure this is the right choice, I suggest you look at the
> help page for print.xtable - you have a lot of control over caption,
> label, positioning, etc.

I was trying to do that with "latex(tabular( ...))" though I can see
that I can wrap the table in a floating table environment with xtable.

In fact, I did look at xtable before settling on the above approach,
which I did because tabular does create some nice tables, including
multiple levels and totals. I was trying to avoid R's simple "table" &
prop table functions and having to construct the table and various
headings myself before wrapping it up in xtable(). But maybe that's
the way to go.

Thanks,

Andreas



Re: [O] CV in orgmode for export to pdf (and html?)

2014-09-19 Thread Tory S. Anderson
I do mine in LaTeX and haven't had a reason to change that. I keep a "Master" 
CV/resumé with all the gratuitous information in all categories, then make 
subdirs for each submission and the trimmed-down versions of my resume that I 
sent out. At this stage in my career–where I am still tailoring resumés to 
employers and not really keeping a no-holds-barred CV— this is the best 
workflow I've found. I'm not sure how I'd go about versioning, trimming, and 
tracking things as neatly in an all-org environment. 

I'm presuming you just want a full-disclosure CV, though? Org makes more sense 
there. 

Rainer M Krug  writes:

> Hi
>
> I am looking for examples / templates for CVs written using org, as I
> decided to ose org for my CV.
>
> I fund this oldish conversation
>
> http://lists.gnu.org/archive/html/emacs-orgmode/2012-04/msg00096.html
>
> and these two templates for using org to write a CV:
>
> https://github.com/punchagan/resume
> https://github.com/fasheng/fsh-orgmode-latex-cv
>
> as well this CV without .org file
>
> http://adamsonj.ninth.su/cv.html
>
> Also, there does not seem to be anything on worg.
>
> - Can somebody give any further info on org and CVs? 
> - How do you do it (I don't assume you write your CVs in Word?), or are
> you using LaTeX directly?
> - Any other examples and templates online?
>
> If I get enough, I will compile a summary for worg, but I need examples
> and information.
>
> Thanks,
>
> Rainer



[O] Creating new org headers from code blocks

2014-09-19 Thread Rainer M Krug
Hi

I have some R code which generates several graphics. I would now like to
generate in R text which is then interpreted by org, upon export, as
normal org code. Furthermore, I would like to create new org headers from
the R code. Imagine I have the R code block below. Executed, I get the
results below:

--8<---cut here---start->8---
* Some code block
#+begin_src R :results raw :wrap :exports both
c("** New header", "[[./graph1.pdf]]", "", "** and second header", "and some 
text" )
#+end_src

#+RESULTS:
#+BEGIN_RESULTS
,** New header
[[./graph1.pdf]]

,** and second header
and some text
#+END_RESULTS
--8<---cut here---end--->8---

I can leave the :wrap, but then the results are not overwritten, but
appended - otherwise it works as expected.

How can I achieve that I get 

,
| ** New header
| [[./graph1.pdf]]
| 
| ** and second header
| and some text
`

in the org file, but also that the result gets overwritten upon repeated
execution?

Thanks,

Rainer


-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


pgpQmGrnCbxSz.pgp
Description: PGP signature


[O] CV in orgmode for export to pdf (and html?)

2014-09-19 Thread Rainer M Krug
Hi

I am looking for examples / templates for CVs written using org, as I
decided to ose org for my CV.

I fund this oldish conversation

http://lists.gnu.org/archive/html/emacs-orgmode/2012-04/msg00096.html

and these two templates for using org to write a CV:

https://github.com/punchagan/resume
https://github.com/fasheng/fsh-orgmode-latex-cv

as well this CV without .org file

http://adamsonj.ninth.su/cv.html

Also, there does not seem to be anything on worg.

- Can somebody give any further info on org and CVs? 
- How do you do it (I don't assume you write your CVs in Word?), or are
you using LaTeX directly?
- Any other examples and templates online?

If I get enough, I will compile a summary for worg, but I need examples
and information.

Thanks,

Rainer

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


pgpSurobKC8r5.pgp
Description: PGP signature


Re: [O] «Macro» expansion in source blocks; code-sharing between blocks

2014-09-19 Thread Rainer M Krug
Andreas Kiermeier  writes:

> I don't think you need the ":noweb yes" as part of the setup_fu
> header, as this block is not pulling in other materials.
>
> Having used this type of setup only over the last couple of days, I've
> come up with another question. It appears that the setup_fu is
> executed twice ... once as it's own source block (though by itself not
> need) and once as part of the second noweb block. This isn't a problem
> if the execution time is small, but I'm trying to create a summary
> table in Latex format from 2 million records - so the time is
> considerable.
>

Check out the :eval header argument: if you use 

,
| #+BEGIN_SRC R :eval never :exports none
`

this block is never executed - this should work. There are also other
values for :eval. From the help:

,
| 14.8.2.25 `:eval'
| .
| 
| The `:eval' header argument can be used to limit the evaluation of
| specific code blocks.  The `:eval' header argument can be useful for
| protecting against the evaluation of dangerous code blocks or to ensure
| that evaluation will require a query regardless of the value of the
| `org-confirm-babel-evaluate' variable.  The possible values of `:eval'
| and their effects are shown below.
| 
| `never or no'
|  The code block will not be evaluated under any circumstances.
| 
| `query'
|  Evaluation of the code block will require a query.
| 
| `never-export or no-export'
|  The code block will not be evaluated during export but may still
|  be called interactively.
| 
| `query-export'
|  Evaluation of the code block during export will require a query.
| 
|If this header argument is not set then evaluation is determined by
| the value of the `org-confirm-babel-evaluate' variable see *Note Code
| evaluation security::.
`

Cheers,

Rainer


> My two blocks (with some code removed for simplicity) are as follow:
>
> #+NAME: tbl-refyear
> #+BEGIN_SRC R :results silent :exports none
>   latex(tabular(   ))
> #+END_SRC
>
> #+BEGIN_SRC latex :noweb yes
> \begin{table}[h]
> \label{tbl:refyear}
> \caption{Separation outcomes (death or any type of discharge) by
> reference year.}
> <>
> \end{table}
> #+END_SRC
>
> I've tried :cache yes as part of the tbl-refyear source block, but
> that didn't stop if from being run twice. Am I missing a suitable
> header argument?
>
> This is the only way I could find to wrap the latex table (which has
> some complex formatting and hence why I've used it over just producing
> a table) in a float with a caption (though I still can't properly
> reference the label when I export to a PDF file).
>
> Any thought would be greatly appreciated. TIA!
>
> Andreas
>
> On 18 September 2014 23:31, Eric S Fraga  wrote:
>>
>> On Thursday, 18 Sep 2014 at 13:26, Tobias Getzner wrote:
>> > On Thu, 18 Sep 2014 13:17:14 +, Tobias Getzner wrote:
>> >
>> >> Are there any convenient inline-expansion methods I might have
>> >> overlooked?
>> >
>> > To illustrate, I was wondering if any of the following is feasible
>> > somehow:
>>
>> Yes, and you almost got it right with your syntactic expansion:
>>
>> #+begin_src org
>>
>>   ,* Syntactic expansion
>>
>>   ,#+name: setup_fu
>>   ,#+begin_src sh :noweb yes
>> echo 2
>>   ,#+end_src
>>
>>   ,#+begin_src sh :results raw :noweb yes
>> echo 1
>> <>
>> echo 3
>>   ,#+end_src
>>
>>   ,#+results:
>>   1
>>   2
>>   3
>>
>> #+end_src
>>
>> Org src blocks can reference other src blocks.  Note the ":noweb yes"
>> option and the use of <<...>>.
>>
>>
>> --
>> : Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.1, Org release_8.3beta-366-gb2fca7
>
>

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


pgpWAFl74ly3w.pgp
Description: PGP signature


Re: [O] «Macro» expansion in source blocks; code-sharing between blocks

2014-09-19 Thread Charles Berry
Andreas Kiermeier  gmail.com> writes:


> 
> My two blocks (with some code removed for simplicity) are as follow:
> 
> #+NAME: tbl-refyear
> #+BEGIN_SRC R :results silent :exports none
>   latex(tabular(   ))
> #+END_SRC
> 
> #+BEGIN_SRC latex :noweb yes
> \begin{table}[h]
> \label{tbl:refyear}
> \caption{Separation outcomes (death or any type of discharge) by
> reference year.}
> <>
> \end{table}
> #+END_SRC
> 
> I've tried :cache yes as part of the tbl-refyear source block, but
> that didn't stop if from being run twice. Am I missing a suitable
> header argument?
> 
> This is the only way I could find to wrap the latex table (which has
> some complex formatting and hence why I've used it over just producing
> a table) in a float with a caption (though I still can't properly
> reference the label when I export to a PDF file).
> 
> Any thought would be greatly appreciated. TIA!
> 

Why not use library(xtable) and do it all in R?

If you are not sure this is the right choice, I suggest you look at the
help page for print.xtable - you have a lot of control over caption,
label, positioning, etc.

HTH,

Chuck




Re: [O] list of agenda files in a file

2014-09-19 Thread Thorsten Jolitz
hy...@lactose.homelinux.net (hymie!) writes:

> Greetings.
>
> I'd like to add my _archive files to my agenda.  I don't need the entries
> clogging up my day-to-day .org files, but I want the items to still
> appear in my agenda.
>
> I found this in the org manual:
>
>>The information to be shown is normally collected from all agenda files,
>>the files listed in the variable org-agenda-files[98].
>>
>>[98] If the value of that variable is not a list, but a single file name,
>>then the list of agenda files will be maintained in that external file.
>
> So based on that, I put this in my .emacs file:
>   (setq org-agenda-files (quote ("~/org/agenda.file.list")))
> but I cannot seem to get this to work.
>
> When that file has a plain old list of filenames in it, I get an error
> Agenda file ~/org/agenda.file.list is not in `org-mode'
>
> When that file is empty, then there is nothing in my agenda.  I then
> tried using C-c [ to add a file to the list, and I end up with
>  '(org-agenda-files (quote ("~/org/file.org" "~/org/agenda.file.list")))
> in my .emacs file.
>
> Am I misunderstanding?  The manual sounds like I can maintain a file
> that contains a list of files that the agenda should use.  But I can't
> seem to make that happen, either automatically or manually.
>
> What am I doing wrong?

Read again! =>

,[ C-h v org-agenda-files RET ]
| org-agenda-files is a variable defined in `org.el'.
| Its value is ("~/git/org/agenda")
| Original value was nil
| 
| Documentation: The files to be used for agenda display.  Entries may
| be added to this list with M-x org-agenda-file-to-front and removed
| with M-x org-remove-file.  You can also use customize to edit the
| list.
| 
| If an entry is a directory, all files in that directory that are
| matched by `org-agenda-file-regexp' will be part of the file list.
| 
| If the value of the variable is not a list but a single file name,
| then^
|
| the list of agenda files is actually stored and maintained in that
| file, one agenda file per line.  In this file paths can be given
| relative to `org-directory'.  Tilde expansion and environment variable
| substitution are also made.
| 
| You can customize this variable.
`

-- 
cheers,
Thorsten




Re: [O] «Macro» expansion in source blocks; code-sharing between blocks

2014-09-19 Thread Eric S Fraga
On Friday, 19 Sep 2014 at 09:14, Andreas Kiermeier wrote:
> Having used this type of setup only over the last couple of days, I've
> come up with another question. It appears that the setup_fu is
> executed twice ... once as it's own source block (though by itself not

maybe say ":results none" instead of silent?
just grasping a straws here.  
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.3beta-372-gdd70cf


signature.asc
Description: PGP signature


Re: [O] [PATCH] WAS Re: Bug: problem w/ R code blocks [8.3beta (release_8.3beta-362-ga92789 /usr/local/share/emacs/site-lisp/org/)]

2014-09-19 Thread Rainer M Krug
Aaron Ecay  writes:

> Hi Malcom,
>
> 2014ko irailak 18an, "Cook, Malcolm"-ek idatzi zuen:
>> 
>> Hi,
>> 
>> Hmm, I spoke too soon the problem is only partially fixed by this
>> patch...
>> 
>> Trying to work with in org-mode with R code blocks attached to
>> persistent sessions (i.e. adding ':session myRsession' to the code
>> block header ) makes things start to break again, at least in my
>> hands.
>> 
>> I'm going to wait till things settle down before trying to upgrade ESS
>> again.
>> 
>> Thanks for the patch anyway.
>
> Can you give an ECM ?  I tried
> to reconstruct what you are saying, but the patch seems to work as
> expected for me.

Haven't had a problem since I used the patch.

>
> (At the risk of being redundant, did you make sure that you are running
> the most recent code including the patch?  The most foolproof way is to
> navidate to the definition of ‘org-babel-R-initiate-session’ in ob-R.el,
> verify that the call to ‘ess-wait-for-process’ is present, and use C-M-x
> to reevaluate the defun.)

Also: if you are compile, did you compile after applying the patch? I
was looking once for an error for quite some time until I figured out
that I still had some old compiled files lurking around...

Rainer

>
> Thanks,

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


pgpA9l5zEFamR.pgp
Description: PGP signature