Re: [O] org-create-formula--latex-header does not respect latex_header in included file

2013-07-04 Thread subi . the . dream . walker
Hello,

I DO missed the #+setupfile. Thanks for the tip!

Regards,

Bing Sun



Re: [O] [babel] feature request: debug messages

2013-07-04 Thread Andreas Leha
Hi Eric,


Eric Schulte schulte.e...@gmail.com writes:

 Hi Andreas,

 This should be easy to turn on or off using the newly introduced
 :prologue and :epilogue header arguments.  See the manual and the
 following example.

 #+Title: debug messages
 #+Property: session *R*
 #+Property: prologue (format print(\entering %s\) (get-current-name))

 An elisp block to simplify the =:prologue= definition.
 #+begin_src emacs-lisp
   (defun get-current-name ()
 (save-excursion
   (goto-char org-babel-current-src-block-location)
   (while (and (forward-line -1)
   (looking-at org-babel-multi-line-header-regexp)))
   (when (looking-at org-babel-src-name-w-name-regexp)
 (org-no-properties (match-string 3)
 #+end_src

 Two blocks with simple assignments.

 #+name: block-1
 #+begin_src R
   x - 2 + 2
 #+end_src

 #+name: block-2
 #+begin_src R
   y - x + x
 #+end_src

 Execute the whole buffer =C-c C-v b= to see the prologue in action.

 Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Hi all,

 I would love to see messages like 'entering block foo...' and
 '...leaving block foo' printed to my R console.  This would be very
 handy when I evaluate a subtree (C-c C-v s) with a lot of #+call lines
 and some lengthy ones.

 I know that
 (1) I could implement that myself at in the source blocks.  But I would
 love if orgmode did that for me
 (2) Such messages are already printed to the emacs *Messages* buffer.
 But that buffer might not be visible and I can not switch to it,
 without interrupting the evaluation.  Anyway it would be much nicer
 to see that output together with the other output, that my code
 generates.


 In essence it would be very helpful, if there was a variable
 org-babel-print-debug-messages (or org-babel-debug-level...) which if
 non-nil would cause that messages to be printed.  Or is there somewhere
 already?

 Regards,
 Andreas






thanks for the quick answer!  The :prologue and :epilogue header
arguments have indeed slipped my attention and they look really
interesting!  I see, that they are documented, but somehow, they seem to
not get their headline and TOC entry?

I have three problems with your example, though:
1) It does not run
2) It does not work
3) It won't be usable for 'my' epilogue, correct?
;-)

1)
It does not run, because org tries to do the prologue also on the
emacs-lisp block defining the function of the prologue.  So, I get
format: Symbol's function definition is void: get-current-name
I changed the #+property line to
#+Property: header-args:R :prologue (format print(\entering %s\) 
(get-current-name))
which solved that problem.

2)
But still it does not work: This is what I get in my *R* buffer:
--8---cut here---start-8---

R version 3.0.1 (2013-05-16) -- Good Sport
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R ist freie Software und kommt OHNE JEGLICHE GARANTIE.
Sie sind eingeladen, es unter bestimmten Bedingungen weiter zu verbreiten.
Tippen Sie 'license()' or 'licence()' für Details dazu.

R ist ein Gemeinschaftsprojekt mit vielen Beitragenden.
Tippen Sie 'contributors()' für mehr Information und 'citation()',
um zu erfahren, wie R oder R packages in Publikationen zitiert werden können.

Tippen Sie 'demo()' für einige Demos, 'help()' für on-line Hilfe, oder
'help.start()' für eine HTML Browserschnittstelle zur Hilfe.
Tippen Sie 'q()', um R zu verlassen.

[1] C
filehash: Simple key-value database (2.2-1 2012-03-12)
tikzDevice: R Graphics Output in LaTeX Format (v0.6.2-92-0ad2792)
  LaTeX found in the PATH using the command: pdflatex
  XeLaTeX found in the PATH using the command: xelatex
  LuaLaTeX found in the PATH using the command: lualatex
 options(STERM='iESS', str.dendrogram.last=', editor='emacsclient', 
 show.error.locations=TRUE)

  
  
--8---cut here---end---8---

I tried it with
- Org-mode version 8.0.4 (release_8.0.4-294-g62f20c)
- ess-version : 13.05-1 [unknown]
- emacs -Q -l ~/.emacs.minimal.ess.org, whith that content:
--8---cut here---start-8---
(add-to-list 'load-path
  ~/local/emacs/org-mode-install/lisp)
(add-to-list 'auto-mode-alist '(\\.org$ . org-mode))

(add-to-list 'load-path ~/local/emacs/ess/lisp)
(require 'ess-site)

(setq org-babel-load-languages '((emacs-lisp . t)
 (R . t)
 (sh . t)))
--8---cut here---end---8---

What am I missing?  (BTW: If I put a print(sth) into the R blocks
myself, I see that printed)


3)
Even if it did run, I guess putting sth similar for 'leaving code block
foo' into the epilogue would spoil the return value of my src blocks,
correct?
Is there some work-around?



Regards,
Andreas





Re: [O] advice needed: how do you guys sync org files between devices?

2013-07-04 Thread Alan Schmitt
fatkasuvayu+li...@gmail.com writes:

 On Tue, Jul 02, 2013 at 04:27:27PM +0200, Alan Schmitt wrote:
 
 If someone can show me how to launch ediff from the command line, I can
 explain how to set up Unison for it (I found this old question
 http://superuser.com/questions/81958/how-to-make-emacsclient-wait-when-using-the-eval-option
 but I find the busy waiting very ugly; maybe there is a better
 solution).

 I presume the assumption is you want emacsclient to open the files in
 whatever GUI frame you have already open.  Another alternative would be
 to ask emacsclient to create a new frame (-c for GUI, -nw for text
 terminal); in that case it does not return immediately.

Thank you for the suggestion,

Alan



Re: [O] advice needed: how do you guys sync org files between devices?

2013-07-04 Thread Ian Barton

On 01/07/13 13:06, Xebar Saram wrote:

Hi all

I have been using dropbox since i started using orgmode a few weeks ago
(yeah im a neewb :)), which kinda works but i find it very annoying as
it keeps creating conflicted copies, isnt reliable on my Linux main
machine etc etc..

I was wondering what you guys do for syncing org files between PC's,
Os's, devices (android etc)..



I used to use Dropbox and git. However, as you have found I often got 
Conflicted Files. This is a particular problem if it happens in your 
.git folder, because it can lead to a corrupt git repo. Even though I 
have a remote git repo, this still lead to lots of wasted time trying to 
sort out the mess.


Recently I have been using BitTorrent Sync from 
http://labs.bittorrent.com/experiments/sync.html So far this works 
really well. If you are using Linux you need to do a bit of fiddling to 
get it to run as your local user, as it doesn't preserve file 
permissions. So if you are running it as a daemon files at the remote 
end all get up being owned by root.


The default is for two way synchronization. However, it's easy to set up 
one way sync. This is useful for backups. If you accidentally made a 
change in your backup, you wouldn't want it pushed back to your aster 
version.


I also run a cron job on my laptop, which is my main work machine. Every 
hour this commits my org files to my git repo and pushes the changes to 
my remote on a different computer.


Ian.





Re: [O] org-clock-is-active

2013-07-04 Thread Bastien
l.stelm...@samsung.com (Łukasz Stelmach) writes:

 The docstring says the function returns a *marker*. The function does not
 return org-clock-marker but only the buffer the clock is ticking in. You
 can't:

 (goto-char (org-clock-is-active))

 which should be possible according to goto-char's docstring

 (goto-char POSITION)

 Set point to POSITION, a number or *marker*.

 This is a minor inaccuracy, however, if you do not browse the code but
 only look at functions docstring, you may loose a few minutes.

Got it, fixed, thanks!

-- 
 Bastien



[O] [Babel] Inaccuracy in Sec. 14.8.2.13 `:noweb' of the manual

2013-07-04 Thread Christophe Pouzat

Hi all,



There seems to be a wrong statement in the description of the value 'strip-export' of header :noweb (Sec. 14.8.2.13) of the manual:


`strip-export' "Noweb" syntax references in the body of the code
block will be expanded before the block is evaluated or tangled.
However, "noweb" syntax references will not be removed when the
code block is exported.


The last phrase states that the noweb reference will not be removed but after trying it out with the last ELPA version of org (July 3rd), it turns out that it is removed (which makes sense given the name).



Happy 4th of July to all our friends on the other side of the Atlantic (as well as to the one(s) "lost" in the middle of the Pacific).



Christophe


-- 

Programming languages teach you not to want what they cannot provide.  You have 
to think in a language to write programs in it, and it's hard to want something 
you can't describe.

Paul Graham, ANSI Common Lisp.
--

Christophe Pouzat
MAP5 - Mathématiques Appliquées à Paris 5
CNRS UMR 8145
45, rue des Saints-Pères
75006 PARIS
France

tel: +33183945882
mobile: +33662941034
web: http://xtof.disque.math.cnrs.fr/


Re: [O] advice needed: how do you guys sync org files between devices?

2013-07-04 Thread Nicolas Richard
Ian Barton li...@wilkesley.net writes:
 I used to use Dropbox and git. However, as you have found I often got
 Conflicted Files. This is a particular problem if it happens in your
 .git folder, because it can lead to a corrupt git repo. Even though I
 have a remote git repo, this still lead to lots of wasted time trying
 to sort out the mess.

I use Dropbox+git with colleagues : Dropbox synchronizes the data almost
real time, whereas git tracks the changes. I commit manually when I see
meaningful changes. Wrt the .git directory, I simply ask Dropbox to
ignore it [on command line, dropbox exclude add Dropbox/foo/bar/.git
-- which can be done even before initializing the git repo in
Dropbox/foo/bar]

Btw I know that Dropbox has change tracking facilities too but I
dislike the UI (via a website). Also, I usually keep a local clone of my
Dropbox repositories (which are cheap with git, thanks to hard links)
that I can use to make temprorary checkout of older revisions without my
colleages getting hundreds of file updates. For the same reason I
(almost) don't use branches in these repos, since switching branches is
not Dropbox-friendly.

-- 
Nico.



[O] 4 warnings when installing package org from orgmode.org

2013-07-04 Thread Sebastien Vauban
Hello,

For the first time, I try the ELPA version of Org.

When installing it locally, I got 4 warnings:

--8---cut here---start-8---
In end of data:
ob-C.el:195:1:Warning: the function `org-element-type' might not be defined at
runtime.

In org-get-entries-from-diary:
org-agenda.el:5088:11:Warning: `diary-display-hook' is an obsolete variable
(as of 23.1); use `diary-display-function' instead.

In org-select-frame-set-input-focus:
org-compat.el:373:36:Warning: `w32-focus-frame' is an obsolete function (as of
23.1); use `x-focus-frame' instead.

In org-mode-flyspell-verify:
org.el:23554:8:Warning: function org-mode-flyspell-verify used to take 0+
arguments, now takes 0
--8---cut here---end---8---

Just wanted to report them...

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [Babel] Inaccuracy in Sec. 14.8.2.13 `:noweb' of the manual

2013-07-04 Thread Sebastien Vauban
Hello Christophe,

Christophe Pouzat wrote:
 There seems to be a wrong statement in the description of the value
 strip-export' of header :noweb (Sec. 14.8.2.13) of the manual:

   `strip-export' Noweb syntax references in the body of the code
   block will be expanded before the block is evaluated or tangled.
   However, noweb syntax references will not be removed when the
   code block is exported.

 The last phrase states that the noweb reference *will not be removed* but
 after trying it out with the last ELPA version of org (July 3rd), it turns
 out that *it is removed* (which makes sense given the name).

Yes, you're right; it should be:

However, noweb syntax references will be stripped when the code block is
exported.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Weekly clock reports for the previous or current week, with a per-dayproject breakdown?

2013-07-04 Thread Steinar Bang
 Bastien b...@gnu.org:

 Steinar Bang s...@dod.no writes:
 Hm... I get invalid key when pressing 'v' after doing 'C-c a'... am I
 missing some key binding or other setting?

 `C-c a' should be followed by the key for the agenda view you want to
 display.

Yes, I know.

 `v w' does its job when an agenda view is already displayed.

Yes, that's where and when it complains about invalid key v, when I
press v.

(I had to bind C-c a myself, that's why I was wondering if I was
missing some other keybinding)

Org-mode version 7.9.3f (release_7.9.3f-17-g7524ef @ 
c:/ProgramFiles/emacs-24.3/lisp/org/)
(ie. it's the version of org that came with the windows build of emacs 24.3)




Re: [O] [RFC] Changing internal representation of back-ends to defstructs

2013-07-04 Thread Nicolas Goaziou
Hello,

Carsten Dominik carsten.domi...@gmail.com writes:

 this does look like a good change - and hopefully few enough external backends
 have been written for this patch to not pose a problem.

Its almost exclusively an internal change. Only the removal of
`org-export-with-translations' might bite back-end developers, but
I would be surprised if this feature was used in the wild.

I applied the patches. Now, onto orgtbl-to-*.


Regards,

-- 
Nicolas Goaziou



Re: [O] [RFC] Changing internal representation of back-ends to defstructs

2013-07-04 Thread Bastien
Hi Nicolas,

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

 I applied the patches.

Is there anything that backend developers (both in core and contrib/)
should change in their code?

Thanks,

-- 
 Bastien



Re: [O] [RFC] Changing internal representation of back-ends to defstructs

2013-07-04 Thread Nicolas Goaziou
Hello,

Bastien b...@gnu.org writes:

 Is there anything that backend developers (both in core and contrib/)
 should change in their code?

I don't think so. AFAICT, the only changes needed were in
ox-html/ox-odt/ox-freemind; I took care of them.

Again, you only need to change something if
`org-export-with-translations' appears in the code. See
758a545fb6da5e3314d609472c0defcee05cf703 for examples.


Regards,

-- 
Nicolas Goaziou



Re: [O] [RFC] Changing internal representation of back-ends to defstructs

2013-07-04 Thread Bastien
Nicolas Goaziou n.goaz...@gmail.com writes:

 Again, you only need to change something if
 `org-export-with-translations' appears in the code. See
 758a545fb6da5e3314d609472c0defcee05cf703 for examples.

Okay, thanks.

(This is `org-export-data-with-translations', for those who
check this thread.)

I checked and no exporter uses this right now.

-- 
 Bastien



Re: [O] [RFC] Changing internal representation of back-ends to defstructs

2013-07-04 Thread Nicolas Goaziou
Bastien b...@gnu.org writes:

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

 Again, you only need to change something if
 `org-export-with-translations' appears in the code. See
 758a545fb6da5e3314d609472c0defcee05cf703 for examples.

 Okay, thanks.

 (This is `org-export-data-with-translations', for those who
 check this thread.)

Indeed. Thanks for correcting function's name.


Regards,

-- 
Nicolas Goaziou



[O] Lisp error when starting agenda

2013-07-04 Thread Rainer Stengele
All,

I pulled today and since then run into this issue after starting an agenda:

Please help!

Rainer


Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil)
  upcase(nil)
  (setq key (upcase (match-string 1 ext-setup-or-nil)) value 
(org-match-string-no-properties 2 ext-setup-or-nil))
  (while (or (and ext-setup-or-nil (not org-ota) (let (ret) (let ((temp-buffer 
(generate-new-buffer  *temp*))) (save-current-buffer (set-buffer temp-buffer) 
(unwind-protect
(progn ... ...) (and ... ... (setq org-file-tags (delq nil (append 
org-file-tags (nth 0 ret))) org-tag-alist (delq nil (append org-tag-alist (nth 
1 ret))) org-tag-groups-alist
(delq nil (append org-tag-groups-alist (nth 2 ret))) org-ota t))) (and 
ext-setup-or-nil (string-match re ext-setup-or-nil start) (setq start 
(match-end 0))) (and (setq
ext-setup-or-nil nil start 0) (re-search-forward re nil t))) (setq key (upcase 
(match-string 1 ext-setup-or-nil)) value (org-match-string-no-properties 2 
ext-setup-or-nil)) (if
(stringp value) (setq value (org-trim value))) (cond ((equal key CATEGORY) 
(setq cat value)) ((member key (quote (SEQ_TODO TODO))) (setq kwds (cons 
(cons (quote sequence)
(org-split-string value splitre)) kwds))) ((equal key TYP_TODO) (setq kwds 
(cons (cons (quote type) (org-split-string value splitre)) kwds))) 
((string-match
\\`\\([a-zA-Z][0-9a-zA-Z_]*\\)_TODO\\' key) (setq kwds (cons (cons (intern 
(downcase ...)) (org-split-string value splitre)) kwds))) ((equal key 
COLUMNS) (org-set-local (quote
org-columns-default-format) value)) ((equal key LINK) (if (string-match 
^\\(\\S-+\\)[]+\\(.+\\) value) (progn (setq links (cons (cons ... 
...) links) ((equal key
PRIORITIES) (setq prio (org-split-string value  +))) ((equal key 
PROPERTY) (if (string-match \\(\\S-+\\)\\s-+\\(.*\\) value) (progn (setq 
props (org-update-property-plist
(match-string 1 value) (match-string 2 value) props) ((equal key DRAWERS) 
(setq drawers (delete-dups (append org-drawers (org-split-string value 
splitre) ((equal key
CONSTANTS) (org-table-set-constants)) ((equal key STARTUP) (let ((opts 
(org-split-string value splitre)) l var val) (while (setq l (car (prog1 opts 
...))) (if (setq l (assoc l
org-startup-options)) (progn (setq var ... val ...) (if ... ... ... ... 
...)) ((equal key ARCHIVE) (setq arch value) (remove-text-properties 0 
(length arch) (quote (face t
fontified t)) arch)) ((equal key OPTIONS) (if (string-match \\([ 
]\\|\\`\\)\\^:\\(t\\|nil\\|{}\\) value) (setq scripts (read (match-string 2 
value) ((and (equal key
SETUPFILE) (not buffer-read-only)) (setq setup-contents (org-file-contents 
(expand-file-name (org-remove-double-quotes value)) (quote noerror))) (if (not 
ext-setup-or-nil) (setq
ext-setup-or-nil setup-contents start 0) (setq ext-setup-or-nil (concat 
(substring ext-setup-or-nil 0 start) \n setup-contents \n (substring 
ext-setup-or-nil start)))
  (save-restriction (widen) (goto-char (point-min)) (while (or (and 
ext-setup-or-nil (not org-ota) (let (ret) (let ((temp-buffer ...)) 
(save-current-buffer (set-buffer temp-buffer)
(unwind-protect ... ...))) (setq org-file-tags (delq nil (append org-file-tags 
...)) org-tag-alist (delq nil (append org-tag-alist ...)) org-tag-groups-alist 
(delq nil (append
org-tag-groups-alist ...)) org-ota t))) (and ext-setup-or-nil (string-match re 
ext-setup-or-nil start) (setq start (match-end 0))) (and (setq ext-setup-or-nil 
nil start 0)
(re-search-forward re nil t))) (setq key (upcase (match-string 1 
ext-setup-or-nil)) value (org-match-string-no-properties 2 ext-setup-or-nil)) 
(if (stringp value) (setq value
(org-trim value))) (cond ((equal key CATEGORY) (setq cat value)) ((member key 
(quote (SEQ_TODO TODO))) (setq kwds (cons (cons (quote sequence) 
(org-split-string value
splitre)) kwds))) ((equal key TYP_TODO) (setq kwds (cons (cons (quote type) 
(org-split-string value splitre)) kwds))) ((string-match 
\\`\\([a-zA-Z][0-9a-zA-Z_]*\\)_TODO\\' key)
(setq kwds (cons (cons (intern ...) (org-split-string value splitre)) kwds))) 
((equal key COLUMNS) (org-set-local (quote org-columns-default-format) 
value)) ((equal key LINK)
(if (string-match ^\\(\\S-+\\)[]+\\(.+\\) value) (progn (setq links 
(cons ... links) ((equal key PRIORITIES) (setq prio (org-split-string 
value  +))) ((equal key
PROPERTY) (if (string-match \\(\\S-+\\)\\s-+\\(.*\\) value) (progn (setq 
props (org-update-property-plist ... ... props) ((equal key DRAWERS) 
(setq drawers (delete-dups
(append org-drawers (org-split-string value splitre) ((equal key 
CONSTANTS) (org-table-set-constants)) ((equal key STARTUP) (let ((opts 
(org-split-string value splitre)) l
var val) (while (setq l (car ...)) (if (setq l ...) (progn ... ...) ((equal 
key ARCHIVE) (setq arch value) (remove-text-properties 0 (length arch) (quote 
(face t fontified
t)) arch)) ((equal key OPTIONS) (if (string-match \\([   
]\\|\\`\\)\\^:\\(t\\|nil\\|{}\\) value) (setq scripts (read 

Re: [O] [RFC] Changing internal representation of back-ends to defstructs

2013-07-04 Thread Nicolas Goaziou
Completing myself,

 I applied the patches. Now, onto orgtbl-to-*.

Here is an example illustrating the new features provided by quick and
anonymous export back-ends:

#+begin_src emacs-lisp
(defun my-orgtbl-to-csv ()
  Insert a comma separated version of Org table at point.
The table will be inserted at the end of the buffer.  This
function makes no assumption about the major mode in the current
back-end.
  (interactive)
  (unless (org-at-table-p) (user-error Not at an Org table))
  (require 'ox-org)
  (let ((table
 (org-export-string-as
  ;; Export the following table...
  (buffer-substring-no-properties (org-table-begin) (org-table-end))
  ;; ... with the following back-end.
  (org-export-create-backend
   :parent 'org
   :transcoders
   '((table . (lambda (table contents info) contents))
 (table-row . (lambda (row contents info)
;; Ignore table separators.
(and (eq (org-element-property :type row) 'standard)
 (concat contents \n
 (table-cell . (lambda (cell contents info)
 (let ((field (org-quote-csv-field contents)))
   (if (org-export-get-next-element cell info)
   (concat field ,)
 field))
  ;; Focus on the table only.
  'body-only)))
;; Insert TABLE at an appropriate location.  For the sake of
;; example, it will be point-max.
(goto-char (point-max))
(insert table)))
#+end_src

-- 
Nicolas Goaziou



Re: [O] Lisp error when starting agenda

2013-07-04 Thread Rainer Stengele
Going back to

git checkout f0c2a680568009ad2f93020af8134dbd481070e2

works again, so I assume it could be the following commit.

Rainer


Am 04.07.2013 15:35, schrieb Rainer Stengele:
 All,
 
 I pulled today and since then run into this issue after starting an agenda:
 
 Please help!
 
 Rainer
 
 
 Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil)
   upcase(nil)
   (setq key (upcase (match-string 1 ext-setup-or-nil)) value 
 (org-match-string-no-properties 2 ext-setup-or-nil))
   (while (or (and ext-setup-or-nil (not org-ota) (let (ret) (let 
 ((temp-buffer (generate-new-buffer  *temp*))) (save-current-buffer 
 (set-buffer temp-buffer) (unwind-protect
 (progn ... ...) (and ... ... (setq org-file-tags (delq nil (append 
 org-file-tags (nth 0 ret))) org-tag-alist (delq nil (append org-tag-alist 
 (nth 1 ret))) org-tag-groups-alist
 (delq nil (append org-tag-groups-alist (nth 2 ret))) org-ota t))) (and 
 ext-setup-or-nil (string-match re ext-setup-or-nil start) (setq start 
 (match-end 0))) (and (setq
 ext-setup-or-nil nil start 0) (re-search-forward re nil t))) (setq key 
 (upcase (match-string 1 ext-setup-or-nil)) value 
 (org-match-string-no-properties 2 ext-setup-or-nil)) (if
 (stringp value) (setq value (org-trim value))) (cond ((equal key CATEGORY) 
 (setq cat value)) ((member key (quote (SEQ_TODO TODO))) (setq kwds (cons 
 (cons (quote sequence)
 (org-split-string value splitre)) kwds))) ((equal key TYP_TODO) (setq kwds 
 (cons (cons (quote type) (org-split-string value splitre)) kwds))) 
 ((string-match
 \\`\\([a-zA-Z][0-9a-zA-Z_]*\\)_TODO\\' key) (setq kwds (cons (cons (intern 
 (downcase ...)) (org-split-string value splitre)) kwds))) ((equal key 
 COLUMNS) (org-set-local (quote
 org-columns-default-format) value)) ((equal key LINK) (if (string-match 
 ^\\(\\S-+\\)[  ]+\\(.+\\) value) (progn (setq links (cons (cons ... 
 ...) links) ((equal key
 PRIORITIES) (setq prio (org-split-string value  +))) ((equal key 
 PROPERTY) (if (string-match \\(\\S-+\\)\\s-+\\(.*\\) value) (progn (setq 
 props (org-update-property-plist
 (match-string 1 value) (match-string 2 value) props) ((equal key 
 DRAWERS) (setq drawers (delete-dups (append org-drawers (org-split-string 
 value splitre) ((equal key
 CONSTANTS) (org-table-set-constants)) ((equal key STARTUP) (let ((opts 
 (org-split-string value splitre)) l var val) (while (setq l (car (prog1 opts 
 ...))) (if (setq l (assoc l
 org-startup-options)) (progn (setq var ... val ...) (if ... ... ... ... 
 ...)) ((equal key ARCHIVE) (setq arch value) (remove-text-properties 0 
 (length arch) (quote (face t
 fontified t)) arch)) ((equal key OPTIONS) (if (string-match \\([   
 ]\\|\\`\\)\\^:\\(t\\|nil\\|{}\\) value) (setq scripts (read (match-string 2 
 value) ((and (equal key
 SETUPFILE) (not buffer-read-only)) (setq setup-contents (org-file-contents 
 (expand-file-name (org-remove-double-quotes value)) (quote noerror))) (if 
 (not ext-setup-or-nil) (setq
 ext-setup-or-nil setup-contents start 0) (setq ext-setup-or-nil (concat 
 (substring ext-setup-or-nil 0 start) \n setup-contents \n (substring 
 ext-setup-or-nil start)))
   (save-restriction (widen) (goto-char (point-min)) (while (or (and 
 ext-setup-or-nil (not org-ota) (let (ret) (let ((temp-buffer ...)) 
 (save-current-buffer (set-buffer temp-buffer)
 (unwind-protect ... ...))) (setq org-file-tags (delq nil (append 
 org-file-tags ...)) org-tag-alist (delq nil (append org-tag-alist ...)) 
 org-tag-groups-alist (delq nil (append
 org-tag-groups-alist ...)) org-ota t))) (and ext-setup-or-nil (string-match 
 re ext-setup-or-nil start) (setq start (match-end 0))) (and (setq 
 ext-setup-or-nil nil start 0)
 (re-search-forward re nil t))) (setq key (upcase (match-string 1 
 ext-setup-or-nil)) value (org-match-string-no-properties 2 ext-setup-or-nil)) 
 (if (stringp value) (setq value
 (org-trim value))) (cond ((equal key CATEGORY) (setq cat value)) ((member 
 key (quote (SEQ_TODO TODO))) (setq kwds (cons (cons (quote sequence) 
 (org-split-string value
 splitre)) kwds))) ((equal key TYP_TODO) (setq kwds (cons (cons (quote type) 
 (org-split-string value splitre)) kwds))) ((string-match 
 \\`\\([a-zA-Z][0-9a-zA-Z_]*\\)_TODO\\' key)
 (setq kwds (cons (cons (intern ...) (org-split-string value splitre)) kwds))) 
 ((equal key COLUMNS) (org-set-local (quote org-columns-default-format) 
 value)) ((equal key LINK)
 (if (string-match ^\\(\\S-+\\)[  ]+\\(.+\\) value) (progn (setq links 
 (cons ... links) ((equal key PRIORITIES) (setq prio (org-split-string 
 value  +))) ((equal key
 PROPERTY) (if (string-match \\(\\S-+\\)\\s-+\\(.*\\) value) (progn (setq 
 props (org-update-property-plist ... ... props) ((equal key DRAWERS) 
 (setq drawers (delete-dups
 (append org-drawers (org-split-string value splitre) ((equal key 
 CONSTANTS) (org-table-set-constants)) ((equal key STARTUP) (let ((opts 
 (org-split-string value splitre)) l
 var val) (while (setq l (car 

Re: [O] [RFC] Changing internal representation of back-ends to defstructs

2013-07-04 Thread Bastien
Nicolas Goaziou n.goaz...@gmail.com writes:

 Here is an example illustrating the new features provided by quick and
 anonymous export back-ends:

This is very neat indeed!

-- 
 Bastien



Re: [O] Lisp error when starting agenda

2013-07-04 Thread Bastien
Hi Rainer,

Rainer Stengele rainer.steng...@online.de writes:

 I pulled today and since then run into this issue after starting an
 agenda:

Can you give a recipe?

Thanks,

-- 
 Bastien



Re: [O] Lisp error when starting agenda

2013-07-04 Thread Rainer Stengele
Am 04.07.2013 16:07, schrieb Bastien:
 Hi Rainer,

 Rainer Stengele rainer.steng...@online.de writes:

 I pulled today and since then run into this issue after starting an
 agenda:
 Can you give a recipe?

 Thanks,

(01 agenda - prio A,B todos - sorted prio up - today  ;;
 (

  ;; show ONGOING todos first, but only if unscheduled, skip if scheduled
  (tags-todo ONGOING
 ((org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled))
  (org-agenda-overriding-header ONGOING todos: )))
  (agenda todays agenda
  (
   ;; (org-agenda-skip-function
   ;; (lambda nil
   ;;   (org-agenda-skip-entry-if 'regexp :ONGOING:)))
   ;; (org-agenda-skip-entry-if 'regexp :ONGOING:)))
   (org-agenda-span 'day)
   (org-agenda-start-with-log-mode t)
   (org-agenda-start-with-clockreport-mode t)

   (org-agenda-overriding-header Today's Agenda)))

  (alltodo todos Prio A+B - skip ONGOING todos
   (
(org-agenda-skip-function (lambda nil
(or (org-agenda-skip-entry-if (quote notregexp) 
\\=.*\\[#A\\|#B\\])
(org-agenda-skip-entry-if 'regexp :ONGOING:)
(org-agenda-skip-entry-if 'scheduled 'deadline 
(org-agenda-overriding-header All todos prio A+B - skip ONGOING 
todos: )
)))
 ((org-agenda-sorting-strategy '(time-up priority-down todo-state-up



Re: [O] Lisp error when starting agenda

2013-07-04 Thread Bastien
Please send a recipe: a step-by-step way of reproducing the problem,
with minimal config and org file.

-- 
 Bastien



Re: [O] [RFC] Changing internal representation of back-ends to defstructs

2013-07-04 Thread Carsten Dominik

On 4.7.2013, at 16:01, Bastien b...@gnu.org wrote:

 Nicolas Goaziou n.goaz...@gmail.com writes:
 
 Here is an example illustrating the new features provided by quick and
 anonymous export back-ends:
 
 This is very neat indeed!

Wow, indeed. 

- Carsten


 
 -- 
 Bastien




Re: [O] Lisp error when starting agenda

2013-07-04 Thread Rainer Stengele
Am 04.07.2013 16:11, schrieb Bastien:
 Please send a recipe: a step-by-step way of reproducing the problem,
 with minimal config and org file.
 

Found it:

Lisp error is triggered by the SETUPFILE option:

#+SETUPFILE: ~/org/GLOBAL_SETUP_DIPLAN.org

If I remove that line everything works fine.

Thanks,
Rainer



Re: [O] [babel] feature request: debug messages

2013-07-04 Thread Eric Schulte
Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Hi Eric,


 Eric Schulte schulte.e...@gmail.com writes:

 Hi Andreas,

 This should be easy to turn on or off using the newly introduced
 :prologue and :epilogue header arguments.  See the manual and the
 following example.

 #+Title: debug messages
 #+Property: session *R*
 #+Property: prologue (format print(\entering %s\) (get-current-name))

 An elisp block to simplify the =:prologue= definition.
 #+begin_src emacs-lisp
   (defun get-current-name ()
 (save-excursion
   (goto-char org-babel-current-src-block-location)
   (while (and (forward-line -1)
   (looking-at org-babel-multi-line-header-regexp)))
   (when (looking-at org-babel-src-name-w-name-regexp)
 (org-no-properties (match-string 3)
 #+end_src

 Two blocks with simple assignments.

 #+name: block-1
 #+begin_src R
   x - 2 + 2
 #+end_src

 #+name: block-2
 #+begin_src R
   y - x + x
 #+end_src

 Execute the whole buffer =C-c C-v b= to see the prologue in action.

 Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Hi all,

 I would love to see messages like 'entering block foo...' and
 '...leaving block foo' printed to my R console.  This would be very
 handy when I evaluate a subtree (C-c C-v s) with a lot of #+call lines
 and some lengthy ones.

 I know that
 (1) I could implement that myself at in the source blocks.  But I would
 love if orgmode did that for me
 (2) Such messages are already printed to the emacs *Messages* buffer.
 But that buffer might not be visible and I can not switch to it,
 without interrupting the evaluation.  Anyway it would be much nicer
 to see that output together with the other output, that my code
 generates.


 In essence it would be very helpful, if there was a variable
 org-babel-print-debug-messages (or org-babel-debug-level...) which if
 non-nil would cause that messages to be printed.  Or is there somewhere
 already?

 Regards,
 Andreas






 thanks for the quick answer!  The :prologue and :epilogue header
 arguments have indeed slipped my attention and they look really
 interesting!  I see, that they are documented, but somehow, they seem to
 not get their headline and TOC entry?

 I have three problems with your example, though:
 1) It does not run
 2) It does not work
 3) It won't be usable for 'my' epilogue, correct?
 ;-)


Ah! My fault.  I had to add prologue and epilogue support to ob-R.el
when working through the example I sent, but then I forgot to commit
that support to Org-mode.  I've just pushed up that commit, and
re-worked my example file to avoid the issue of prologue being applied
to the emacs-lisp code block (using the very nice and also new
language-specific PROPERTY header arguments).

Finally, I don't use epilogues in the example because (as the last thing
evaluated) they would override the code block results.

Hopefully the following:
1. will run
2. will work
3. will be usable

Cheers,

#+Title: debug messages
#+Property: header-args:R :session *R* :prologue (format print(\entering %s\) (get-current-name))

An elisp block to simplify the =:prologue= definition.
#+begin_src emacs-lisp :results silent
  (defun get-current-name ()
(save-excursion
  (goto-char org-babel-current-src-block-location)
  (while (and (forward-line -1)
  (looking-at org-babel-multi-line-header-regexp)))
  (when (looking-at org-babel-src-name-w-name-regexp)
(org-no-properties (match-string 3)
#+end_src

Two blocks with simple assignments.

#+name: block-1
#+begin_src R
  x - 2 + 2
#+end_src

#+RESULTS: block-1
: 4

#+name: block-2
#+begin_src R
  y - x + x
#+end_src

#+RESULTS: block-2
: 8

Execute the whole buffer =C-c C-v b= to see the prologue in action.


 1)
 It does not run, because org tries to do the prologue also on the
 emacs-lisp block defining the function of the prologue.  So, I get
 format: Symbol's function definition is void: get-current-name
 I changed the #+property line to
 #+Property: header-args:R :prologue (format print(\entering %s\) 
 (get-current-name))
 which solved that problem.

 2)
 But still it does not work: This is what I get in my *R* buffer:
 --8---cut here---start-8---

 R version 3.0.1 (2013-05-16) -- Good Sport
 Copyright (C) 2013 The R Foundation for Statistical Computing
 Platform: x86_64-pc-linux-gnu (64-bit)

 R ist freie Software und kommt OHNE JEGLICHE GARANTIE.
 Sie sind eingeladen, es unter bestimmten Bedingungen weiter zu verbreiten.
 Tippen Sie 'license()' or 'licence()' für Details dazu.

 R ist ein Gemeinschaftsprojekt mit vielen Beitragenden.
 Tippen Sie 'contributors()' für mehr Information und 'citation()',
 um zu erfahren, wie R oder R packages in Publikationen zitiert werden können.

 Tippen Sie 'demo()' für einige Demos, 'help()' für on-line Hilfe, oder
 'help.start()' für eine HTML Browserschnittstelle zur Hilfe.
 Tippen Sie 'q()', um R zu verlassen.

 

Re: [O] [Babel] Inaccuracy in Sec. 14.8.2.13 `:noweb' of the manual

2013-07-04 Thread Eric Schulte
Sebastien Vauban sva-n...@mygooglest.com writes:

 Hello Christophe,

 Christophe Pouzat wrote:
 There seems to be a wrong statement in the description of the value
 strip-export' of header :noweb (Sec. 14.8.2.13) of the manual:

   `strip-export' Noweb syntax references in the body of the code
   block will be expanded before the block is evaluated or tangled.
   However, noweb syntax references will not be removed when the
   code block is exported.

 The last phrase states that the noweb reference *will not be removed* but
 after trying it out with the last ELPA version of org (July 3rd), it turns
 out that *it is removed* (which makes sense given the name).

 Yes, you're right; it should be:

 However, noweb syntax references will be stripped when the code block is
 exported.

 Best regards,
   Seb

Just pushed up a fix.  Thanks,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte



Re: [O] Lisp error when starting agenda

2013-07-04 Thread Bastien
Rainer Stengele rainer.steng...@online.de writes:

 Lisp error is triggered by the SETUPFILE option:

 #+SETUPFILE: ~/org/GLOBAL_SETUP_DIPLAN.org

 If I remove that line everything works fine.

Can you copy and past lines starting with #+ from
GLOBAL_SETUP_DIPLAN.org?

Parsing those lines is where the error probably comes from,
if that's so we need to fix it.

Thanks again!

-- 
 Bastien



[O] reftex label generation and referencing

2013-07-04 Thread Jan-Mark Batke
Hi all.

I turned on reftex-mode in ord-mode and did some experiments with the
automated reftex label generation which I like a lot.

1. A reference is generated for Fig.~\ref{fig:1} nicely using reftex
   using C-c ) as shown in this text.
   #+BEGIN_LaTeX
   \begin{figure}[h]
  \centering
  \includegraphics{test}
  \label{fig:1}
  \caption{text}
\end{figure}
   #+END_LaTeX
   However, reftex complains when using the automated label insertion
   as started by auctex when I use the latex editing buffer started
   with C-c', e.g.

   : reftex-access-scan-info: RefTeX works only in buffers visiting a file

   so I inserted the label afterwards in the org-buffer.
   Is it possible to avoid that problem?

2. How do I actually address Figure~\ref{fig:name} (this is the latex
   way) using org-mode means (to be more generic)?

   #+name: fig:name
   #+caption: Figure
  [[  ./figure.png]]

3. Is there a difference between #+name: and #+label: to label a
   figure?

Best

Jan-Mark

-- 
Jan-Mark Batke  bad...@gmx.net
FON +49 511 33 64 800
FAX +49 511 22 09 521


Re: [O] org-clock-is-active

2013-07-04 Thread Łukasz Stelmach
It was 2013-07-03 śro 19:40, when Bastien wrote:
 l.stelm...@samsung.com (Łukasz Stelmach) writes:

 (defun org-clock-is-active ()
   Return non-nil if clock is currently running.
 The return value is actually the clock marker.
   (marker-buffer org-clock-marker))

 Either the docstring is lying or the code does not do what it is said
 to. (Or it is too late for me?)

 I don't understand, what is the problem exactly?

The docstring says the function returns a *marker*. The function does not
return org-clock-marker but only the buffer the clock is ticking in. You
can't:

(goto-char (org-clock-is-active))

which should be possible according to goto-char's docstring

(goto-char POSITION)

Set point to POSITION, a number or *marker*.

This is a minor inaccuracy, however, if you do not browse the code but
only look at functions docstring, you may loose a few minutes.

-- 
Łukasz Stelmach
Samsung RD Institute Poland
Samsung Electronics



Re: [O] reftex label generation and referencing

2013-07-04 Thread Rasmus
Jan-Mark Batke bad...@gmx.net writes:

 2. How do I actually address Figure~\ref{fig:name} (this is the latex
way) using org-mode means (to be more generic)?

#+name: fig:name
#+caption: Figure
   [[  ./figure.png]]

Yeah, I'd also like to extend Refetex to use this label format.  I
haven't had time to look into it, though.
With equations it would also be nicer, e.g.

#+NAME: important-constant
\begin{equation}
x=1.
\end{equation}

Alas, I don't know how to do this.

For referencing to labels you can use LaTeX links, but it obviouesly
only work with the LaTeX backend.

–Rasmus

-- 
. . . The proofs are technical in nature and provides no real understanding.




Re: [O] Lisp error when starting agenda

2013-07-04 Thread Rainer Stengele
Am 04.07.2013 17:12, schrieb Bastien:
 Rainer Stengele rainer.steng...@online.de writes:

 Lisp error is triggered by the SETUPFILE option:

 #+SETUPFILE: ~/org/GLOBAL_SETUP_DIPLAN.org

 If I remove that line everything works fine.
 Can you copy and past lines starting with #+ from
 GLOBAL_SETUP_DIPLAN.org?

 Parsing those lines is where the error probably comes from,
 if that's so we need to fix it.

 Thanks again!


#+STARTUP:  overview
#+STARTUP:  hidestars inlineimages logdone nologrepeat nolognoteclock-out 
nologreschedule nologredeadline nologrefile
#+TAGS: @DIPLAN @HOME(h) @IGN @KUNDE(k) @UNTERWEGS(U)
#+TAGS: ADMIN(a) ASIEN(A) diplan(d) drill(D) EMAIL export(e) HIDE(H) 
HIDEAGENDA IGNORE(x) INFO(i) JWINTER(W)
LESEN(L) LPM(l) noexport(n) ONGOING(o)  PROJEKT REFILETARGET(r)
#+TAGS: REVIEW_WEEKLY REVIEW_MONTHLY becom(b) fleckenm(f) foerster(F) 
rob(R) roth SERVICE stengele(s) TC(t)
TEL TDEIERL WARTEN(w) UBMED(u) ULLA(z)
#+SEQ_TODO: TODO NEXT WARTEN(w) HOLD(h) | MOVED DONE(d) CANCELED(c) DELEGATED
#+OPTIONS:   ^:{} \n:nil :t todo:t toc:t
-*- coding:utf-8-unix; -*-




Re: [O] Lisp error when starting agenda

2013-07-04 Thread Bastien
Hi Rainer,

This should now be fixed, thanks.

-- 
 Bastien



Re: [O] Lisp error when starting agenda

2013-07-04 Thread Rainer Stengele
Am 04.07.2013 22:15, schrieb Bastien:
 Hi Rainer,
 
 This should now be fixed, thanks.
 
Confirmed!

Thanks!



Re: [O] Starting emacs followed directly by org-agenda search and visiting file removes color formatting

2013-07-04 Thread Rainer Stengele
Am 03.07.2013 15:07, schrieb Bastien:
 Hi Mike,
 
 Mike McLean mike.mcl...@pobox.com writes:
 
 Did you ever find a resolution for this? I am experiencing very
 similar, né identical, symptoms.
 
 I applied Nicolas' patch from this thread.
 
 Thanks for the heads up,
 
Confirmd: works as before!

Thanks!



Re: [O] Org file to generate both beamer and standard LaTeX file

2013-07-04 Thread Julien Cubizolles
Suvayu Ali fatkasuvayu+li...@gmail.com writes:

 All of what you list above is supported. 

I should know better, this is Emacs + Orgode :-), and now I *have* to
try it even though I'm not sure I need it...

 You just need to learn the syntax.  

I'm starting to get my bearings, I'll read and experiment with it.

Thanks.

Julien.