Re: [O] closing column mode for beamer export

2015-02-11 Thread L . Larrabee Strow
Here is the simplest example I can come up with.  I changed the four
figures to text.  Note that in comments, I show where I can add
\end{columns} and \begin{columns} to the org-generated .tex files, and I
get what I want, a 2x2 set of figures.

(START OF ORG FILE)

#+LATEX_CLASS: beamer
#+LATEX_CLASS_OPTIONS: [t]
#+BEAMER_THEME: Frankfurt
#+OPTIONS: H:2 toc:nil num:t

* Introduction
** Overview
*** 
  :PROPERTIES:
  :BEAMER_col: 0.5
  :END:
#+LaTeX: \centering
Figure 1 (top/left)

Text instead of figure Text instead of figure Text instead of figure
Text instead of figure Text instead of figure Text instead of figure
#+LaTeX: \vspace{0.1in}

*** 
  :PROPERTIES:
  :BEAMER_col: 0.5
  :END:
#+LaTeX: \centering
Figure 2 (top/right)

Text instead of figure

# If I put: \end{columns}
# and put : \begin{columns}
# here in the .tex output from org-mode, I get a 2x2 set of figures

*** 
  :PROPERTIES:
  :BEAMER_col: 0.5
  :END:
#+LaTeX: \centering
Figure 3 (bottom/left)

Text instead of figure

*** 
  :PROPERTIES:
  :BEAMER_col: 0.5
  :END:
#+LaTeX: \centering
Figure 4 (bottom/right)

Text instead of figure

(END OF ORG FILE)

Thank you!!

Eric S Fraga writes:

 On Tuesday, 10 Feb 2015 at 13:12, Larrabee Strow wrote:
 Hi,

 Thanks for the suggestion.

 I tried making the columns bigger BEAMER_col: 0.8 or whatever

 Didn't work.

 can you post a minimal example.  I'm happy to play with it to see.

-- 
L. Larrabee Strow
UMBC Physics Department
Email: st...@umbc.edu
Office Phone: 724-663-7341
Google Phone: 724-663-1441



[O] [DONE] Re: Org Linking to Bookmark [+]

2015-02-11 Thread Tory S. Anderson
Thanks, Drew; I have it now. To all concerned, it's easy to add bookmark+ link 
support to org-mode with the following:

--8---cut here---start-8---
;;; * bmkp links http://orgmode.org/manual/Adding-hyperlink-types.html
 (org-add-link-type bmkp 'org-bmkp-open)
 (add-hook 'org-store-link-functions 'org-bmkp-store-link)
 
 (defcustom org-bmkp-command 'bookmark-jump
   The Emacs command to be used to display a bmkp page.
   :group 'org-link
   :type '(choice (const bookmark-jump) (const bookmark-jump-other-window)))

 (defun org-bmkp-open (path)
   Visit the bmkppage on PATH.
 PATH should be a bookmark name that can be thrown at the `bookmark-jump' 
function.
   (funcall org-bmkp-command path))
 
 (defun org-bmkp-store-link ()
   Store a link to a bmkp bookmark.
   (when (memq major-mode '(bookmark-bmenu-mode))
 (let* ((bookmark (bookmark-bmenu-bookmark))
(link (concat bmkp: bookmark))
(description (format Bookmark: %s bookmark)))
   (org-store-link-props
:type bmkp
:link link
:description description
--8---cut here---end---8---




Drew Adams drew.ad...@oracle.com writes:

  (defun org-bmkp-store-link ()
Store a link to a bmkp bookmark.
(when (memq major-mode '(bookmark-bmenu-mode))
  (let* ((bookmark (org-bmkp-get-bookmark-name))
 
   |
   v
  (bookmark-bmenu-bookmark)

 It looks like you are trying to get the name of the bookmark at
 point in buffer `*Bookmark List*'.  To do that, just evaluate
 (bookmark-bmenu-bookmark).

 For Bookmark+, if you pass that function a non-nil arg then you
 get the full bookmark record, not just the name.  (But anyway,
 most bookmark functions accept either the name or the bookmark.)

 (No relation with Org links, but you can also create simple, 
 non-persistent bookmark links using `bmkp-insert-bookmark-link'.
 Dunno whether that will help with what you want to do.
 http://www.emacswiki.org/emacs/BookmarkPlus#BookmarkLinks)



Re: [O] Citations, continued

2015-02-11 Thread Richard Lawrence
Stefan Nobis stefan...@snobis.de writes:

 Richard Lawrence richard.lawre...@berkeley.edu writes:

 I know these commands are convenient, and that not having them would
 introduce this class of errors, but the question is whether they are
 so important that it's worth providing an equivalent for them in
 non-LaTeX backends.

 Hmmm... I don't see this as a big problem. Either the exporter or some
 tool has to be able to read from the bibliography database and has to
 understand at least parts of the available fields (e.g. author and
 year to enable author-year style citations). Based on this it should
 be easy to only output some of the fields (e.g. only author).

Well, a lot of the time, it probably is.  But what if the author's name
is, say, `John von Neumann' (to use a recently-mentioned example)?  Then
the exporter needs to figure out (1) whether to output the full name or
just the last name; if the latter, (2) whether the last name is
`Neumann' or `von Neumann'; and if the latter, (3) how to capitalize the
last name in the context where it appears.

 But anyway: Some tool is needed to generate the bibliography with all
 its data - this tool has to handle all these details and therefore it
 should be not too hard to get partial data from it.

That is true.  Some tool does have to do this, and there are tools that
are designed for it outside of LaTeX (like CSL processors) that Org
could rely on.  But I really don't have any idea how easy it would be to
make the exporter interact with them in a fine-grained way like this, or
what constraints they would place on citation support in Org.  Does
anyone have a sense of this?

 BTW: I don't think any special formatting should be required - ASCII
 or even HTML would never look the same as a LaTeX generated PDF. So
 minor drawbacks are IMHO not as important as to be able to express
 important details in the source.

That is true.  The question we are trying to reach a consensus on is
just what constitutes `important'. :)

 I think, the syntax should be quite flexible (at least easy to extend,
 with compact, nice looking extension-syntax).

Yes, I agree.  Still, as I said elsewhere, I think it's really important
to draw a clear line between the `main' citation syntax, which encodes
features that are important enough to support fully on all backends, and
the syntax for extensions, which encode features that might only work on
some backends or in one's personal setup.  I think this is important for
document portability and so authors and editors know what they can rely
on.

I also think it's important because I suspect the only way we're going
to get a working Org citation syntax is if we try very hard to limit
what goes into the first category to something (much) less than
`everything we can now do with LaTeX'.  We can always move more stuff
into the first category later on, if it becomes clear that it's needed.

I certainly don't mean to be telling people that the LaTeX features they
are now relying on are not useful, or not important.  (I apologize if
I'm coming off that way!) I just think some of them might not be *so*
useful that they are worth the effort to fully support on other
backends, at least initially.

 If some backend lacks support for some feature, maybe someone finds
 the time to fix it (and then org-mode would rule the world
 :)). Otherwise a simple fallback (default citation style, output
 citation string unchanged,...) will be used.

IMHO, this is really only acceptable for features that fall in the
second category.  If there are `core' features of Org citations that
don't work on all backends, then there isn't really anything gained by
using Org citations instead of just sticking with LaTeX (or another
backend-specific citation format).

I am personally totally fine with a syntax that allows you to say things
like:

[cite: see @Doe99 for more. :latex-command SomeEsotericCitationCommand]

or

[cite: see @Doe99 for more. :custom-type my-custom-type]

as long as it is obvious to an author that these citations might not
export correctly on all backends, in contrast to a citation makes use of
only the `main' Org citation syntax.  Individual authors are in a better
position to decide when that tradeoff is acceptable to them.

Best,
Richard




Re: [O] And another useful function for header arguments

2015-02-11 Thread Grant Rettke
All of the `org-babel-* functions are sweet.

Proof, I bind almost of all of them to my own preference:
https://github.com/grettke/home/blob/master/ALEC.org#L4641

Everyone, they are listed here:
http://orgmode.org/manual/Key-bindings-and-useful-functions.html#Key-bindings-and-useful-functions

One of the most under-stated listings ever. They are all delightful, seriously.

On Tue, Feb 10, 2015 at 7:15 AM, Rainer M Krug rai...@krugs.de wrote:
 I just found the following function:

 ,
 | C-c C-v C-c runs the command org-babel-check-src-block, which is an
 | interactive autoloaded compiled Lisp function in `ob-core.el'.
 |
 | It is bound to C-c C-v c, C-c C-v C-c.
 |
 | (org-babel-check-src-block)
 |
 | Check for misspelled header arguments in the current code block.
 `

 I'm gonna use it a lot!

 Cheers,

 Rainer

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



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



[O] New ELPA addition bogs down Emacs

2015-02-11 Thread Lawrence Bottorff
Once again, I've added some package that makes a 20k-line/1 mg .org file
kill Emacs' performance and max out my CPU. Here's my ELPA installed:

  auctex 11.88.2   installed Integrated
environment for *TeX*
  dash   20141220.1452 installed A modern list
library for Emacs
  epl20140823.609  installed Emacs Package
Library
  exec-path-from-... 20141212.846  installed Get environment
variables such as $PATH from the shell
  git-commit-mode20141014.1634 installed Major mode for
editing git commit messages
  git-rebase-mode20150122.1114 installed Major mode for
editing git rebase files
  gnuplot20141231.1337 installed drive gnuplot from
within emacs
  gnuplot-mode   20131203.2159 installed Major mode for
editing gnuplot scripts
  graphviz-dot-mode  20140303.1301 installed Mode for the
dot-language used by graphviz (att).
  htmlize1.39  installed Convert buffer
text and decorations to HTML.
  ido-ubiquitous 20141210.1353 installed Use ido (nearly)
everywhere.
  magit  20150124.930  installed control Git from
Emacs
  ob-sml 0.2   installed org-babel
functions for template evaluation
  org20150202  installed Outline-based
notes management and organizer
  org-plus-contrib   20150202  installed Outline-based
notes management and organizer
  paredit20150126.155  installed minor mode for
editing parentheses
  pkg-info   20140610.630  installed Information about
packages
  projectile 20150201.1134 installed Manage and
navigate projects in Emacs easily
  queue  0.1.1 installed Queue data
structure
  s  20140910.334  installed The long lost
Emacs string manipulation library.
  smex   20141210.1422 installed M-x interface with
Ido-style fuzzy matching.
  sml-mode   6.5   installed Major mode for
editing (Standard) ML
  tagedit20141021.2139 installed

Any suspicious-looking stuff there?

LB


Re: [O] Org Linking to Bookmark [+]

2015-02-11 Thread Drew Adams
  (defun org-bmkp-store-link ()
Store a link to a bmkp bookmark.
(when (memq major-mode '(bookmark-bmenu-mode))
  (let* ((bookmark (org-bmkp-get-bookmark-name))

  |
  v
 (bookmark-bmenu-bookmark)

It looks like you are trying to get the name of the bookmark at
point in buffer `*Bookmark List*'.  To do that, just evaluate
(bookmark-bmenu-bookmark).

For Bookmark+, if you pass that function a non-nil arg then you
get the full bookmark record, not just the name.  (But anyway,
most bookmark functions accept either the name or the bookmark.)

(No relation with Org links, but you can also create simple, 
non-persistent bookmark links using `bmkp-insert-bookmark-link'.
Dunno whether that will help with what you want to do.
http://www.emacswiki.org/emacs/BookmarkPlus#BookmarkLinks)



Re: [O] New ELPA addition bogs down Emacs

2015-02-11 Thread Grant Rettke
Add to your document

,
| #+STARTUP: showeverything
`

Does that resolve the performance issue?

If not I would do the usual dance of unloading packages until the
performance issues goes away and then adding them back until it
returns.

On Wed, Feb 11, 2015 at 1:35 PM, Lawrence Bottorff borg...@gmail.com wrote:
 Once again, I've added some package that makes a 20k-line/1 mg .org file
 kill Emacs' performance and max out my CPU. Here's my ELPA installed:

   auctex 11.88.2   installed Integrated
 environment for *TeX*
   dash   20141220.1452 installed A modern list
 library for Emacs
   epl20140823.609  installed Emacs Package
 Library
   exec-path-from-... 20141212.846  installed Get environment
 variables such as $PATH from the shell
   git-commit-mode20141014.1634 installed Major mode for
 editing git commit messages
   git-rebase-mode20150122.1114 installed Major mode for
 editing git rebase files
   gnuplot20141231.1337 installed drive gnuplot from
 within emacs
   gnuplot-mode   20131203.2159 installed Major mode for
 editing gnuplot scripts
   graphviz-dot-mode  20140303.1301 installed Mode for the
 dot-language used by graphviz (att).
   htmlize1.39  installed Convert buffer text
 and decorations to HTML.
   ido-ubiquitous 20141210.1353 installed Use ido (nearly)
 everywhere.
   magit  20150124.930  installed control Git from
 Emacs
   ob-sml 0.2   installed org-babel functions
 for template evaluation
   org20150202  installed Outline-based notes
 management and organizer
   org-plus-contrib   20150202  installed Outline-based notes
 management and organizer
   paredit20150126.155  installed minor mode for
 editing parentheses
   pkg-info   20140610.630  installed Information about
 packages
   projectile 20150201.1134 installed Manage and navigate
 projects in Emacs easily
   queue  0.1.1 installed Queue data
 structure
   s  20140910.334  installed The long lost Emacs
 string manipulation library.
   smex   20141210.1422 installed M-x interface with
 Ido-style fuzzy matching.
   sml-mode   6.5   installed Major mode for
 editing (Standard) ML
   tagedit20141021.2139 installed

 Any suspicious-looking stuff there?

 LB



-- 
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] New ELPA addition bogs down Emacs

2015-02-11 Thread Nick Dokos
Lawrence Bottorff borg...@gmail.com writes:

 Once again, I've added some package that makes a 20k-line/1 mg .org file kill 
 Emacs' performance and max out my CPU. Here's my
 ELPA installed:

 ...
   org    20150202  installed Outline-based notes 
 management and organizer
   org-plus-contrib   20150202  installed Outline-based notes 
 management and organizer
 ...

Probably not the reason, but as Rasmus pointed out, you need one or the
other - not both.

Nick




[O] Custom face for Categories in Agenda

2015-02-11 Thread Simon W. Jones
Hi there, I know there is a way of setting a particular face for tags in
orgmode - org-tag-faces, but can't find no similar function for
setting a face based on category. Does it exist?

Many thanks.

Simon Jones.




Re: [O] Latex code before maketitle

2015-02-11 Thread Rasmus
Jacob Gerlach jacobgerl...@gmail.com writes:

 Are there any convenient alternatives?

Maybe something like AfterPreamble, AfterEndPreamble, AtEndPreamble
etc. from etoolbox?  Or AfterPackage from KOMA-Script.

Hope it helps,
Rasmus

-- 
There are known knowns; there are things we know that we know




Re: [O] Org Linking to Bookmark [+]

2015-02-11 Thread Marcin Borkowski

On 2015-02-11, at 15:46, Drew Adams drew.ad...@oracle.com wrote:

 It looks like you are trying to get the name of the bookmark at
 point in buffer `*Bookmark List*'.  To do that, just evaluate
 (bookmark-bmenu-bookmark).

   _
 __   / \
/  \  | |
|  |  | It looks like you are trying to get the name of the bookmark at |
@  @  | point in buffer `*Bookmark List*'.  To do that, just evaluate   |
|| ||  --| (bookmark-bmenu-bookmark).  |
|| || | |
|\_/| | |
\___/ \_/


FTFY.  (Courtesy Fuco's clippy.el.)

(SCNR...)

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



Re: [O] [patch] better(?) indention for cdlatex-environment

2015-02-11 Thread Nicolas Goaziou
Rasmus ras...@gmx.us writes:

 Indeed that this the trick.  The attached patch seems to work nicely and
 takes care of the corner cases I could think of.

 I now get the following (desirable) behavior

  - key :: foo | bar
   baz
 # insert latex-environment with cdlatex

  - key :: foo | bar
   \begin{ENV}
   whatever
   \end{ENV}
   baz

I don't see how it is desirable. The logical behaviour is to split the
line, unless, of course, docstring clearly specifies this.

AFAICT `cdlatex-environment' splits the line. Is there a particular
reason for `org-cdlatex-environment-indent' to proceed differently?

 Here's another case
 p1
  - item | item
 p2
 # insert latex-environment with cdlatex
 p1
  - item  item
\begin{equation}
\label{eq:9}

\end{equation}

Ditto.

 +  ;; TODO: Cleanup if quit.  Unfortunately `cdlatex-environment'
 +  ;; always return nil.

What do you want to clean up? In what situations? Can't `unwind-protect'
help you?

 +  (let* (;; Insert environment on next line unless at beginning of line.

Comments starting with ;; need to be on a line on their own.

 +  (eol
 +   (unless (= (point)
 +   (save-excursion (beginning-of-line)
 +   (org-skip-whitespace)
 +   (point)))

Nitpick:

  (unless (save-excursion (skip-chars-backward  \t) (bolp))
...)

 + (end-of-line) t))
 +  ;; Get correct indention for next line.
 +   (ind (if eol (save-excursion
 +  (org-return-indent)
 +  (prog1 (org-get-indentation)
 +(unless (or (eobp) (looking-at [^ \t]))

Nitpick: (org-looking-at-p \\S-)

 +  (kill-whole-line

There's no need to pollute the kill ring.

  (delete-region (line-beginning-position) (line-end-position))

Anyway, why bother?


Regards,



[O] Latex code before maketitle

2015-02-11 Thread Jacob Gerlach
Hi List,

I am using a custom Latex class that requires some code between
\begin{document} and \maketitle.

It seems from looking at ox-latex.el that there is nothing between document
start and title command available for me to customize.

I suppose I could customize the title command to include the extra code,
but I'd like to find an alternate approach if possible so I don't have to
manage org-latex-title-command on a per-document basis.

Are there any convenient alternatives?

Regards,
Jake


Re: [O] ODT export: Issues with `org-export-footnote-first-reference-p'

2015-02-11 Thread Nicolas Goaziou
Vaidheeswaran C vaidheeswaran.chinnar...@gmail.com writes:

 I still think that the snippet I shared should have worked.  Clearly
 `org-export-footnote-first-reference-p' is misbehaving.

It does, e.g., when exporting to LaTeX. This is an odt limitation.  So,
I disagree, `org-export-footnote-first-reference-p' is correct here.


Regards,



Re: [O] New ELPA addition bogs down Emacs

2015-02-11 Thread Lawrence Bottorff
Changing to #+STARTUP: showeverything did the trick . . . although I don't
know why. Why?

On Wed, Feb 11, 2015 at 4:13 PM, Nick Dokos ndo...@gmail.com wrote:

 Lawrence Bottorff borg...@gmail.com writes:

  Once again, I've added some package that makes a 20k-line/1 mg .org file
 kill Emacs' performance and max out my CPU. Here's my
  ELPA installed:
 
  ...
org20150202  installed Outline-based
 notes management and organizer
org-plus-contrib   20150202  installed Outline-based
 notes management and organizer
  ...

 Probably not the reason, but as Rasmus pointed out, you need one or the
 other - not both.

 Nick





Re: [O] New ELPA addition bogs down Emacs

2015-02-11 Thread Puneeth Chaganti
On Thu, Feb 12, 2015 at 3:26 AM, Lawrence Bottorff borg...@gmail.com wrote:
 Changing to #+STARTUP: showeverything did the trick . . . although I don't
 know why. Why?

One of the reasons I discovered recently was this inconspicuous change
(around v8.2.6) [1], though this may or may not be what is happening
for you.

Calling `org-overview` on large files takes a lot of time and is CPU
intensive.  #+STARTUP: showeverything basically turns off a call to
this, when a file is opened -- so, the file is displayed with
everything shown.

Before this change, `org-overview` had a call to `recenter`, and when
a file was opened by visiting `org-agenda`, the file would be opened
in a buried (not currently visible) buffer. This would case `recenter`
to error out (since it expects the buffer to be current), there by
causing an error in `org-overview`.  Co-incidentally, this saved all
the CPU cycles. This change removed this broken call to `recenter`.

[1] - 
http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=b88c5464db2cb0d90d4f30e43b5e08d2b1c1fcea;hp=8cc4e09950594b2abec2502e9218318570595ac5

-- Puneeth



Re: [O] Latex code before maketitle

2015-02-11 Thread Charles C. Berry

On Wed, 11 Feb 2015, Jacob Gerlach wrote:


Hi List,

I am using a custom Latex class that requires some code between
\begin{document} and \maketitle.

It seems from looking at ox-latex.el that there is nothing between document
start and title command available for me to customize.

I suppose I could customize the title command to include the extra code,
but I'd like to find an alternate approach if possible so I don't have to
manage org-latex-title-command on a per-document basis.

Are there any convenient alternatives?


(info (org) Advanced configuration) has a heading called 'Filters' that 
may interest you.


If you always export that custom class using the same boilerplate between 
the \begin{document} and the \maketitle , you can install 
your own `final-output' filter. All it needs to do is check if the custom 
class is operative and if it is insert the needed text before \maketitle.


As a start, put something like this in your init file:


#+BEGIN_SRC emacs-lisp :exports results :results none
  (defun my-final-filter (s backend info)
(when (eq backend 'latex)
  (let ((class (plist-get info :latex-class)))
(message class: %s class)
(when (string= class report)
  (replace-regexp-in-string \\maketitle
% put special stuff here\n\\maketitle
s nil t)

  (add-to-list 'org-export-filter-final-output-functions 'my-final-filter)
#+END_SRC


Change report to your special class and the % comment to whatever 
you need.


To make it more robust, you might want to fiddle with the regexp in case 
there is a \maketitle someplace else in your document.


HTH,

Chuck




Re: [O] [patch] better(?) indention for cdlatex-environment

2015-02-11 Thread Rasmus
Hi,

Thanks for the comments!

Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 I don't see how it is desirable. The logical behaviour is to split the
 line, unless, of course, docstring clearly specifies this.

I don't feel strongly about it.  Anyway, I like this better.  Cdlatex is,
um, opinionated about is insertion of newlines.

 +  ;; TODO: Cleanup if quit.  Unfortunately `cdlatex-environment'
 +  ;; always return nil.

 What do you want to clean up? In what situations? Can't `unwind-protect'
 help you?

cdlatex-environment always return nil.  I would have to analyze if
something got inserted manually.  IOW, I don't have the name of the
environment, and cdlatex-environment returns nil if I press C-g and if I
select and environment.  I don't know how to distinguish the cases.

 Anyway, why bother?

Newlines is very hard to get right with cdlatex.  Unintended newlines is a
bug.

The attached patch works as expected at all locations marked with |,
but not the one marked with / and \, which lead to the next question.
| - i1 | i2 |
/ - i3 |
\

I expect indentation at all points not at bol.

At \ (org-get-indentation) returns 2 even though I'm at bol.  Why?

Regarding /.  In the following i2 is indented meaning that
(org-get-indentation) becomes 2.  Is that a feature?

(with-temp-buffer
  (org-mode)
  (insert \n- i1\n- i2)
  (beginning-of-line)
  (org-return-indent)
  (buffer-string))

—Rasmus

-- 
to err is human. To screw up 10⁶ times per second, you need a computer
From c43d7bb49a047b91a88327ce016b17383697376d Mon Sep 17 00:00:00 2001
From: rasmus ras...@gmx.us
Date: Tue, 10 Feb 2015 12:02:59 +0100
Subject: [PATCH] org.el: Change indention for cdlatex environments

* org.el (org-cdlatex-environment-indent): Use different indent
  algorithm based on content above the new latex-environment.
---
 lisp/org.el | 38 ++
 1 file changed, 34 insertions(+), 4 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 64b546f..682d27a 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -18647,10 +18647,40 @@ Revert to the normal definition outside of these fragments.
 (defun org-cdlatex-environment-indent (optional environment item)
   Execute `cdlatex-environment' and indent the inserted environment.
   (interactive)
-  (cdlatex-environment environment item)
-  (let ((element (org-element-at-point)))
-(org-indent-region (org-element-property :begin element)
-		   (org-element-property :end element
+  (let ((non-blank-eolp
+	 (save-excursion
+	   (and (not (save-excursion
+		   (skip-chars-backward  \t)
+		   (bolp)))
+		(progn (skip-chars-forward  \t) (eolp)
+	(ind (save-excursion
+	   (unless (and (bolp)
+			(save-excursion
+			  (skip-chars-forward  \t)
+			  (eolp)))
+		 (org-return-indent))
+	   (org-get-indentation
+;; Skip forward to next bol to avoid extra newline from
+;; cdlatex-environment.
+(when non-blank-eolp (forward-line 1) (beginning-of-line))
+(cdlatex-environment environment item)
+;; Indent new latex-environment.
+(unless (zerop ind)
+  (let* ((element (org-element-at-point))
+	 (beg (org-element-property :begin element))
+	 (end (copy-marker
+		   (save-excursion
+		 (goto-char (org-element-property :end element))
+		 (skip-chars-backward  \t\n\r)
+		 (point)
+	(save-excursion
+	  (goto-char beg)
+	  (beginning-of-line)
+	  (while (= (point) end)
+	(org-indent-to-column ind)
+	(forward-line 1)))
+	(set-marker end nil))
+  (forward-char ind
 
 
  LaTeX fragments
-- 
2.3.0



Re: [O] [patch, ox] suppress title

2015-02-11 Thread Rasmus
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Could you also add a test in `test-org-export/handle-options'?

How would I make this test proper?  I can't use org-test-default-backend
since it only loads the transcoder functions, not the template which is
where I disable the title.  I can think of the following or writing a mini
template that just check :with-title, but that feels like cheating...

  ;; Test title.
  (should
   (equal 
  (org-test-with-temp-text #+TITLE: foo
(org-export-as
 (org-export-create-backend
  :transcoders
  '((title.  org-org-identity)
(template . org-org-template)))
 nil nil nil
 '(:with-title nil :with-creator nil
   :with-author nil :with-date nil
   :time-stamp-file nil)
  (should
   (equal #+TITLE: foo
  (org-trim
   (org-test-with-temp-text
   #+TITLE: foo
 (org-export-as
  (org-export-create-backend
   :transcoders
   '((title.  org-org-identity)
 (template . org-org-template)))
  nil nil nil
  '(:with-title t :with-creator nil
:with-author nil :with-date nil
:time-stamp-file nil))

-- 
With monopolies the cake is a lie!



Re: [O] With Sticky Agenda, org-calendar-goto-agenda doesn't work

2015-02-11 Thread Nicolas Goaziou
Hello,

torys.ander...@gmail.com (Tory S. Anderson) writes:

 Bug, I suppose. If I have sticky agenda mode enabled, later going to
 my calendar and pressing c (`org-calendar-goto-agenda') on a date
 just takes me to whatever date is currently displayed in my agenda.
 I have to `org-toggle-sticky-agenda' before it it will work.

Fixed. Thank you.


Regards,

-- 
Nicolas Goaziou



[O] [patch, ox-latex] better hyperref and title options

2015-02-11 Thread Rasmus
Hi,

This patch does two things.

 1. Add better format-spec to ox-latex hyperref and title-command.
 2. Use this to extend basic hyperref formatting to include title,
author, language etc.

Wrt the title-command, this is useful if you need one-off custom
formatting of a header in LaTeX, e.g. in ox-publish projects.

—Rasmus

-- 
There are known knowns; there are things we know that we know
From d011059ef326827bd944b7949c4a14e7bdf215dd Mon Sep 17 00:00:00 2001
From: Rasmus ras...@gmx.us
Date: Wed, 11 Feb 2015 02:18:09 +0100
Subject: [PATCH] ox-latex: Format-spec for hyperref and title

* ox-latex.el (org-latex-format-spec): New function with format-specs.
  (org-latex-template): Use org-latex-format-spec.
  (org-latex-hyperref-template): New defaults and use
  org-latex-format-spec.
  (org-latex-title-command): Use org-latex-format-spec.
* ORG-NEWS: Mention change.
---
 etc/ORG-NEWS |  3 +++
 lisp/ox-latex.el | 51 ++-
 2 files changed, 37 insertions(+), 17 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 103828b..cc2c49a 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -227,6 +227,9 @@ Exact heading search for links now ignore spaces and cookies. This is
 the case for links of the form ~file:projects.org::*task title~, as
 well as links of the form ~file:projects.org::some words~
 when ~org-link-search-must-match-exact-headline~ is not nil.
+*** ~org-latex-hyperref-template~, ~org-latex-title-command~ formatting 
+New formatting keys are supported.  See ~org-latex-format-spec~.
+Further, ~org-latex-hyperref-template~ has new default value.
 * Version 8.2
 
 ** Incompatible changes
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index d7514aa..5210447 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -383,9 +383,9 @@ are written as utf8 files.
 
 (defcustom org-latex-title-command \\maketitle
   The command used to insert the title just after \\begin{document}.
-If this string contains the formatting specification \%s\ then
-it will be used as a formatting string, passing the title as an
-argument.
+
+A number of formatting keys can be used to construct the command.
+See `org-latex-format-spec'.
   :group 'org-export-latex
   :type 'string)
 
@@ -397,14 +397,11 @@ the toc:nil option, not to those generated with #+TOC keyword.
   :type 'string)
 
 (defcustom org-latex-hyperref-template
-  \\hypersetup{\n pdfkeywords={%k},\n  pdfsubject={%d},\n  pdfcreator={%c}}\n
+  \\hypersetup{\n pdfauthor={%a},\n pdftitle={%t},\n pdfkeywords={%k},
+ pdfsubject={%d},\n pdfcreator={%c}, \n pdflang={%l}}\n
   Template for hyperref package options.
 
-Value is a format string, which can contain the following placeholders:
-
-  %k for KEYWORDS line
-  %d for DESCRIPTION line
-  %c for CREATOR line
+See `org-latex-format-spec' for placeholder keys.
 
 Set it to the empty string to ignore the command completely.
   :group 'org-export-latex
@@ -1193,6 +1190,26 @@ just outside of it.
 INFO is a plist used as a communication channel.
   (org-export-translate s :latex info))
 
+(defun org-latex-format-spec (info)
+  Create a format-spec for e.g. `org-latex-hyperref-template'.
+
+Value is a format string, which can contain the following placeholders:
+
+  %a for AUTHOR keyword
+  %t for TITLE keyword
+  %k for KEYWORDS line
+  %d for DESCRIPTION line
+  %c for CREATOR line
+  %l for Language keyword
+  %D for DATE keyword
+
+  `((?a . ,(or (org-export-data (plist-get info :author) info) ))
+(?t . ,(or (org-export-data (plist-get info :title)  info) ))
+(?k . ,(or (plist-get info :keywords) ))
+(?d . ,(or (plist-get info :description) ))
+(?c . ,(if (plist-get info :with-creator) (plist-get info :creator) ))
+(?l . ,(or (plist-get info :language) ))
+(?D . ,(org-export-data (org-export-get-date info) info
 
 
 ;;; Template
@@ -1248,17 +1265,17 @@ holding export options.
  ;; Title
  (format \\title{%s}\n title)
  ;; Hyperref options.
- (format-spec (plist-get info :latex-hyperref-template)
-  (format-spec-make
-   ?k (or (plist-get info :keywords) )
-   ?d (or (plist-get info :description))
-   ?c (if (plist-get info :with-creator)
-  (plist-get info :creator)
-)))
+ (let ((template (plist-get info :latex-hyperref-template)))
+   (and (stringp template)
+(format-spec template
+ (org-latex-format-spec info
  ;; Document start.
  \\begin{document}\n\n
  ;; Title command.
- (let ((command (plist-get info :latex-title-command)))
+ (let* ((title-command (plist-get info :latex-title-command))
+(command (and (stringp title-command)
+  (format-spec title-command
+   (org-latex-format-spec info)
(org-element-normalize-string
 	(cond ((string=  title) nil)

Re: [O] [patch, ox] suppress title

2015-02-11 Thread Nicolas Goaziou
Rasmus ras...@gmx.us writes:

 Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Could you also add a test in `test-org-export/handle-options'?

 How would I make this test proper?

You can't, my bad. It is obviously handled at the back-end level.

Regards,



Re: [O] [patch, ox] suppress title

2015-02-11 Thread Nicolas Goaziou
Hello,

Rasmus ras...@gmx.us writes:


 Sometime when requiring custom formatting of the header for a document, it
 would be nice to be able to use #+TITLE without triggering the insertion
 of the tile (e.g. \maketitle in latex and h1title/h1 in ox-html).  For
 instance, one might have special org-html-preamble code.  This patch adds
 an #+OPTIONS: title:{nil,t} option.

Nice, thanks. The usual nitpicking follows.

 -   (let ((subtitle1 (plist-get attr :subtitle1))
 +   (let ((title (if (plist-get info :with-title)
 + title ))

Nitpick: 

  (title (if (plist-get info :with-title) title ))

or

  (title (if (plist-get info :with-title) title 
  ))

or

  (title (if (plist-get info :with-title) 
 title 
  ))


 +(make-obsolete-variable 'org-koma-letter-use-title
 + 'Org-export-with-title

Typo.

 +  (cond ((null (plist-get info :with-title)) nil)

Nitpick:

  (not (plist-get info :with-title))

This is considered as a boolean, not as a list.

 - (cond ((string=  title) nil)
 + (cond ((null (plist-get info :with-title)) nil)

See above.

  (defcustom org-export-time-stamp-file t
Non-nil means insert a time stamp into the exported file.
  The time stamp shows when the file was created.  This option can
 diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el
 index 79b5c69..4a74ab3 100644
 --- a/testing/lisp/test-ox.el
 +++ b/testing/lisp/test-ox.el
 @@ -111,7 +111,7 @@ variable, and communication channel under `info'.
  (org-export--parse-option-keyword
   H:1 num:t \\n:t timestamp:t arch:t author:t creator:t d:t email:t
   *:t e:t ::t f:t pri:t -:t ^:t toc:t |:t tags:t tasks:t :t todo:t inline:nil
 - stat:t)
 + stat:t title:t)
  '(:headline-levels
1 :preserve-breaks t :section-numbers t :time-stamp-file t
:with-archived-trees t :with-author t :with-creator t :with-drawers t
 @@ -119,7 +119,7 @@ variable, and communication channel under `info'.
:with-footnotes t :with-inlinetasks nil :with-priority t
:with-special-strings t :with-statistics-cookies t 
 :with-sub-superscript t
:with-toc t :with-tables t :with-tags t :with-tasks t :with-timestamps 
 t
 -  :with-todo-keywords t)))
 +  :with-title t :with-todo-keywords t)))
;; Test some special values.
(should
 (equal

Could you also add a test in `test-org-export/handle-options'?

This also requires a proper ORG-NEWS entry.


Regards,

-- 
Nicolas Goaziou



Re: [O] [patch, ox] suppress title

2015-02-11 Thread Vladimir Lomov
Hello,
** Rasmus [2015-02-12 01:47:06 +0100]:

 Nicolas Goaziou m...@nicolasgoaziou.fr writes:
 
 Rasmus ras...@gmx.us writes:

 Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Could you also add a test in `test-org-export/handle-options'?

 How would I make this test proper?

 You can't, my bad. It is obviously handled at the back-end level.
 
 OK pushed without that then.  e6fcc853.

Please consider the attached small patch for org.texi

P.S. It would be nice to test not only changes in *.el files but also
test building process.

---
WBR, Vladimir Lomov

-- 
The only thing worse than X Windows: (X Windows) - X
diff --git a/doc/org.texi b/doc/org.texi
index 406579b..f02fca8 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -10818,7 +10818,6 @@ Toggle inclusion of TODO keywords into exported text
 @item |:
 @vindex org-export-with-tables
 Toggle inclusion of tables (@code{org-export-with-tables}).
-@end table
 
 @item title:
 @vindex org-export-with-titles


[O] [PATCH] Recognize property blocks even after text

2015-02-11 Thread Sacha Chua
Hi! I noticed that the refactored org-get-property-block no longer
allows for any text (aside from the SCHEDULED / DEADLINE / CLOSED) text
between the heading and the property drawer, which gave me problems when
I accidentally added text or timestamps or things like that. Also, it
means org-gcal's default format (which puts the timestamp before the
property drawer) doesn't work, so maybe a bunch of other things rely on
the old behavior. If that part of the change was unintentional, would
you consider the patch below? It seems to be okay with my Org files, but
maybe that flexibility was removed for performance reasons. Hope this is
useful!


Subject: [PATCH] Recognize property blocks even after text

* lisp/org.el (org-get-property-block): Search for the property drawer
anywhere before the next heading or the end of the buffer.

* testing/lisp/test-org.el (test-org/property-blocks-are-flexible):
Check if property blocks can be defined after text.
---
 lisp/org.el  | 25 +++--
 testing/lisp/test-org.el | 17 +
 2 files changed, 32 insertions(+), 10 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 64b546f..dac7390 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -15422,16 +15422,21 @@ return nil.
  (t (org-with-limited-levels (org-back-to-heading t))
(forward-line)
(when (org-looking-at-p org-planning-line-re) (forward-line))
-   (cond ((looking-at org-property-drawer-re)
- (forward-line)
- (cons (point) (progn (goto-char (match-end 0))
-  (line-beginning-position
-(force
- (goto-char beg)
- (org-insert-property-drawer)
- (let ((pos (save-excursion (search-forward :END:)
-(line-beginning-position
-   (cons pos pos
+   (cond ((re-search-forward
+   org-property-drawer-re
+   (save-excursion (save-match-data (outline-next-heading))
+   (point)) t)
+  (progn
+(goto-char (match-beginning 0))
+(forward-line)
+(cons (point) (progn (goto-char (match-end 0))
+ (line-beginning-position)
+ (force
+  (goto-char beg)
+  (org-insert-property-drawer)
+  (let ((pos (save-excursion (search-forward :END:)
+ (line-beginning-position
+(cons pos pos
 
 (defun org-at-property-p ()
   Non-nil when point is inside a property drawer.
diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index ce1d519..800cffc 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -2618,6 +2618,23 @@ Text.
  * H\n:PROPERTIES:\n:COLUMNS: %25ITEM %A %20B\n:END:
(org-buffer-property-keys nil nil t)
 
+(ert-deftest test-org/property-blocks-are-flexible ()
+  Test if properties can be specified with some information before them.
+  ;; Retrieve properties accross siblings.
+  (should
+   (equal '(A B)
+ (org-test-with-temp-text 
+* H1
+Some text goes here.
+:PROPERTIES:
+:A: 1
+:END:
+* H2
+:PROPERTIES:
+:B: 1
+:END:
+   (org-buffer-property-keys)
+
 (ert-deftest test-org/property-values ()
   Test `org-property-values' specifications.
   ;; Regular test.
-- 
2.1.4





Re: [O] [patch, ox] suppress title

2015-02-11 Thread Rasmus
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Rasmus ras...@gmx.us writes:

 Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Could you also add a test in `test-org-export/handle-options'?

 How would I make this test proper?

 You can't, my bad. It is obviously handled at the back-end level.

OK pushed without that then.  e6fcc853.

—Rasmus

-- 
Slowly unravels in a ball of yarn and the devil collects it




Re: [O] ODT export: Issues with `org-export-footnote-first-reference-p'

2015-02-11 Thread Vaidheeswaran

On Thursday 12 February 2015 02:42 AM, Nicolas Goaziou wrote:

It does, e.g., when exporting to LaTeX. This is an odt limitation.  So,
I disagree, `org-export-footnote-first-reference-p' is correct here.



Let me put my question this way:

What changes need to be made in ox.el and/or ox-odt.el so that the 
snippet I shared produces the right XML acceptable for LibreOffice.


text1 [fn:1]

text2 [fn:2]

[fn:1] footdef1[fn:2]

[fn:2] footdef2

For purposes of ODT backend, we need to find the 'site of first 
reference' THAT IS OUTSIDE OF A foonote definition.  Would it be 
possible for you to augment the API so that I can request such a reference.


NOTE: The XML that is emitted by the ODT exporter, suggests that the 
'[fn:2]' occurring in '[fn:1]' is treated as site of first reference. 
We would like to make '[fn:2]' occurring next to 'text2' be treated as 
the site of first reference.  If we do that, everything will be just right.







Re: [O] closing column mode for beamer export

2015-02-11 Thread James Harkins
Larrabee Strow strow at umbc.edu writes:

 
 I am trying to put a second row of two columns in a org beamer slide.
 
 No problems with doing the first row, two column.
 
 I can't figure out any way to put in the second row of two columns.
 (I am trying to show a 2x2 grid of images, with titles.)
 
 It appears to me I need something that produces and \end{columns}
 after my first row of columns.

This is what the :B_columns: tag is for. (And, finally *I* can help someone
else, instead of asking a question!!)

In the example, I'm cutting out some spaces before tags.

#+OPTIONS: H:1

* Frame
** First row:B_columns:
   :PROPERTIES:
   :BEAMER_env: columns
   :END:
*** Left:BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:END:
Stuff here
*** Right   :BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:END:
More stuff here
** Second row   :B_columns:
   :PROPERTIES:
   :BEAMER_env: columns
   :END:
*** Left:BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:END:
Stuff here
*** Right   :BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:END:
More stuff here

In the exported LaTeX code, you'll get two \begin{columns} ... \end{columns}
pairs.

hjh




Re: [O] And another useful function for header arguments

2015-02-11 Thread Rainer M Krug
Grant Rettke g...@wisdomandwonder.com writes:

 All of the `org-babel-* functions are sweet.

 Proof, I bind almost of all of them to my own preference:
 https://github.com/grettke/home/blob/master/ALEC.org#L4641

 Everyone, they are listed here:
 http://orgmode.org/manual/Key-bindings-and-useful-functions.html#Key-bindings-and-useful-functions

Thanks - they are really nice.

I think I should read the manual - but who does this actually ;-) ? 

Rainer


 One of the most under-stated listings ever. They are all delightful, 
 seriously.

 On Tue, Feb 10, 2015 at 7:15 AM, Rainer M Krug rai...@krugs.de wrote:
 I just found the following function:

 ,
 | C-c C-v C-c runs the command org-babel-check-src-block, which is an
 | interactive autoloaded compiled Lisp function in `ob-core.el'.
 |
 | It is bound to C-c C-v c, C-c C-v C-c.
 |
 | (org-babel-check-src-block)
 |
 | Check for misspelled header arguments in the current code block.
 `

 I'm gonna use it a lot!

 Cheers,

 Rainer

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

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


signature.asc
Description: PGP signature


Re: [O] Raw .org file for manual(s)?

2015-02-11 Thread Rasmus
Lawrence Bottorff borg...@gmail.com writes:

 How about a raw compact guide. The complete guide won't really load into
 Emacs very well on my machine.

Is this also the case when reading with emacs -q?  If not, you have bad
mojo in your config.  My five year old 1.8Ghz machine loads the file in a
couple of seconds.  After that there's no delay in scrolling or similar.

—Rasmus

-- 
In theory, practice and theory are the same. In practice they are not




Re: [O] [bug] Alignment bug in clock tables

2015-02-11 Thread Francesco Pizzolante
Hi Stormking,

Sorry for my very late reply: I thank you very much for your workaround
which enables me to have well aligned clock tables.

I also take the opportunity to bump up this thread.

I think you correctly spotted the exact cause of our issue. Here's what
you say in a previous message:

 I'm having this problem, too. The code that aligns the clocktable
 seems to count the \emsp entity as five characters. But with
 pretty entities turned on, it's displayed as only one character.

To make it short: the alignment code counts \emsp as 5 chars, while it
is displayed as one.

I recall the small screencast here: http://screencast.com/t/qpmxDV8R543G

Anyone to fix this in the code?

Thanks.

Regards,
 Francesco



Re: [O] Exporting columnviews

2015-02-11 Thread Francesco Pizzolante
Hi Nicolas,

 Rasmus ras...@gmx.us writes:
 Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 I introduced \nbsp at some point, but there were complaints from users
 not prettifying entities. So I guess \star is not an option either.

 Don't worry I use \nbsp sometimes!
 For what reason do people not want to use entities?  Speed?

 Because it breaks table alignement and looks ugly if, e.g., \nbsp
 doesn't appear as  .

I think the issue is the opposite: the table is not aligned if \nbsp
appears as space (as explained by Stormking in a different thread):

  ┌ http://article.gmane.org/gmane.emacs.orgmode/91379
  |
  │ The code that aligns the clocktable seems to count the \emsp entity as
  │ five characters. But with pretty entities turned on, it's displayed as
  │ only one character.
  └

Any idea how to fix it?

Thanks,
 Francesco

PS Here's a small screencast where you can see the alignment issue:
http://screencast.com/t/qpmxDV8R543G



Re: [O] Org-mode and YASnippet

2015-02-11 Thread Fabrice Niessen
Hello Marcin,

Marcin Borkowski wrote:
 does anyone use YASnippet with Org?

Yes. [1]

 I tried, but ran into a strange problem: when I type into
 a placeholder field, I get a space after each letter.  Did anyone run
 into this, too?

I don't really understand what your problem is. Maybe a screenshot or
video would help.

Here is a video that I made using YASnippet in an Org file:

http://screencast.com/t/cQnc9dpDf

Best regards,
Fabrice

[1] https://github.com/fniessen/emacs-leuven/blob/master/emacs-leuven.el.

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] Citations, continued

2015-02-11 Thread Stefan Nobis
Richard Lawrence richard.lawre...@berkeley.edu writes:

 I know these commands are convenient, and that not having them would
 introduce this class of errors, but the question is whether they are
 so important that it's worth providing an equivalent for them in
 non-LaTeX backends.

Hmmm... I don't see this as a big problem. Either the exporter or some
tool has to be able to read from the bibliography database and has to
understand at least parts of the available fields (e.g. author and
year to enable author-year style citations). Based on this it should
be easy to only output some of the fields (e.g. only author).

 For my part, it seems like the convenience is not worth the effort
 that would be required to make the exporter handle these correctly
 in general. (For example, it seems the exporter would then have to
 worry about things like quoting and emphasizing document titles --
 which means worrying about context, document type, locale and
 language, quotation styles, etc.)

Does the exporter really habe to worry about these things? But anyway:
Some tool is needed to generate the bibliography with all its data -
this tool has to handle all these details and therefore it should be
not too hard to get partial data from it. BTW: I don't think any
special formatting should be required - ASCII or even HTML would never
look the same as a LaTeX generated PDF. So minor drawbacks are IMHO
not as important as to be able to express important details in the
source.

I think, the syntax should be quite flexible (at least easy to extend,
with compact, nice looking extension-syntax). If some backend lacks
support for some feature, maybe someone finds the time to fix it (and
then org-mode would rule the world :)). Otherwise a simple fallback
(default citation style, output citation string unchanged,...) will be
used.

-- 
Until the next mail...,
Stefan.



[O] With Sticky Agenda, org-calendar-goto-agenda doesn't work

2015-02-11 Thread Tory S. Anderson
Bug, I suppose. If I have sticky agenda mode enabled, later going to my 
calendar and pressing c (`org-calendar-goto-agenda') on a date just takes me 
to whatever date is currently displayed in my agenda. I have to 
`org-toggle-sticky-agenda' before it it will work. 



Re: [O] closing column mode for beamer export

2015-02-11 Thread Eric S Fraga
On Tuesday, 10 Feb 2015 at 13:12, Larrabee Strow wrote:
 Hi,

 Thanks for the suggestion.

 I tried making the columns bigger BEAMER_col: 0.8 or whatever

 Didn't work.

can you post a minimal example.  I'm happy to play with it to see.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.1, Org release_8.3beta-727-ga1cdc6.dirty



Re: [O] Citations, continued

2015-02-11 Thread Rasmus
Aaron Ecay aarone...@gmail.com writes:

 The uppercase variants are important for correctness with names like
 “von Neumann”.  When we write a sentence which begins “Von Neumann
 (19xx) claimed that...” the “von” must be capitalized, though it
 should be lowercase in non-sentence-initial position.  Of course, we
 don’t need to copy the biblatex convention of capitalized command
 names to represent this in org.  Perhaps a :capitalize t property
 could be added, assuming one of the proposals is adopted that allows
 the inclusion of a property list in the citation.

So I guess Org cannot be used for game theory or CS papers. . .

I guess, in ox-latex it should use magically use the uppercase variants
depending on sentence-end or similar voodoo.  Like textcites would
automatically be used if there's more than one key.

Anyway, you are right.  But they should still not be exposed in the case a
limited set of biblatex keys are adopted.

—Rasmus

-- 
In theory, practice and theory are the same. In practice they are not



Re: [O] Raw .org file for manual(s)?

2015-02-11 Thread Lawrence Bottorff
I'm on an i5 first gen and when it opens it immediately pegs one of my
cores to 100% -- and pretty much stays that way, making Emacs very, very
slow and bogged down. The file is ~ 20,000 lines and weighs under 1 mg, so,
yeah, it shouldn't be a problem. Starting with no-init does clear up the
issue; works fine.

Now, what in my init would be causing this incompatibility? I got a
ready-made .emacs.d from Clojure for the Brrave and True. Here's what
I've got installed.

 auctex 11.88.2   installed Integrated
environment for *TeX*
  cider  20150208.850  installed Clojure Integrated
Development Environment and REPL
  clojure-mode   20150113.1048 installed Major mode for
Clojure code
  clojure-mode-ex... 20150110.505  installed Extra font-locking
for Clojure mode
  dash   20141220.1452 installed A modern list
library for Emacs
  epl20140823.609  installed Emacs Package
Library
  exec-path-from-... 20141212.846  installed Get environment
variables such as $PATH from the shell
  git-commit-mode20141014.1634 installed Major mode for
editing git commit messages
  git-rebase-mode20150122.1114 installed Major mode for
editing git rebase files
  gnuplot-mode   20131203.2159 installed Major mode for
editing gnuplot scripts
  ido-ubiquitous 20141210.1353 installed Use ido (nearly)
everywhere.
  magit  20150124.930  installed control Git from
Emacs
  ob-sml 0.2   installed org-babel
functions for template evaluation
  org20150202  installed Outline-based
notes management and organizer
  org-plus-contrib   20150202  installed Outline-based
notes management and organizer
  paredit20150126.155  installed minor mode for
editing parentheses
  pkg-info   20140610.630  installed Information about
packages
  projectile 20150201.1134 installed Manage and
navigate projects in Emacs easily
  queue  0.1.1 installed Queue data
structure
  rainbow-delimiters 1.3.21installed Highlight nested
parens, brackets, braces a different color at each depth.
  s  20140910.334  installed The long lost
Emacs string manipulation library.
  smex   20141210.1422 installed M-x interface with
Ido-style fuzzy matching.
  sml-mode   6.5   installed Major mode for
editing (Standard) ML
  tagedit20141021.2139 installed Some paredit-like
features for html-mode

Does anyone have an orgmode-friendly init they could point me at?



On Wed, Feb 11, 2015 at 5:08 AM, Rasmus ras...@gmx.us wrote:

 Lawrence Bottorff borg...@gmail.com writes:

  How about a raw compact guide. The complete guide won't really load into
  Emacs very well on my machine.

 Is this also the case when reading with emacs -q?  If not, you have bad
 mojo in your config.  My five year old 1.8Ghz machine loads the file in a
 couple of seconds.  After that there's no delay in scrolling or similar.

 —Rasmus

 --
 In theory, practice and theory are the same. In practice they are not





Re: [O] [PATCH]: BUG fix and Add header-args property to source block info

2015-02-11 Thread Alan Schmitt
Hello,

On 2015-02-10 22:58, Rainer M Krug rai...@krugs.de writes:

 Are there some guidelines on how to write tests? Never done this before...

I recently wrote my first test, so here is how I did it.

- find a similar test in testing/lisp/el (maybe in test-ob-exp.el)
- load the file testing/org-test.el (it has many helper functions,
  I needed them when testing links)
- write and evaluate your ert-deftest
- call ert to run the test

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


signature.asc
Description: PGP signature


Re: [O] Citations, continued

2015-02-11 Thread Aaron Ecay
Hi Rasmus,

2015ko otsailak 10an, Rasmus-ek idatzi zuen:

[...]


 Keys I don't care about, since they are quite biblatex specific:
 smartcite, autocide, parentcite*, uppercase variants. *volcites(s) (any 
 objections?)

Smartcite is like footcite in regular text and parencite in footnotes.
I think we probably want functionality like that, but it should be in
lisp so that it works for all backends.

The uppercase variants are important for correctness with names like
“von Neumann”.  When we write a sentence which begins “Von Neumann
(19xx) claimed that...” the “von” must be capitalized, though it
should be lowercase in non-sentence-initial position.  Of course, we
don’t need to copy the biblatex convention of capitalized command
names to represent this in org.  Perhaps a :capitalize t property
could be added, assuming one of the proposals is adopted that allows
the inclusion of a property list in the citation.

-- 
Aaron Ecay



Re: [O] [patch] better(?) indention for cdlatex-environment

2015-02-11 Thread Rasmus
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 You can get real indentation by indenting a new line first. What about
 the following?

 (org-return-indent)

Indeed that this the trick.  The attached patch seems to work nicely and
takes care of the corner cases I could think of.

I now get the following (desirable) behavior

 - key :: foo | bar
  baz
# insert latex-environment with cdlatex

 - key :: foo | bar
  \begin{ENV}
  whatever
  \end{ENV}
  baz

Here's another case
p1
 - item | item
p2
# insert latex-environment with cdlatex
p1
 - item  item
   \begin{equation}
   \label{eq:9}
   
   \end{equation}

And more...

Behavior is better now.  To improve further I'd need to change cdlatex.el
and last time I tried it was ignored...

—Rasmus

-- 
I feel emotional landscapes they puzzle me
From a19cfa0f3eb22c4b3a3e3bd313626fb90a9affce Mon Sep 17 00:00:00 2001
From: rasmus ras...@gmx.us
Date: Tue, 10 Feb 2015 12:02:59 +0100
Subject: [PATCH] org.el: Change indention for cdlatex environments

* org.el (org-cdlatex-environment-indent): Use different indent
  algorithm based on content above the new latex-environment.
---
 lisp/org.el | 38 ++
 1 file changed, 34 insertions(+), 4 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 64b546f..11fd3de 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -18647,10 +18647,40 @@ Revert to the normal definition outside of these fragments.
 (defun org-cdlatex-environment-indent (optional environment item)
   Execute `cdlatex-environment' and indent the inserted environment.
   (interactive)
-  (cdlatex-environment environment item)
-  (let ((element (org-element-at-point)))
-(org-indent-region (org-element-property :begin element)
-		   (org-element-property :end element
+  ;; TODO: Cleanup if quit.  Unfortunately `cdlatex-environment'
+  ;; always return nil.
+  (let* (;; Insert environment on next line unless at beginning of line.
+	 (eol
+	  (unless (= (point)
+		  (save-excursion (beginning-of-line)
+  (org-skip-whitespace)
+  (point)))
+	(end-of-line) t))
+	 ;; Get correct indention for next line.
+	  (ind (if eol (save-excursion
+			 (org-return-indent)
+			 (prog1 (org-get-indentation)
+			   (unless (or (eobp) (looking-at [^ \t]))
+			 (kill-whole-line
+		 (org-get-indentation
+(cdlatex-environment environment item)
+;; Indent new latex-environment to correct indention.
+(unless (zerop ind)
+  (let* ((element (org-element-at-point))
+	 (beg (org-element-property :begin element))
+	 (end (copy-marker
+		   (save-excursion
+		 (goto-char (org-element-property :end element))
+		 (skip-chars-backward  \t\n\r)
+		 (point)
+	(save-excursion
+	  (goto-char beg)
+	  (beginning-of-line)
+	  (while (= (point) end)
+	(org-indent-to-column ind)
+	(forward-line 1)))
+	(set-marker end nil))
+  (forward-char ind
 
 
  LaTeX fragments
-- 
2.3.0



[O] Org Linking to Bookmark [+]

2015-02-11 Thread Tory S. Anderson
I have weekly TODO items that link to something that needs to be updated; for 
instance, I write a weekly letter to my daughter where  each week the actual 
file for the letter will change. Right now I have to manually update that link 
in the org file, which is quite cumbersome. If I could just link to a bookmark 
then periodic updates of the bookmark would take care of any problem with 
updating the todo item. So, I've been tryin to kludge a solution based on the 
orgmode manual; while any suggestions would be useful for my budding elisp 
skills, in particular I'm not sure how to write the last function 
(org-bmkp-get-bookmark-name). Any suggestions? 

--8---cut here---start-8---
;;; * bmkp links http://orgmode.org/manual/Adding-hyperlink-types.html
 (org-add-link-type bmkp 'org-bmkp-open)
 (add-hook 'org-store-link-functions 'org-bmkp-store-link)
 
 (defcustom org-bmkp-command 'bmkp
   The Emacs command to be used to display a bmkp page.
   :group 'org-link
   :type '(choice (const bookmark-jump) (const bookmark-jump-other-window)))
 
 (defun org-bmkp-open (path)
   Visit the bmkppage on PATH.
 PATH should be a bookmark name that can be thrown at the `bookmark-jump' 
function.
   (funcall org-bmkp-command path))
 
 (defun org-bmkp-store-link ()
   Store a link to a bmkp bookmark.
   (when (memq major-mode '(bookmark-bmenu-mode))
 (let* ((bookmark (org-bmkp-get-bookmark-name))
(link (concat bmkp: bookmark))
(description (format Bookmark)))
   (org-store-link-props
:type bmkp
:link link
:description description
 
 (defun org-bmkp-get-bookmark-name () ;; TODO
   Get the bookmark name at point (from bookmark list).
   (if (string-match  \\(\\S-+\\)\\* (buffer-name))
   (match-string 1 (buffer-name))
 (error Cannot create link to this bmkp bookmark)))
--8---cut here---end---8---



Re: [O] ODT export: Issues with `org-export-footnote-first-reference-p'

2015-02-11 Thread Vaidheeswaran C

On Thursday 12 February 2015 12:49 PM, Thomas S. Dye wrote:

Aloha Vaidheeswaran,

This is an odd example that I don't recall having seen in any
publication.  I don't doubt examples might exist, but don't remember
having seen one.  Can you point me to a real-world example of a footnote
referring to a subsequent footnote that I might reference either on-line
or in my local library?


I am OCRing this book:
http://wenshuchan-online.weebly.com/uploads/9/4/8/2/9482304/chan-and-zen-teachingpdf.pdf. 
 This book is atleast 50 years old.


You can find the converted files here:
https://archive.org/details/TheDiamondCutterOfDoubts


The actual text extract goes something as below.  I am attaching the 
scanned image of the book in question.





# page 159

Now they saw uncountable and limitless numbers of living beings in the
universe[fn:145-1] and wondered when all these beings could be saved
and how they could obtain the Buddha fruit since the universe would
never be emptied of these beings.


# page 169

#+BEGIN_QUOTE

'Subhuti, what do you think? If someone filled the Universe[fn:155-4]
with the seven treasures[fn:155-5] and gave them all as alms, would
his merit be great?’

Subhuti replied: 'Very great, World Honoured One. Why? Because this
merit is not the nature of merit, the Tathagata says it is
great.’[fn:155-6]

‘Subhuti, if on the other hand, someone received and kept even a four
line stanza of this sutra and expounded it to others, his merit would
surpass that (of the giver of treasures). Why? (Because), Subhuti, all
Buddhas and their Supreme-Enlightenment-Dharma originate from this
sutra. Subhuti, the so-called Buddhas and Dharmas are not real Buddhas
and Dharmas.'[fn:155-7]

#+END_QUOTE

[fn:145-1] Literally ‘the great trichiliocosm’. See footnote 4, p. 
169.[fn:155-4]


[fn:155-4] Tri-sahasra-maha-sahasra-loka-dhatu=a great
trichiliocosm. Mt. Sumeru and its seven surrounding continents, eight
seas and ring of iron mountains form one small world; 1,000 of these
form a small chiliocosm; 1,000 of these small chiliocosms form a
medium chiliocosm; 1,000 of these form a great chiliocosm, which
consists of 1,000,000,000 small worlds. The word ‘universe’ is used
for convenience sake.






All the best,
Tom

Vaidheeswaranvaidheeswaran.chinnar...@gmail.com  writes:


On Thursday 12 February 2015 02:42 AM, Nicolas Goaziou wrote:

It does, e.g., when exporting to LaTeX. This is an odt limitation.  So,
I disagree, `org-export-footnote-first-reference-p' is correct here.



Let me put my question this way:

What changes need to be made in ox.el and/or ox-odt.el so that the
snippet I shared produces the right XML acceptable for LibreOffice.

text1 [fn:1]

text2 [fn:2]

[fn:1] footdef1[fn:2]

[fn:2] footdef2

For purposes of ODT backend, we need to find the 'site of first
reference' THAT IS OUTSIDE OF A foonote definition.  Would it be
possible for you to augment the API so that I can request such a
reference.

NOTE: The XML that is emitted by the ODT exporter, suggests that the
'[fn:2]' occurring in '[fn:1]' is treated as site of first
reference. We would like to make '[fn:2]' occurring next to 'text2' be
treated as the site of first reference.  If we do that, everything
will be just right.











Re: [O] ODT export: Issues with `org-export-footnote-first-reference-p'

2015-02-11 Thread Thomas S. Dye
Aloha Vaidheeswaran,

This is an odd example that I don't recall having seen in any
publication.  I don't doubt examples might exist, but don't remember
having seen one.  Can you point me to a real-world example of a footnote
referring to a subsequent footnote that I might reference either on-line
or in my local library?

All the best,
Tom

Vaidheeswaran vaidheeswaran.chinnar...@gmail.com writes:

 On Thursday 12 February 2015 02:42 AM, Nicolas Goaziou wrote:
 It does, e.g., when exporting to LaTeX. This is an odt limitation.  So,
 I disagree, `org-export-footnote-first-reference-p' is correct here.


 Let me put my question this way:

 What changes need to be made in ox.el and/or ox-odt.el so that the
 snippet I shared produces the right XML acceptable for LibreOffice.

 text1 [fn:1]

 text2 [fn:2]

 [fn:1] footdef1[fn:2]

 [fn:2] footdef2

 For purposes of ODT backend, we need to find the 'site of first
 reference' THAT IS OUTSIDE OF A foonote definition.  Would it be
 possible for you to augment the API so that I can request such a
 reference.

 NOTE: The XML that is emitted by the ODT exporter, suggests that the
 '[fn:2]' occurring in '[fn:1]' is treated as site of first
 reference. We would like to make '[fn:2]' occurring next to 'text2' be
 treated as the site of first reference.  If we do that, everything
 will be just right.






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