Re: [O] Bug: [Capture] wrongly duplicated date tree outlines [8.2.10]

2014-11-21 Thread kuanyui
> Eric S Fraga wrote:
> There were problems with the datetree functionality a little while
> ago.  In my case, entries got put in the slot for the day before...  I
> cannot remember which version of org was affected but I use this
> functionality all the time and it has been working fine for a while now.
> 
> I suggest you upgrade your version of org.
> -- 
> : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-581-g0e52f0

I just tried to get git development version, adding into load-path,
requiring and M-x org-version to check it.

Org-mode version 8.3beta (release_8.3beta-584-g3953cb-git @ mixed
installation! /usr/local/share/emacs/24.4/lisp/org/ and
/home/kuanyui/.emacs.d/git/org-mode/lisp/)

However, the problem is still leaved unfixed. :(



[O] Get html links relative to base directory for Jekyll site

2014-11-21 Thread Brady Trainor

Can I get org publishing to change paths of links? Jekyll system seems to work 
better if image links start from base. 

I want

#+BEGIN_SRC org
file:../img/jekyll.png
#+END_SRC

(or something similar, "../img/" could be "img/" or "./img/")

to become

#+BEGIN_HTML

#+END_HTML

in the published HTML file. 

That is, the address should start "/img/".

Or perhaps another solution, a function which makes org contents

#+BEGIN_SRC org
file:../img/jekyll.png
#+END_SRC

become

#+BEGIN_SRC org
file:../img/jekyll.png

,#+BEGIN_HTML

,#+END_HTML
#+END_SRC

In other words, can I get the HTML link as a result in the org buffer. Simply 
adding a "/" here would be simple. Or somethink like cd-latex for html links?

Or does anyone have another solution for including links in a Jekyll site? I 
really like to have the inline org file: link as then I can use inline images 
while I'm drafting. 

--
Brady




Re: [O] Unexpected macro error

2014-11-21 Thread Thomas S. Dye
Aloha Nicolas,

Nicolas Goaziou  writes:

> Hello,
>
> t...@tsdye.com (Thomas S. Dye) writes:
>
>> A document I've been working on for several weeks broke recently without
>> changes on my part. However, I've been tracking the master git branch
>> every once in a while and I suspect some change in Org is the culprit.
>>
>> Org-mode version 8.3beta (release_8.3beta-580-g787733 @
>> /Users/dk/.emacs.d/src/org-mode/lisp/)
>>
>> I haven't tried to make an ECM because I don't know what the problem
>> could be.  Here is a backtrace:
>>
>> Debugger entered--Lisp error: (error "Undefined Org macro: ad; aborting.")
>
> [...]
>
>> The error message refers to a macro, ad.  I don't have an "ad" macro.
>> Where does this come from?
>
> There is probably a left over {{{ad}}} somewhere, which cannot be
> expanded.

An {{{ad}}} in a :noexport: section for several months began acting up
recently.  Now that it's gone, things work again.

Thanks for pointing me in the right direction.

All the best,
Tom


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



[O] [Patch] org-display-inline-images: Add support for remote images

2014-11-21 Thread Kit-Yan Choi
Hi,

I would like to submit a patch to support displaying remote images inline
in Org-mode.  Attached is the formatted patch (or github branch here

.)

I have tested the code with "make test".  FSF document is signed (waiting
for gnu to send it back).

Feedbacks are most welcome.  Thanks.

Kit
diff --git a/lisp/org.el b/lisp/org.el
index 1f33d2a..aaa5c9b 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -19338,7 +19338,7 @@ boundaries."
(not (cdr (org-element-contents parent)
  (org-string-match-p file-extension-re
  (org-element-property :path link)))
-(let ((file (expand-file-name (org-element-property :path link
+(let ((file (substitute-in-file-name (expand-file-name 
(org-element-property :path link)
   (when (file-exists-p file)
 (let ((width
;; Apply `org-image-actual-width' specifications.
@@ -19376,10 +19376,29 @@ boundaries."
 'org-image-overlay)))
   (if (and (car-safe old) refresh)
   (image-refresh (overlay-get (cdr old) 'display))
-(let ((image (create-image file
- (and width 'imagemagick)
- nil
- :width width)))
+(let* ((image 
+(let ((newname
+   (if (org-file-remote-p file)
+   (let* ((tramp-tmpdir (concat
+ (if (featurep 
'xemacs)
+ 
(temp-directory)
+   
temporary-file-directory)
+ "/tramp"
+ 
(org-file-remote-p file)
+ 
(file-name-directory
+  
(org-babel-local-file-name file
+  (newname (concat
+tramp-tmpdir 
+
(file-name-nondirectory file
+ (make-directory tramp-tmpdir t)
+ (if 
(tramp-handle-file-newer-than-file-p file newname)
+   (tramp-compat-copy-file file 
newname t t))
+ newname)
+ file)))
+  (create-image newname
+(and width 'imagemagick)
+nil
+:width width
   (when image
 (let* ((link
 ;; If inline image is the description


[O] [patch] extend org-meta-return to keywords

2014-11-21 Thread Rasmus
Hi,

Rasmus  writes:

> Something I have wanted for a while is to have M-RET work "as
> expected"(?)  on keyword lines such as #+LATEX_HEADER, #+CAPTION etc.
> [...]
> Attached is a quick patch that works surprisingly well.  I would work
> more on it if you guys agree this would be useful.  It probably need
> much more work for corner-cases (any ideas what these are)?

Attached is a new version of the patch that will respect the variables
that also govern `org-insert-headline'.  It's smarter and preserves the
layout better.

E.g. (where | is the cursor)

   #+CAP|TION: foo

After M-RET it becomes

   #+CAPTION: foo
   #+CAPTION: |

A keyword-line is inserted above when one press M-RET between BOL and "#".

Keywords that an element can only have one of will not be inserted.
E.g.

#+NAME: foo|

After M-RET it becomes

#+NAME: foo
* | 

Any opinions? 

—Rasmus

-- 
I hear there's rumors on the, uh, Internets. . .
>From 1981d0b0a324565659629438ea253cc3e284e0bf Mon Sep 17 00:00:00 2001
From: rasmus 
Date: Wed, 19 Nov 2014 15:39:19 +0100
Subject: [PATCH] org.el: Add keyword-support to M-RET

* org.el (org-insert-keyword): New function.
(org-meta-return): May call `org-insert-keyword'.
(org-M-RET-may-split-line): Add keyword.
---
 lisp/org.el | 79 -
 1 file changed, 68 insertions(+), 11 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 6ab13f4..e8e6b58 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -1601,6 +1601,7 @@ contexts.  Valid contexts are:
 headline  when creating a new headline
 item  when creating a new item
 table in a table field
+keyword   when creating a new keyword
 default   the value to be used for all contexts not explicitly
   customized"
   :group 'org-structure
@@ -1614,6 +1615,7 @@ default   the value to be used for all contexts not explicitly
 			   (const headline)
 			   (const item)
 			   (const table)
+			   (const keyword)
 			   (const default))
 		   (boolean)
 
@@ -7725,8 +7727,8 @@ split the line and create a new headline with the text in the
 current line after point \(see `org-M-RET-may-split-line' on how
 to modify this behavior).
 
-If point is at the beginning of a normal line, turn this line
-into a heading.
+If point is at the beginning of a normal line, excluding some
+keywords, turn this line into a heading.
 
 When INVISIBLE-OK is set, stop at invisible headlines when going
 back.  This is important for non-interactive uses of the
@@ -21291,10 +21293,57 @@ number of stars to add."
 	   (forward-line)))
 (unless toggled (message "Cannot toggle heading from here"
 
+(defun org-insert-keyword (&optional arg)
+  "Insert a new keyword-line.
+
+If point is between the beginning of the line and the start of
+the keyword, a keyword-line is inserted above the current one.
+
+If point is in the middle of a keyword-line, split the line
+depending on the value of `org-M-RET-may-split-line'.  See the
+docstring of this variable for further details.
+
+If point is within the keyword a new keyword-line is inserted
+below.
+
+Currently arg is ignored and the keyword is determined from the
+context.
+
+The function is used by `org-meta-return'.  Note that keywords
+that can only occur once per element are ignored (through
+`org-meta-return')."
+  (interactive "P")
+  (let* ((may-split (org-get-alist-option
+		 org-M-RET-may-split-line 'keyword))
+	 (point-at-bol-p (looking-back "^[[:space:]]*"))
+	 (end-of-keyword
+	  (save-excursion
+	(beginning-of-line)
+	(search-forward-regexp
+	 org-element--affiliated-re (point-at-eol) t)
+	(point)))
+	 (elm (org-element-at-point))
+	 (key (and (eq 'keyword (org-element-type elm))
+		   (org-element-property :key elm
+(when key
+  (when point-at-bol-p (open-line 1)
+	;; Open-line makes sometimes ruins indention of the
+	;; previous line.
+	(save-excursion (forward-line 1)
+			(org-indent-line)))
+  (unless may-split (end-of-line))
+  (unless point-at-bol-p
+	(when (< (point) end-of-keyword)
+	  (goto-char end-of-keyword))
+	(insert "\n"))
+  (insert (format "#+%s: " key))
+  (org-indent-line
+
 (defun org-meta-return (&optional arg)
-  "Insert a new heading or wrap a region in a table.
-Calls `org-insert-heading' or `org-table-wrap-region', depending
-on context.  See the individual commands for more information."
+  "Insert a new heading, a new keyword or wrap a region in a table.
+Calls `org-insert-heading', `org-insert-keyword' or
+`org-table-wrap-region', depending on context.  See the
+individual commands for more information."
   (interactive "P")
   (org-check-before-invisible-edit 'insert)
   (or (run-hook-with-args-until-success 'org-metareturn-hook)
@@ -21303,12 +21352,20 @@ on context.  See the individual commands for more information."
 (when (eq type 'table-row)
   (setq element (org-element-property :parent element))
   (se

Re: [O] Issue with multiline string variable for JavaScript source code blocks

2014-11-21 Thread Peter Moresi
Excellent and thanks for the feedback. I'm glad I was able to give
something back to the community that has given me so much.

I've also had issues with JavaScript source code blocks truncating the
result when the value is a string with a comma. I'm still getting up to
speed with Emacs-lisp but when I figure out how to fix the issue I will
send the patch with proper comments.

Thanks,
Peter

On Friday, November 21, 2014, Nicolas Goaziou 
wrote:

> Hello,
>
> Peter Moresi > writes:
>
> > Sure, the patch is attached.​
>
> Applied. Thank you.
>
> However I had to fill your commit message, which was incomplete. For
> reference, here is what I used, from your initial report:
>
> --8<---cut here---start->8---
> ob-js: Fix passing multiline variables
>
> * lisp/ob-js.el (org-babel-js-var-to-js): Replace newline characters
>   with "\n" in strings.
>
> Let's say I have a multi-line string stored in an example block.
>
> I want to store my CSV in an example block.
>
> #+NAME: my-csv-data
> #+BEGIN_EXAMPLE
>   ColA,ColB,ColC
>   1,2,3
>   4,5,6
> #+END_EXAMPLE
>
> I have a JavaScript function that accepts a string named 'csv' and passing
> in 'my-csv-data'.
>
> #+BEGIN_SRC js :var csv=my-csv-data :results output
>   console.log(csv);
> #+END_SRC
>
> When I expand the source block I end up with:
>
> #+BEGIN_SRC js
> var csv="ColA,ColB,ColC
>   1,2,3
>   4,5,6";
> console.log(csv);
> #+END_SRC
>
> This will not execute correctly because JavaScript does not support
> newlines in strings.
>
> What I want instead is:
>
> #+BEGIN_SRC js
>   var csv="ColA,ColB,ColC\n  1,2,3\n  4,5,6";
>   console.log(csv);
> #+END_SRC
>
> TINYCHANGE
> --8<---cut here---end--->8---
>
>
> Regards,
>
> --
> Nicolas Goaziou
>


[O] Code, Sessions, and org-edit-special

2014-11-21 Thread Ken Mankoff
Hi List,

I'm trying to improve my code workflow. I use python and sessions. I'd
like to be able to run code in the session even if I'm editing/viewing
the code via `org-edit-special`. Furthermore, when I edit code outside
of Org, I'd like to have sessions, that is, optionally one Python
session per source file. This allows me to edit different code for
different projects in different folders on virtual desktops, etc.

I've solved the non-Org part of this with the following one re-defined
and one new function:

#+BEGIN_SRC emacs-lisp
  (defun elpy-shell-get-or-create-process ()
"Get or create an inferior Python process for current buffer and return it."
(let* ((bufname (format "*%s*" (kdm/python-shell-get-process-name t)))
   (proc (get-buffer-process bufname)))
  (if proc
  proc
(run-python (python-shell-parse-command) t nil) ;; DEDICATED!
(get-buffer-process bufname

  (defun kdm/python-shell-get-process-name (dedicated)
(if (boundp 'py-buf-proc-name)
(format "%s" py-buf-proc-name)
(setq-local py-buf-proc-name
 (format "%s"
 (completing-read "Python session name: "
  nil nil nil (buffer-name) nil 
(buffer-name)))
   )))
#+END_SRC

Now when I C-c C-c in a buffer without an associated Python session, I'm
prompted for a name (defaulting to the buffer-name). I provide a session
name, and then all future C-c C-c's for that buffer are executed there.

This is good for Org. If I name a session "foo", I can edit code in
org-edit-special, assign Python session "foo", and execute code in a
session either from the org buffer or from the temp .py file. In theory.

But since I've call kdm/pythons-shell-get-process-name, if I try to C-c
C-c in a #+BEGIN_SRC section, it no longer works. I'm prompted for a
session name (I should not be). Whatever I enter is ignored, and the
code is executed either in a temporary "*Python*" if no :session, or in
the :session name as it should be.

How can I find out inside my `kdm/python-shell-get-process-name` if it
was called from Org, in which case I would implement the original
version.

Thanks,

  -k.



Re: [O] [PATH] Speedups to org-table-recalculate

2014-11-21 Thread Nicolas Goaziou
Nathaniel Flath  writes:

> OK, I think I fixed that.

Thanks.

I didn't verify it compiles, but your macro still looks suspicious.

> +(defmacro org-table-execute-once-per-second (t1 &rest body)
> +  "If there has been more than one second since T1, execute BODY.
> +Updates T1 to 'current-time' if this condition is met. If T1 is
> +nil, always execute body."
> +  `(let ((t1 ,t1))
> + (if t1
> +  (let ((curtime (current-time)))
> +(when (< 0 (nth 1 (time-subtract curtime t1)))
> +  (setq t1 curtime)
> +,@body))
> +   ,@body)))

You shouldn't splice BODY twice in your macro. Also, I don't get why you
need to (setq t1 curtime).

Do you need a macro at all for this task? ISTM you only need to display
a message conditionally and update a time value.


Regard,



Re: [O] PATCH: Add JISON to ORG-Babel Supported Languages

2014-11-21 Thread Nicolas Goaziou
Hello,

Peter Moresi  writes:

> I'm spending a lot of time in org-mode doing literate programming and it
> does most everything that I need.
>
> However, it did not support the jison
>  compiler
> generator.  So I added it by copying ob-dot.el and making some minor
> changes. I also wrote instructions that more or less follow the same
> outline as the dot documentation
> .
>
> If this patch is added to org-mode then org-babel will have a language for
> making new languages.

Thank you for your patch.

We need you to sign FSF papers in order to include your library in Org
core. See

  http://orgmode.org/worg/org-contribute.html#unnumbered-2

Meanwhile, we can install it in contrib/ and add the documentation
on Worg.


Regards,

-- 
Nicolas Goaziou



Re: [O] Issue with multiline string variable for JavaScript source code blocks

2014-11-21 Thread Nicolas Goaziou
Hello,

Peter Moresi  writes:

> Sure, the patch is attached.​

Applied. Thank you.

However I had to fill your commit message, which was incomplete. For
reference, here is what I used, from your initial report:

--8<---cut here---start->8---
ob-js: Fix passing multiline variables

* lisp/ob-js.el (org-babel-js-var-to-js): Replace newline characters
  with "\n" in strings.

Let's say I have a multi-line string stored in an example block.

I want to store my CSV in an example block.

#+NAME: my-csv-data
#+BEGIN_EXAMPLE
  ColA,ColB,ColC
  1,2,3
  4,5,6
#+END_EXAMPLE

I have a JavaScript function that accepts a string named 'csv' and passing in 
'my-csv-data'.

#+BEGIN_SRC js :var csv=my-csv-data :results output
  console.log(csv);
#+END_SRC

When I expand the source block I end up with:

#+BEGIN_SRC js
var csv="ColA,ColB,ColC
  1,2,3
  4,5,6";
console.log(csv);
#+END_SRC

This will not execute correctly because JavaScript does not support newlines in 
strings.

What I want instead is:

#+BEGIN_SRC js
  var csv="ColA,ColB,ColC\n  1,2,3\n  4,5,6";
  console.log(csv);
#+END_SRC

TINYCHANGE
--8<---cut here---end--->8---


Regards,

-- 
Nicolas Goaziou



Re: [O] Missing commit in maint

2014-11-21 Thread Bastien
Nicolas Goaziou  writes:

> Yes, when Org 8.3 is released.

Yes, and this will happen before chrismas!

-- 
 Bastien



Re: [O] Unexpected macro error

2014-11-21 Thread Nicolas Goaziou
Hello,

t...@tsdye.com (Thomas S. Dye) writes:

> A document I've been working on for several weeks broke recently without
> changes on my part. However, I've been tracking the master git branch
> every once in a while and I suspect some change in Org is the culprit.
>
> Org-mode version 8.3beta (release_8.3beta-580-g787733 @ 
> /Users/dk/.emacs.d/src/org-mode/lisp/)
>
> I haven't tried to make an ECM because I don't know what the problem
> could be.  Here is a backtrace:
>
> Debugger entered--Lisp error: (error "Undefined Org macro: ad; aborting.")

[...]

> The error message refers to a macro, ad.  I don't have an "ad" macro.
> Where does this come from?

There is probably a left over {{{ad}}} somewhere, which cannot be
expanded. You way want to debug `org-macro-replace-all' anyway.


Regards,

-- 
Nicolas Goaziou



Re: [O] org-context at the beginning of a link

2014-11-21 Thread Nicolas Goaziou
Hello,

Alan Schmitt  writes:

> I'm using a function that relies on `org-element-link-parser'. According
> to the documentation, the point needs to be at the element of the link
> for it to work.

Not what you are asking for, but it is probably wrong to call this
function directly. If you want to parse something, it's better to use
`org-element-context' (or `org-element-at-point' but it doesn't fit
here).

> I wrote a small function that takes me to the beginning
> of a link, but it fails when the point is already at the beginning of
> the link. Here is a reproducible recipe showing the problem.
>
> Open this attached tiny org file: 
> Start
>
> [[file:link.org][link]]
>
> End
>
> Put the point on the 'i' of "link", for instance by (goto-char 26).
>
> Look up the context: (org-context). I get ((:link 8 31))
>
> Go to the beginning of the link: (goto-char 8)
>
> Look up the context: (org-context). I get ((:link nil 31))
>
> Is there a reason why the context is different at the beginning of the
> link?

I don't know, but `org-context' is very different from
`org-element-context'. You probably mean to use the latter.


Regards,

-- 
Nicolas Goaziou



Re: [O] Missing commit in maint

2014-11-21 Thread Nicolas Goaziou
Hello,

Bernt Hansen  writes:

> The following commit
>
> 6202ec7 (Remove need to declare drawers before using them, 2013-10-20)
>
> has been in the master branch for over a year but I can't find it in any
> maintenance releases since then.  Is this intentional?

It is. This is a breaking change, so it is installed in master instead
of maint.

> I am using the function 
>
> (defun org-remove-empty-drawer-at (pos)
>
> in my .emacs setup and this changed signature in the above commit in the
> master branch only a year ago.
>
> Is this commit supposed to be applied to maint?

Yes, when Org 8.3 is released.

Regards,

-- 
Nicolas Goaziou



Re: [O] Customizing org-todo-repeat-to-state to return to the current TODO state

2014-11-21 Thread Nick Dokos
Grant Schissler  writes:

> That is a nice workaround, but does anyone have any ideas that I could 
> continue to use my main org file?  Also, what is meant by
> "the previous state in TYPO_TYP set"?  Thank you very much for the suggestion.
>

The property thingie is a very fine scalpel: if you have a few of these
APPT headings, then it's probably the way to go.

See (info "(org) TODO extensions"), in particular the "Multiple keyword
sets in one file" subsection for a different way.

But honestly, I have enough appointments and they are so different from
anything else, that a separate file makes sense for me.

--
Nick




Re: [O] org-archive-save-context-info as local variable

2014-11-21 Thread Jorge A. Alfaro-Murillo

Kyle Meyer writes:

The buffer-local value doesn't continue to shadow the global 
value when org-archive-subtree sets the buffer to the archive 
file. 


Thanks, Kyle! That is the reason. Setting the local variable in 
the archive file as well does the trick.


--
Jorge.




Re: [O] org-archive-save-context-info as local variable

2014-11-21 Thread Kyle Meyer
jorge.alfaro-muri...@yale.edu (Jorge A. Alfaro-Murillo) wrote:
[...]
> Does someone know why setting this variable as local does not work with
> `org-archive-subtree'?

The buffer-local value doesn't continue to shadow the global value when
org-archive-subtree sets the buffer to the archive file.

--
Kyle



Re: [O] Customize org-todo-repeat-to-state to return to previous TODO state

2014-11-21 Thread Brady Trainor
Grant Schissler  writes:

> Hi Org-mode Users,
>
> I am trying to change the behavior of marking a repeated task as DONE.  I 
> would like the task to return to the current TODO state rather than the first 
> in 
> the TODO sequence or a fixed state.  For example,
>
> ** APPT Lunch with Mallorie
> <2014-12-04 Thu 12:00 +1w>
>
> should return to APPT, not TODO or some other predefined state as in the 
> current behavior:
>
> TODO Lunch with Mallorie
> - State "DONE"   from "APPT"   [2014-11-21 Fri 10:56]
> <2014-12-11 Thu 12:00 +1w>
>
> I am sure that customizing the org-todo-repeat-to-state will do the trick, 
> but 
> sadly, I have had the time to learn elisp well enough to perform this.
>
> Any help would be much appreciated.  Please let me know if you have 
> questions.
>
> Thanks for the support and to all those that make org-mode great!
> Grant

I haven't tried any of the following, and there may be better solutions, but...

It looks like the variable you mention reads as (via C-h v 
org-todo-repeat-to-state RET and follow link to source), 

#+BEGIN_SRC emacs-lisp
(defcustom org-todo-repeat-to-state nil
  "The TODO state to which a repeater should return the repeating task.
By default this is the first task in a TODO sequence, or the previous state
in a TODO_TYP set.  But you can specify another task here.
alternatively, set the :REPEAT_TO_STATE: property of the entry."
  :group 'org-todo
  :version "24.1"
  :type '(choice (const :tag "Head of sequence" nil)
 (string :tag "Specific state")))

#+END_SRC

It looks like this variable will not allow to recall the previous TODO state. 
But you could make a separate TODO_TYP set.

Depending on whether you define your TODO states in an init file or per-file 
base, you could try an extra line in your org file "header",

#+BEGIN_SRC org
,#+TYP_TODO: APPT | DONE
#+END_SRC

or an extra block in your org-todo-keywords variable

#+BEGIN_SRC emacs-lisp
(setq org-todo-keywords '((type "APPT" "|" "DONE")))
#+END_SRC

Another solution according to the above would be to use a property drawer, 

#+BEGIN_SRC org
,** APPT Lunch with Mallorie
<2014-12-04 Thu 12:00 +1w>
:PROPERTIES:
:REPEAT_TO_STATE: APPT
:END:
#+END_SRC

You can get this via C-c C-x p repeat_to_state RET APPT RET.

Interestingly, there is a function in the same source file, 
org-auto-repeat-maybe, which suggests that it does exactly what you ask for. 

#+BEGIN_EXAMPLE
org-auto-repeat-maybe is a compiled Lisp function in `org.el'.

(org-auto-repeat-maybe DONE-WORD)

Check if the current headline contains a repeated deadline/schedule.
If yes, set TODO state back to what it was and change the base date
of repeating deadline/scheduled time stamps to new date.
This function is run automatically after each state change to a DONE state.

[back]
#+END_EXAMPLE

I can see in the definition of the function it has an expression 
org-last-state, so maybe that suggests there is a way built-in (or intended 
to?), but I only took that quick look at the source. 

--
Brady



Re: [O] babel, header arguments.

2014-11-21 Thread jenia.ivlev
t...@tsdye.com (Thomas S. Dye) writes:

> jenia.iv...@gmail.com (jenia.ivlev) writes:
>
>> t...@tsdye.com (Thomas S. Dye) writes:
>>
>>> Aloha,
>>>
>>> jenia.iv...@gmail.com (jenia.ivlev) writes:
>>>
 Also, what if I want to import the actual function defintion into
 another src block:

 #+begin_src scheme
 (+ (my-plus 3 4) 1)
 #+end_src
 something here that import the previous function definitions

 Is that possible?
>>>
>>> Yes, see section 14.10 Noweb reference syntax in the manual.
>>>
>>> You'll have something that looks like this:
>>>
>>> #+header: :noweb yes
>>> #+begin_src scheme
>>>   <>
>>>   (+ (previous-function 3 4) 1)
>>> #+end_src
>>>
>>> hth,
>>> Tom
>>
>> What do you mean? <> should be replaced
>> with the actual function definition? But I use babel-mode so that I can
>> interlace code in a natural language document. I want these src blocks
>> to be separate.
>>
>>
>
> Sorry, it refers to the name of the source code block.
>
> ,-
> | The “noweb” (see ) Literate 
> | Programming system allows named blocks of code to be referenced by using
> | the familiar Noweb syntax:  
> | 
> |  <>
> `-
>
> hth,
> Tom


I have one last quick question, I have an exmaple here with no-web that
I think should work but doesnt. I wonder why:

#+BEGIN_SRC C :noweb-ref begin
int main() {
  printf("Line 1\n");

#+END_SRC

#+BEGIN_SRC C  :noweb-ref middle
printf("Second\n");
#+END_SRC

#+BEGIN_SRC C  :noweb-ref end
}
main();
#+END_SRC


#+BEGIN_SRC C  :noweb yes

<>
<>
<>
printf("some appropriate debug word");

 
#+END_SRC

And the output is:
/tmp/babel-15080Ms4/C-src-150805OE.c: In function ‘main’:
/tmp/babel-15080Ms4/C-src-150805OE.c:6:7: warning: incompatible implicit 
declaration of built-in function ‘printf’
   printf("Line 1\n");
   ^
/tmp/babel-15080Ms4/C-src-150805OE.c: At top level:
/tmp/babel-15080Ms4/C-src-150805OE.c:10:5: warning: data definition has no 
type or storage class
 main();
 ^
/tmp/babel-15080Ms4/C-src-150805OE.c:12:8: error: expected declaration 
specifiers or ‘...’ before string constant
 printf("asti");
^
/bin/bash: /tmp/babel-15080Ms4/C-bin-15080GZK: Permission denied

Or if I dont include the 

printf("some appropriate debug word");

then, I get no output at all.

`Code block produced no output.`


So my question is how do I make this work. lol.


Thanks in advance again




[O] Problems with habit graph in the master branch

2014-11-21 Thread Bernt Hansen
Hi,

I tried out the master branch today and the habit graph seems to be
broken.

Habits display as normal repeating tasks in commit

40f2b88 (Open outer link on nested links, 2014-11-20)

and work normally in commit

7429f35 (Merge branch 'maint', 2014-10-22)

Sorry I don't have time to track down the problem commit at the moment.

Regards,
Bernt



Re: [O] Customizing org-todo-repeat-to-state to return to the current TODO state

2014-11-21 Thread Grant Schissler
Sorry, Nick.  I understand your point better now.  It may take a lot of
reorganizing, but I will let you know if I find something that works for
me. Thanks

On Fri, Nov 21, 2014 at 1:13 PM, Nick Dokos  wrote:

> Sebastien Vauban 
> writes:
>
> > Grant Schissler wrote:
> >> I am trying to change the behavior of marking a repeated task as DONE.
> I
> >> would like the task to return to the current TODO state rather than the
> >> first in the TODO sequence or a fixed state.  For example,
> >>
> >> ** APPT Lunch with Mallorie
> >> <2014-12-04 Thu 12:00 +1w>
> >>
> >> Should return to APPT, not TODO or some other predefined state as in the
> >> current behavior:
> >>
> >> TODO Lunch with Mallorie
> >> - State "DONE"   from "APPT"   [2014-11-21 Fri 10:56]
> >> <2014-12-11 Thu 12:00 +1w>
> >>
> >> I am sure that customizing the org-todo-repeat-to-state will do the
> trick,
> >> but sadly, I have had the time to learn elisp well enough to perform
> this.
> >>
> >> Any help would be much appreciated.  Please let me know if you have
> >> questions.
> >
> >   ;; TODO state to which a repeater should return the repeating task.
> >   (setq org-todo-repeat-to-state "APPT")
> >
>
> That may not be the best solution however: it would change it globally,
> so *every* repeater would go back to APPT.
>
> C-h v org-todo-repeat-to-state RET says:
>
> ,
> | The TODO state to which a repeater should return the repeating task.
> | By default this is the first task in a TODO sequence, or the previous
> state
> | in a TODO_TYP set.  But you can specify another task here.
> | alternatively, set the :REPEAT_TO_STATE: property of the entry.
> `
>
> so setting the property of the entry might be better.
>
> Personally, I have my appointments in a separate file with its own
> TODO sequence:
>
> #+TODO: APPT | DONE
>
> Nick
>
>
>


-- 
A. Grant Schissler, M.S
GIDP Statistics, University of Arizona
Research Assistant, Lussier Lab


[O] Missing commit in maint

2014-11-21 Thread Bernt Hansen
Hi!

The following commit

6202ec7 (Remove need to declare drawers before using them, 2013-10-20)

has been in the master branch for over a year but I can't find it in any
maintenance releases since then.  Is this intentional?

I am using the function 

(defun org-remove-empty-drawer-at (pos)

in my .emacs setup and this changed signature in the above commit in the
master branch only a year ago.

Is this commit supposed to be applied to maint? And if not should it be
removed from the master branch so we are not carrying around this change
forever?

Thanks,
Bernt



Re: [O] Customizing org-todo-repeat-to-state to return to the current TODO state

2014-11-21 Thread Grant Schissler
That is a nice workaround, but does anyone have any ideas that I could
continue to use my main org file?  Also, what is meant by "the previous
state in TYPO_TYP set"?  Thank you very much for the suggestion.

On Fri, Nov 21, 2014 at 1:13 PM, Nick Dokos  wrote:

> Sebastien Vauban 
> writes:
>
> > Grant Schissler wrote:
> >> I am trying to change the behavior of marking a repeated task as DONE.
> I
> >> would like the task to return to the current TODO state rather than the
> >> first in the TODO sequence or a fixed state.  For example,
> >>
> >> ** APPT Lunch with Mallorie
> >> <2014-12-04 Thu 12:00 +1w>
> >>
> >> Should return to APPT, not TODO or some other predefined state as in the
> >> current behavior:
> >>
> >> TODO Lunch with Mallorie
> >> - State "DONE"   from "APPT"   [2014-11-21 Fri 10:56]
> >> <2014-12-11 Thu 12:00 +1w>
> >>
> >> I am sure that customizing the org-todo-repeat-to-state will do the
> trick,
> >> but sadly, I have had the time to learn elisp well enough to perform
> this.
> >>
> >> Any help would be much appreciated.  Please let me know if you have
> >> questions.
> >
> >   ;; TODO state to which a repeater should return the repeating task.
> >   (setq org-todo-repeat-to-state "APPT")
> >
>
> That may not be the best solution however: it would change it globally,
> so *every* repeater would go back to APPT.
>
> C-h v org-todo-repeat-to-state RET says:
>
> ,
> | The TODO state to which a repeater should return the repeating task.
> | By default this is the first task in a TODO sequence, or the previous
> state
> | in a TODO_TYP set.  But you can specify another task here.
> | alternatively, set the :REPEAT_TO_STATE: property of the entry.
> `
>
> so setting the property of the entry might be better.
>
> Personally, I have my appointments in a separate file with its own
> TODO sequence:
>
> #+TODO: APPT | DONE
>
> Nick
>
>
>


-- 
A. Grant Schissler, M.S
GIDP Statistics, University of Arizona
Research Assistant, Lussier Lab


Re: [O] babel, header arguments.

2014-11-21 Thread Thomas S. Dye
jenia.iv...@gmail.com (jenia.ivlev) writes:

> t...@tsdye.com (Thomas S. Dye) writes:
>
>> Aloha,
>>
>> jenia.iv...@gmail.com (jenia.ivlev) writes:
>>
>>> Also, what if I want to import the actual function defintion into
>>> another src block:
>>>
>>> #+begin_src scheme
>>> (+ (my-plus 3 4) 1)
>>> #+end_src
>>> something here that import the previous function definitions
>>>
>>> Is that possible?
>>
>> Yes, see section 14.10 Noweb reference syntax in the manual.
>>
>> You'll have something that looks like this:
>>
>> #+header: :noweb yes
>> #+begin_src scheme
>>   <>
>>   (+ (previous-function 3 4) 1)
>> #+end_src
>>
>> hth,
>> Tom
>
> What do you mean? <> should be replaced
> with the actual function definition? But I use babel-mode so that I can
> interlace code in a natural language document. I want these src blocks
> to be separate.
>
>

Sorry, it refers to the name of the source code block.

,-
| The “noweb” (see ) Literate 
| Programming system allows named blocks of code to be referenced by using
| the familiar Noweb syntax:  
| 
|  <>
`-

hth,
Tom

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



Re: [O] Customizing org-todo-repeat-to-state to return to the current TODO state

2014-11-21 Thread Grant Schissler
Sorry, I wasn't clear what I meant by "fixed state."  I want to avoid
globally changing the repeat-to-state and flexibly return to the current
state.  Thanks for the suggestion though

On Fri, Nov 21, 2014 at 1:02 PM, Sebastien Vauban 
wrote:

> Grant Schissler wrote:
> > I am trying to change the behavior of marking a repeated task as DONE.  I
> > would like the task to return to the current TODO state rather than the
> > first in the TODO sequence or a fixed state.  For example,
> >
> > ** APPT Lunch with Mallorie
> > <2014-12-04 Thu 12:00 +1w>
> >
> > Should return to APPT, not TODO or some other predefined state as in the
> > current behavior:
> >
> > TODO Lunch with Mallorie
> > - State "DONE"   from "APPT"   [2014-11-21 Fri 10:56]
> > <2014-12-11 Thu 12:00 +1w>
> >
> > I am sure that customizing the org-todo-repeat-to-state will do the
> trick,
> > but sadly, I have had the time to learn elisp well enough to perform
> this.
> >
> > Any help would be much appreciated.  Please let me know if you have
> > questions.
>
>   ;; TODO state to which a repeater should return the repeating task.
>   (setq org-todo-repeat-to-state "APPT")
>
> Best regards,
>   Seb
>
> --
> Sebastien Vauban
>
>
>


-- 
A. Grant Schissler, M.S
GIDP Statistics, University of Arizona
Research Assistant, Lussier Lab


Re: [O] babel, header arguments.

2014-11-21 Thread jenia.ivlev
jenia.iv...@gmail.com (jenia.ivlev) writes:

> t...@tsdye.com (Thomas S. Dye) writes:
>
>> Aloha,
>>
>> jenia.iv...@gmail.com (jenia.ivlev) writes:
>>
>>> Also, what if I want to import the actual function defintion into
>>> another src block:
>>>
>>> #+begin_src scheme
>>> (+ (my-plus 3 4) 1)
>>> #+end_src
>>> something here that import the previous function definitions
>>>
>>> Is that possible?
>>
>> Yes, see section 14.10 Noweb reference syntax in the manual.
>>
>> You'll have something that looks like this:
>>
>> #+header: :noweb yes
>> #+begin_src scheme
>>   <>
>>   (+ (previous-function 3 4) 1)
>> #+end_src
>>
>> hth,
>> Tom
>
> What do you mean? <> should be replaced
> with the actual function definition? But I use babel-mode so that I can
> interlace code in a natural language document. I want these src blocks
> to be separate.
>
>
>


Tom, thanks so so much.
If someone is interested: 

#+name: my-plus
#+begin_src scheme :noweb-ref my-plus
(define my-plus
  (lambda (x y) (+ x y)))
(my-plus 3 3)
#+end_src

#+RESULTS: my-plus
: 6


#+name: my-plus2
#+header: :noweb yes 
#+begin_src scheme
<>
(define my-plus2
  (lambda () (+ (my-plus 3 4) 1)))
(my-plus2)
#+end_src

#+RESULTS: my-plus2
: 8




Re: [O] Customizing org-todo-repeat-to-state to return to the current TODO state

2014-11-21 Thread Sharon Kimble
Grant Schissler  writes:

> Hi Org-mode Users,
>
> I am trying to change the behavior of marking a repeated task as DONE.  I 
> would like the task to return to the current TODO state rather than the
> first in the TODO sequence or a fixed state.  For example,
>
> ** APPT Lunch with Mallorie
> <2014-12-04 Thu 12:00 +1w>
>
> Should return to APPT, not TODO or some other predefined state as in the 
> current behavior:
>
> TODO Lunch with Mallorie
> - State "DONE"       from "APPT"       [2014-11-21 Fri 10:56]
> <2014-12-11 Thu 12:00 +1w>
>
> I am sure that customizing the org-todo-repeat-to-state will do the trick, 
> but sadly, I have had the time to learn elisp well enough to perform
> this.
>
> Any help would be much appreciated.  Please let me know if you have questions.
>
> Thanks for the support and to all those that make org-mode great!
> Grant
>
Hi Grant.

This is what I have for a repeating task every Friday morning.

--8<---cut here---start->8---
** TODO Hancock's half hour, new programmes on Radio 4
SCHEDULED: <2014-11-28 Fri 11:30 +7d>
- State "DONE"   from "TODO"   [2014-11-21 Fri 18:11]
- State "DONE"   from "TODO"   [2014-11-14 Fri 12:18]
- State "DONE"   from "TODO"   [2014-11-02 Sun 08:34]
:LOGBOOK:  
- State "DONE"   from "TODO"   [2014-11-07 Fri 13:57]
- State "DONE"   from "TODO"   [2014-11-01 Sat 10:06]
:END:  
:PROPERTIES:
:LAST_REPEAT: [2014-11-21 Fri 18:11]
:END:
--8<---cut here---end--->8---

To progress it from TODO via DONE and back to TODO, I do "C-c t d"
and its all set up for the next week.

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


signature.asc
Description: PGP signature


Re: [O] Customizing org-todo-repeat-to-state to return to the current TODO state

2014-11-21 Thread Nick Dokos
Sebastien Vauban 
writes:

> Grant Schissler wrote:
>> I am trying to change the behavior of marking a repeated task as DONE.  I
>> would like the task to return to the current TODO state rather than the
>> first in the TODO sequence or a fixed state.  For example,
>>
>> ** APPT Lunch with Mallorie
>> <2014-12-04 Thu 12:00 +1w>
>>
>> Should return to APPT, not TODO or some other predefined state as in the
>> current behavior:
>>
>> TODO Lunch with Mallorie
>> - State "DONE"   from "APPT"   [2014-11-21 Fri 10:56]
>> <2014-12-11 Thu 12:00 +1w>
>>
>> I am sure that customizing the org-todo-repeat-to-state will do the trick,
>> but sadly, I have had the time to learn elisp well enough to perform this.
>>
>> Any help would be much appreciated.  Please let me know if you have
>> questions.
>
>   ;; TODO state to which a repeater should return the repeating task.
>   (setq org-todo-repeat-to-state "APPT")
>

That may not be the best solution however: it would change it globally,
so *every* repeater would go back to APPT.

C-h v org-todo-repeat-to-state RET says:

,
| The TODO state to which a repeater should return the repeating task.
| By default this is the first task in a TODO sequence, or the previous state
| in a TODO_TYP set.  But you can specify another task here.
| alternatively, set the :REPEAT_TO_STATE: property of the entry.
`

so setting the property of the entry might be better.

Personally, I have my appointments in a separate file with its own
TODO sequence:

#+TODO: APPT | DONE

Nick




Re: [O] babel, header arguments.

2014-11-21 Thread jenia.ivlev
t...@tsdye.com (Thomas S. Dye) writes:

> Aloha,
>
> jenia.iv...@gmail.com (jenia.ivlev) writes:
>
>> Also, what if I want to import the actual function defintion into
>> another src block:
>>
>> #+begin_src scheme
>> (+ (my-plus 3 4) 1)
>> #+end_src
>> something here that import the previous function definitions
>>
>> Is that possible?
>
> Yes, see section 14.10 Noweb reference syntax in the manual.
>
> You'll have something that looks like this:
>
> #+header: :noweb yes
> #+begin_src scheme
>   <>
>   (+ (previous-function 3 4) 1)
> #+end_src
>
> hth,
> Tom

What do you mean? <> should be replaced
with the actual function definition? But I use babel-mode so that I can
interlace code in a natural language document. I want these src blocks
to be separate.




Re: [O] Customizing org-todo-repeat-to-state to return to the current TODO state

2014-11-21 Thread Sebastien Vauban
Grant Schissler wrote:
> I am trying to change the behavior of marking a repeated task as DONE.  I
> would like the task to return to the current TODO state rather than the
> first in the TODO sequence or a fixed state.  For example,
>
> ** APPT Lunch with Mallorie
> <2014-12-04 Thu 12:00 +1w>
>
> Should return to APPT, not TODO or some other predefined state as in the
> current behavior:
>
> TODO Lunch with Mallorie
> - State "DONE"   from "APPT"   [2014-11-21 Fri 10:56]
> <2014-12-11 Thu 12:00 +1w>
>
> I am sure that customizing the org-todo-repeat-to-state will do the trick,
> but sadly, I have had the time to learn elisp well enough to perform this.
>
> Any help would be much appreciated.  Please let me know if you have
> questions.

  ;; TODO state to which a repeater should return the repeating task.
  (setq org-todo-repeat-to-state "APPT")

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] babel, header arguments.

2014-11-21 Thread Thomas S. Dye
Aloha,

jenia.iv...@gmail.com (jenia.ivlev) writes:

> Also, what if I want to import the actual function defintion into another src
> block:
>
> #+begin_src scheme
> (+ (my-plus 3 4) 1)
> #+end_src
> something here that import the previous function definitions
>
> Is that possible?

Yes, see section 14.10 Noweb reference syntax in the manual.

You'll have something that looks like this:

#+header: :noweb yes
#+begin_src scheme
  <>
  (+ (previous-function 3 4) 1)
#+end_src

hth,
Tom

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



Re: [O] babel, header arguments.

2014-11-21 Thread jenia.ivlev
Sebastien Vauban 
writes:

> jenia.ivlev wrote:
>> So lets say there's this function:
>>
>> #+name: my-plus
>> #+begin_src scheme
>> (define my-plus
>>   (lambda (x y) (+ x y)))
>> #+end_src
>>
>> And i want to call it from another source block, like so:
>>
>> #+tblname: addition
>> | sum|
>> ||
>> | #ERROR |
>> #+TBLFM: @2$1='(org-sbe "my-plus" (33 22))
>>
>> As you can see, I get an error. How do I write these "header-arguments"
>> (i think they are called) to achieve calling one src-block from another.
>
> This should do it (untested):
>
> (org-sbe "my-plus" (x 33) (y 22))
>
>> Also, second scenario, can I somehow call my-plus from a source-block as
>> so:
>>
>>  #+begin_src scheme
>>  (my-plus 3 4)
>>  #+end_src
>
> I think you must also call `org-sbe'.
>
> Best regards,
>   Seb

Thanks a lot Seb. It worked perfectly for the table.
For the "second scenario" I don't understand how to import the results
of my-plus function. The only thing I can think of is something like 
this (it doesnt work by the way):

#+begin_src scheme
(+ z 1)
#+end_src
#+ z='(org-sbe "my-plus" (x 33) (y 22))

Also, what if I want to import the actual function defintion into another src
block:

#+begin_src scheme
(+ (my-plus 3 4) 1)
#+end_src
something here that import the previous function definitions

Is that possible?









[O] Customizing org-todo-repeat-to-state to return to the current TODO state

2014-11-21 Thread Grant Schissler
Hi Org-mode Users,

I am trying to change the behavior of marking a repeated task as DONE.  I
would like the task to return to the current TODO state rather than the
first in the TODO sequence or a fixed state.  For example,

** APPT Lunch with Mallorie
<2014-12-04 Thu 12:00 +1w>

Should return to APPT, not TODO or some other predefined state as in the
current behavior:

TODO Lunch with Mallorie
- State "DONE"   from "APPT"   [2014-11-21 Fri 10:56]
<2014-12-11 Thu 12:00 +1w>

I am sure that customizing the org-todo-repeat-to-state will do the trick,
but sadly, I have had the time to learn elisp well enough to perform this.

Any help would be much appreciated.  Please let me know if you have
questions.

Thanks for the support and to all those that make org-mode great!
Grant


[O] Customize org-todo-repeat-to-state to return to previous TODO state

2014-11-21 Thread Grant Schissler
Hi Org-mode Users,

I am trying to change the behavior of marking a repeated task as DONE.  I 
would like the task to return to the current TODO state rather than the first 
in 
the TODO sequence or a fixed state.  For example,

** APPT Lunch with Mallorie
<2014-12-04 Thu 12:00 +1w>

should return to APPT, not TODO or some other predefined state as in the 
current behavior:

TODO Lunch with Mallorie
- State "DONE"   from "APPT"   [2014-11-21 Fri 10:56]
<2014-12-11 Thu 12:00 +1w>

I am sure that customizing the org-todo-repeat-to-state will do the trick, but 
sadly, I have had the time to learn elisp well enough to perform this.

Any help would be much appreciated.  Please let me know if you have 
questions.

Thanks for the support and to all those that make org-mode great!
Grant




[O] org-archive-save-context-info as local variable

2014-11-21 Thread Jorge A. Alfaro-Murillo

Hi list,

I am planning to collaborate on a project with another org-mode 
user (such a joy). For each org file we want to keep an archive as 
well in the git repository. With this work flow it does not make 
sense to keep track of the file property in 
`org-archive-save-context-info', since it will be different 
depending on the location of the repository in each computer. And 
since I did not want force a global configuration for this 
variable, I tried to add the variable as local in the first line 
of the file:


# -*- mode: org; org-archive-save-context-info: (time olpath 
 todo); -*- 

This sets the variable as local fine, but when I call 
`org-archive-subtree', it seems like this command still uses the 
global value of `org-archive-save-context-info' and keeps 
information on the file location in the archive.


Does someone know why setting this variable as local does not work 
with `org-archive-subtree'? Is there another approach for setting 
org-mode variables on a per file basis?


Best,

--
Jorge.




[O] org-context at the beginning of a link

2014-11-21 Thread Alan Schmitt
Hello,

I'm using a function that relies on `org-element-link-parser'. According
to the documentation, the point needs to be at the element of the link
for it to work. I wrote a small function that takes me to the beginning
of a link, but it fails when the point is already at the beginning of
the link. Here is a reproducible recipe showing the problem.

Open this attached tiny org file: Start

[[file:link.org][link]]

End

Put the point on the 'i' of "link", for instance by (goto-char 26).

Look up the context: (org-context). I get ((:link 8 31))

Go to the beginning of the link: (goto-char 8)

Look up the context: (org-context). I get ((:link nil 31))

Is there a reason why the context is different at the beginning of the
link?

Thanks,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


signature.asc
Description: PGP signature


Re: [O] Subfloats in org - easier way?

2014-11-21 Thread Rainer M Krug
Rasmus  writes:

> Hi,
>
> Rainer M Krug  writes:
>
>> I want to include in a document, exported to LaTeX, a subfigure. and
>> followed the blog entry [1]. This works, but
>>
>> 1) is cumbersome and extemely LaTex - I can live with this, but is
>>there a more org-modeisch solution?
>> 2) I cant use the link (Figure [[fig:ventLEL]]) as they got not replaced
>>by the correct LaTeX commands. This is obvious (as I did not
>>use #+CAPTION: for the caption), but is there a way, apart from
>>using the LaTeX code for these links, to get the links into the
>>document?
>
> I don't think there's an "official" way to do this.  Presumably it
> /could/ use the same mechanisms as when concatenating tables into an
> equation of matrices, but at the moment there's nothing like it.
>
> I don't know if this is much better. It would probably require some
> effort to make it work in other backends than latex and it's pretty
> verbose.
>
> #+LATEX_HEADER: \usepackage{subcaption}
>
> #+CAPTION: Main caption
> #+begin_figure
> #+ATTR_LATEX: :options [t]{.45\textwidth}
> #+CAPTION: subcaption 1
> #+BEGIN_subfigure
> #+BEGIN_CENTER
> #+ATTR_LATEX: :width 3cm 
> [[file:tmpEOCX1p.jpg]]
> #+END_CENTER
> #+end_subfigure
> #+ATTR_LATEX: :options [t]{.45\textwidth} :width 2cm 
> #+CAPTION: subcaption 2
> #+begin_subfigure
> #+BEGIN_CENTER
> #+ATTR_LATEX: :width 3cm :center t
> [[file:tmpEOCX1p.jpg]]
> #+END_CENTER
> #+end_subfigure
> #+end_figure
>
> Hope it helps,


Thanks - it definitely does - even with labels and links.

Thanks a lot,

Rainer

Here my solution including the links to subfigures:

,
| A comparative plot of the matlab script and the R script shows that
| these two algorithms give the same results when using the same
| parameter (Figure [[fig:ventLEL]], matlab [[fig:ventLEL_matlab]], R  
[[fig:ventLEL_matlab_R]]).
| 
| A comparative plot of the matlab script and the R script shows that
| these two algorithms give the same results when using the same
| parameter (Figure [[fig:ventLEL]], matlab [[fig:ventLEL_matlab]], R  
[[fig:ventLEL_matlab_R]]).
| 
| #+CAPTION: Plot of the wind profile from the matlab script using the 
Log-Exp-Log profile
| #+LABEL: fig:ventLEL
| #+begin_figure
|   #+ATTR_LATEX: :options [t]{.45\textwidth}
|   #+CAPTION: Matlab script vent5
|   #+LABEL: fig:ventLEL_matlab
|   #+BEGIN_subfigure
| #+BEGIN_CENTER
|   [[file:inst/matlab/plots/vent5.pdf]]
| #+END_CENTER
|   #+end_subfigure
|   #+ATTR_LATEX: :options [t]{.45\textwidth}
|   #+CAPTION: R function uLEL()
|   #+LABEL: fig:=ventLEL_R
|   #+begin_subfigure
| #+BEGIN_CENTER
|   #+begin_src R :exports results :file rVentLEL.pdf :results graphics
| plot(runif(100))
|   #+end_src
|   #+RESULTS:
|   [[file:rVentLEL.pdf]]
| #+END_CENTER
|   #+end_subfigure
| #+end_figure
`



> Rasmus

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


signature.asc
Description: PGP signature


[O] Is there any way to hide all empty headings?

2014-11-21 Thread Marcin Borkowski
Hi list,

I'd like to (temporarily) hide all the empty headings (and – if possible
– headings which contain only subheadings and no „real content”).  Is
that possible?

Best,

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



Re: [O] Subfloats in org - easier way?

2014-11-21 Thread Rasmus
Hi,

Rainer M Krug  writes:

> I want to include in a document, exported to LaTeX, a subfigure. and
> followed the blog entry [1]. This works, but
>
> 1) is cumbersome and extemely LaTex - I can live with this, but is
>there a more org-modeisch solution?
> 2) I cant use the link (Figure [[fig:ventLEL]]) as they got not replaced
>by the correct LaTeX commands. This is obvious (as I did not
>use #+CAPTION: for the caption), but is there a way, apart from
>using the LaTeX code for these links, to get the links into the
>document?

I don't think there's an "official" way to do this.  Presumably it
/could/ use the same mechanisms as when concatenating tables into an
equation of matrices, but at the moment there's nothing like it.

I don't know if this is much better. It would probably require some
effort to make it work in other backends than latex and it's pretty
verbose.

#+LATEX_HEADER: \usepackage{subcaption}

#+CAPTION: Main caption
#+begin_figure
#+ATTR_LATEX: :options [t]{.45\textwidth}
#+CAPTION: subcaption 1
#+BEGIN_subfigure
#+BEGIN_CENTER
#+ATTR_LATEX: :width 3cm 
[[file:tmpEOCX1p.jpg]]
#+END_CENTER
#+end_subfigure
#+ATTR_LATEX: :options [t]{.45\textwidth} :width 2cm 
#+CAPTION: subcaption 2
#+begin_subfigure
#+BEGIN_CENTER
#+ATTR_LATEX: :width 3cm :center t
[[file:tmpEOCX1p.jpg]]
#+END_CENTER
#+end_subfigure
#+end_figure

Hope it helps,
Rasmus

-- 
May the Force be with you




[O] Subfloats in org - easier way?

2014-11-21 Thread Rainer M Krug

Hi

I want to include in a document, exported to LaTeX, a subfigure. and
followed the blog entry [1]. This works, but

1) is cumbersome and extemely LaTex - I can live with this, but is
   there a more org-modeisch solution?
2) I cant use the link (Figure [[fig:ventLEL]]) as they got not replaced
   by the correct LaTeX commands. This is obvious (as I did not
   use #+CAPTION: for the caption), but is there a way, apart from
   using the LaTeX code for these links, to get the links into the
   document?

Thanks,

Rainer

* The example
#+LATEX: \begin{figure}\centering
#+LATEX: \subfloat[matlab]{\label{fig:matlabVentLEL}
#+ATTR_LATEX: :height 0.45\textwidth
[[file:inst/matlab/plots/vent5.pdf]]
#+LATEX: } 
#+LATEX: \subfloat[R]{\label{fig:rVentLEL}

#+begin_src R :exports results :file rVentLEL.pdf :results graphics
plot(runif(10))
#+end_src
#+ATTR_LATEX: :height 0.45\textwidth
#+RESULTS:
[[file:rVentLEL.pdf]]

#+LATEX: }\caption{Plot of the wind profile from the matlab script using the 
Log-Exp-Log profile}\label{fig:ventLEL}
#+LATEX: \end{figure}



Footnotes: 
[1]  
http://draketo.de/light/english/emacs/write-multiple-images-single-page-org-mode

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


signature.asc
Description: PGP signature


Re: [O] [PATH] Speedups to org-table-recalculate

2014-11-21 Thread Nathaniel Flath
OK, I think I fixed that.

Yes, I have signed FSF papers.

On Sat, Nov 15, 2014 at 4:07 AM, Nicolas Goaziou 
wrote:

> Hello,
>
> Michael Brand  writes:
>
> > In my opinion the newest patches can be applied, tests passed on my
> > side. Thank you.
>
> Thanks.
>
> However, I get compilation errors, probably due to the macro
> `org-table-execute-once-per-second'. In particular, using multiple ",t1"
> isn't a good idea.
>
> BTW, Nathaniel, these patches are no tiny changes. Have you signed FSF
> papers yet?
>
>
> Regards,
>
> --
> Nicolas Goaziou
>


0001-org-table.el-org-table-recalculate-is-quieter.patch
Description: Binary data


0001-org-table.el-org-table-recalculate-early-returns(1).patch
Description: Binary data


Re: [O] Bernt Hansen's

2014-11-21 Thread Sebastien Vauban
Hello Rene,

rene wrote:
>> Indeed - Bernt's writeup has been the source of inspiration for lots of
>> people on this list.

For sure.

> I find his code pretty close to what GTD should look like.  There are a few
> things though that could be twicked a bit in order to comply with David
> Allen's new book on Getting Things Done.

Can you detail them, for our own information, please?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Bug: [Capture] wrongly duplicated date tree outlines [8.2.10]

2014-11-21 Thread Eric S Fraga
On Friday, 21 Nov 2014 at 04:37, kuanyui wrote:
> I want to have a `file+datetree` for Org-mode's Capture, so I set like this:

[...]

> How to solve this problem...? (I've ever used Org's Capture one year
> ago, and at that time it worked just liked I wish; I have no idea why it
> becomes this.)

[...]

> Emacs  : GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.9)
>  of 2014-10-23 on kuanyui-laptop.site
> Package: Org-mode version 8.2.10 (release_8.2.10 @ 
> /usr/local/share/emacs/24.4/lisp/org/)

There were problems with the datetree functionality a little while
ago.  In my case, entries got put in the slot for the day before...  I
cannot remember which version of org was affected but I use this
functionality all the time and it has been working fine for a while now.

I suggest you upgrade your version of org.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-581-g0e52f0