Re: [O] Show TODO item in table of contents

2013-11-06 Thread Rainer Stengele
Am 05.11.2013 17:33, schrieb Bastien:
> Hi Rainser,
> 
> Rainer Stengele  writes:
> 
>> I have that one set to t.
>> What I want is to see the todo state words in the table of contents.
>> I see them in the contents but not in the table of contents.
> 
> Mhh... then I think you can't, sorry.
> 
Hi all,

I would propose that as an enhancement:


In html export include todo state words in table of contents.


Anybody else would find this useful?

Thank you,
Rainer



Re: [O] how to make relative file links?

2013-11-06 Thread paul
David Belohrad  writes:

> ups, second test. it really works. I have messed up settings on two
> computers...

I use Dropbox (there are alternatives) for an elisp file with all my
emacs settings so that I always loading the same settings. A minimal
.emacs.d/init.el loads this file on each machine, and also has any
settings that are strictly necessary for just that machine.





Re: [O] Temp files are not deleted after beamer export with source code blocks

2013-11-06 Thread James Harkins

On Tuesday, October 29, 2013 4:06:29 PM HKT, Nicolas Goaziou wrote:

It should clean them up. Though, the "-2" suffix implies that a regexp
is needed to find temporary files.

Does the following patch work?


It seems not to have any effect. Here's what I did to try it:

1. cd ~/share/org-mode.git
2. git am 
~/tmp/0001-ox-latex-Remove-all-temporary-files-when-compiling.patch

  - No git errors or conflicts here
3. make
  - No compilation errors
4. Quit and relaunch emacs.
  - I have the following in ~/.emacs, so I should be loading org from my 
local git directory.

(add-to-list 'load-path "/home/dlm/share/org-mode.git/lisp")
(add-to-list 'load-path "/home/dlm/share/org-mode.git/contrib/lisp" t)
5. Open and export the document in question.

No ***-**.vrb files were deleted.

hjh



Re: [O] Show TODO item in table of contents

2013-11-06 Thread Bastien
Rainer Stengele  writes:

> Anybody else would find this useful?

FWIW I would!

-- 
 Bastien



Re: [O] org-agenda-prefix-format %s returns null string

2013-11-06 Thread Bastien
Hi Samuel,

Samuel Wales  writes:

> My understanding is that %s is supposed to show scheduling
> information?  Do people typically use %(org-get-property
> \"SCHEDULED\") and similar instead?
>
> Thanks.
>
> ===
> `(("i" . "views -- agenda, next")
>   ("iu" "upcoming scheduled and deadline, by timestamp -- 
> experimental"
>tags ,(concat "+SCHEDULED>\"\"+SCHEDULED<\"<+1m>\""
>  "|+DEADLINE>\"\"+DEADLINE<\"<+1m>\"")
>((org-use-tag-inheritance nil)
> (org-agenda-prefix-format "%s")
> (org-agenda-sorting-strategy '(timestamp-up
> ...
> ===

`org-agenda-prefix-format' need to be a list listing formats for
various contexts -- see the standard value of this option or try
to customize it through customize.

HTH,

-- 
 Bastien



Re: [O] Bug: *bold* text isn't fontified unless text is changed on the same line [8.1 (release_8.1-3-ga005db)]

2013-11-06 Thread Bastien
Hi Oleh,

Oleh  writes:

> The font-lock works fine as I type, but when I re-open the file,
> or call `revert-buffer', the *bold* text loses its fontification.
> Note that all others, like /italic/ or =code=, work fine.
> Only *bold* is affected.

I confirm this issue but I don't know how to fix it.
Maybe this is a problem with Emacs display engine, in
that case we'd need to ping the emacs-devel mailing
list.

Best,

-- 
 Bastien



[O] Latex export does not work

2013-11-06 Thread Cecil Westerhof
I am trying a LaTeX export, but I get the following error:
org-babel-exp processing...
executing Dot code block...
Wrote /tmp/babel-18129i9i/ob-input-18129Nzr
Code block evaluation complete.
Saving file /home/cecil/Documents/shell-scripting.tex...
Wrote /home/cecil/Documents/shell-scripting.tex
Processing LaTeX file ./shell-scripting.tex...
org-latex-compile: PDF file ./shell-scripting.pdf wasn't produced: [LaTeX
error]

Not very clear. What could be the problem?

-- 
Cecil Westerhof


Re: [O] Can org-capture-templates be made more flexible?

2013-11-06 Thread Bastien
Hi Leo,

Leo Liu  writes:

> I use https://github.com/leoliu/applescripts/blob/master/Notes.el to
> pull notes from Notes.app on OS X into an org buffer.
>
> Naturally I also want to hook something into org-capture to create new
> notes. However, it seems org-capture-templates requires a file-location
> of some sort, which is unhelpful in this case. Any way to make
> org-capture-templates more flexible?

I'm not sure I understand your use-case clearly: you need to invoke
org-capture with no target file?

Thanks for further explanations,

-- 
 Bastien



Re: [O] I cannot follow <<>> links

2013-11-06 Thread Bastien
Hi Daniel,

Daniel Clemente  writes:

> I think this in enough to correct it:

I can't find the confirmation on the list, but I see this has been
applied.  Just to close this bug report.

Thanks,

-- 
 Bastien



Re: [O] [Bug] Removing scheduled/deadline shows "Entry repeats:..." which is not true

2013-11-06 Thread Bastien
Hi Marcin,

Marcin Borkowski  writes:

> Just a few seconds ago I experienced something similar (I was changing
> the TODO state, and there was *no* SCHEDULED keyword anywhere (!) in
> the file).  I diffed the only buffer that changed (the current one) to
> the saved version, and found nothing suspicious. It's too late for me to
> analyse this (it's 00:40 here;)), but if the problem persists, I'll
> try to report (if I'm able to prepare an ECM).

This should be fixed now.

Thanks,

-- 
 Bastien



Re: [O] (no subject)

2013-11-06 Thread Bastien
Hi Cecil,

Cecil Westerhof  writes:

> Is that possible?

Well, I'd simply not use a "Hours spent" headline, which seems
redundant.

-- 
 Bastien



Re: [O] (no subject)

2013-11-06 Thread Bastien
Cecil Westerhof  writes:

> Is that possible?



-- 
 Bastien



Re: [O] Org-Capture template overwriting headlines!?

2013-11-06 Thread Bastien
Hi Juan,

Juan Alberto Sanchez  writes:

> I recently wrote a few org-capture template for myself and I just
> notice a strange issue with the captures. when I record a capturer if
> there was already something of the same level where the file+headline
> is inserting it overwrites the previews entry of the same level. For
> example, I take a capture by hitting C-c r t that captures is
> inserted as a ** TODO under a * Tasks if I take another capture the
> next ** TODO will overwrite already existing **TODO with the text on
> the new capturer   rather then inserting it below the exiting ** TODO
> headline. any idea what is going on? Below is a pestbin of my org
> config

This looks bad, and I can't reproduce this.

What version of Emacs/Org are you using?  Can you provide a minimal
example, together with your setup?

Thanks,

-- 
 Bastien



Re: [O] Latex export does not work

2013-11-06 Thread Cecil Westerhof
2013/11/6 Cecil Westerhof 

>
> I am trying a LaTeX export, but I get the following error:
> org-babel-exp processing...
> executing Dot code block...
> Wrote /tmp/babel-18129i9i/ob-input-18129Nzr
> Code block evaluation complete.
> Saving file /home/cecil/Documents/shell-scripting.tex...
> Wrote /home/cecil/Documents/shell-scripting.tex
> Processing LaTeX file ./shell-scripting.tex...
> org-latex-compile: PDF file ./shell-scripting.pdf wasn't produced: [LaTeX
> error]
>
> Not very clear. What could be the problem?
>

 I saw that there was an error that wrapfig.sty was not found. I installed
texlive-wrapfig and problem solved.

I am only getting a message:
! Package inputenc Error: Unicode char \u8:- not set up for use with
LaTeX.

But that should be solvable.

-- 
Cecil Westerhof


Re: [O] Arbitrary lisp functions in column-attributes

2013-11-06 Thread Bastien
Hi Mark,

Mark Edgington  writes:

> Wouldn't the output of a function be something mutually exclusive with
> summary types?  In other words, a column can be defined to use a
> summary type, or it could be defined (with the proposed idea) as the
> output of a function, but not both at the same time.

So your proposal boils down to allowing arbitrary summary types,
with user defined functions?  If so, that seems useful and consistent
to me, I may have a look at some point.

> One other difference has to do with the "default value" when a
> property isn't defined -- org-collector sets the default value to 0,
> while for column-view it seems to be an empty string.  I therefore
> modified org-collector to make it easier to set this default value
> when defining a dynamic block:

Thanks -- can you submit the patch following the guidelines on
http://orgmode.org/worg/org-contribute.html (using git format-patch
and adding a commit message with a proper ChangeLog) ?

Thanks in advance,

-- 
 Bastien



Re: [O] [BUG] hline references on left side of table formula

2013-11-06 Thread Bastien
Hi,

lom...@voila.fr writes:

> I was interested to use hline references on the left side. However I found 
> out that it
> is not completely unsupported.
> When the left side consist of:
> * single cells references, it does not work
> * ranged cells, it works for me (org 8.0.3)

(I'm not sure I fully understand the issue.)

> The patch below tranforms the single cell references to ranged cells .
>
> However it still does not work for references like @+ or @- I$1.. , which can 
> be solve 
> using references like @I+1#1.

If you come up with a complete patch, please submit it by following
the guidelines here: http://orgmode.org/worg/org-contribute.html

Thanks!

-- 
 Bastien



Re: [O] Errors trying to add properties to clocktable

2013-11-06 Thread Bastien
Hi Pete,

Pete Ley  writes:

> Per section 8.4.2 of the manual, I'm trying to add a :properties column
> to the clocktable. Here are my block settings:
>
> #+BEGIN: clocktable :maxlevel 2 :scope agenda :block thisweek :properties 
> "CATEGORY" :inherit-props
>
> Now, my goal is to add a "work commitment" in hours per week to some of
> the headings that will show up next to the actual clocked hours for the
> week, but I'm using CATEGORY as a testing example.
>
> The manual doesn't describe how to specify the property list, and since
> I get an error (Wrong type argument: stringp, 67), I'm sure I must be
> doing something wrong.
>
> Sorry if this is a basic question, but I couldn't find anything about it
> on google.

This is how you would use the :properties parameter:

#+BEGIN: clocktable :maxlevel 2 :scope subtree :properties ("CATEGORY")

#+END:

Note that this is only for information, the :properties parameter does
not *select* what clock entries are contributing to the table.

HTH,

-- 
 Bastien



Re: [O] Latex export does not work

2013-11-06 Thread Nick Dokos
Cecil Westerhof  writes:

> I am trying a LaTeX export, but I get the following error:
> org-babel-exp processing...
> executing Dot code block...
> Wrote /tmp/babel-18129i9i/ob-input-18129Nzr
> Code block evaluation complete.
> Saving file /home/cecil/Documents/shell-scripting.tex...
> Wrote /home/cecil/Documents/shell-scripting.tex
> Processing LaTeX file ./shell-scripting.tex...
> org-latex-compile: PDF file ./shell-scripting.pdf wasn't produced: [LaTeX 
> error]
>
> Not very clear. What could be the problem?
>

Could be any number of things (e.g. are you using minted? Did you turn
on -shell-escape?)

Try to find the buffer where the output of the pdflatex processing goes
("*~/Documents/shell-scripting output*" or some such) and see if there
is a clearer description of the error there. Or export to a LaTeX file
and process that by hand from the command line.

-- 
Nick




Re: [O] Using Multiple TODO Keywords

2013-11-06 Thread Bastien
Hi Kenneth,

Kenneth Jacker  writes:

> When I use `t' or "C-c C-t", the keywords change from TODO, to PENDING,
> to CANCELED, and then repeat *only those three states*.
>
> Shouldn't I be able to use the above to mark the this week's task as DONE?

If you use fast TODO selection like this

#+SEQ_TODO: TODO PENDING | CANCELED DONE(d)

(note the (d) after DONE) then you'll be able to set the task DONE,
but the presence of the repeater will still let the TODO state switch
to the next one, namely "TODO".

Maybe we should introduce a way to ignore the repeater -- is anyone
missing this too?

-- 
 Bastien



Re: [O] Latex export does not work

2013-11-06 Thread Cecil Westerhof
2013/11/6 Cecil Westerhof 

> I am only getting a message:
> ! Package inputenc Error: Unicode char \u8:- not set up for use with
> LaTeX.
>
> But that should be solvable.
>

I solved that by changing in my .tex file:
\usepackage[utf8]{inputenc}
to:
\usepackage[utf8x]{inputenc}

and running pdflatex.

Is there a way to get this automatically in the .tex file, so I do not have
to change it?

-- 
Cecil Westerhof


Re: [O] org-tree-to-indirect-buffer: multiple buffers; buffer name containing ID

2013-11-06 Thread Bastien
Hi Karl,

Karl Voit  writes:

> How about using IDs of the sub-tree headings (if found) in order to
> name the buffer? In case someone is using custom IDs (like me), the
> list would look like:
>
> - myorgmode.org-1  (-> no ID found for this sub-heading)
> - myorgmode.org-project-foobar  (-> :ID: project-foobar)
> - myorgmode.org-2013-10-25-customerX  (-> :ID: 2013-10-25-customerX)

The attached patch does name indirect buffers after the current tree
heading -- thanks for this idea.

Would anyone else find this useful?

>From b5da8fa8ad7c9dc7b4f3c2d177c1aada685e520c Mon Sep 17 00:00:00 2001
From: Bastien Guerry 
Date: Wed, 6 Nov 2013 13:50:39 +0100
Subject: [PATCH] org.el (org-get-indirect-buffer): New argument `heading'

* org.el (org-get-indirect-buffer): New argument `heading'
to name the buffer after the current tree heading.
(org-tree-to-indirect-buffer): Use `org-get-indirect-buffer'
with a `heading' argument.

Thanks to Karl Voit for suggesting this.
---
 lisp/org.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 7c2a316..7e47891 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -7466,7 +7466,7 @@ frame is not changed."
 	 (not (eq org-indirect-buffer-display 'new-frame))
 	 (not arg))
 	(kill-buffer org-last-indirect-buffer))
-(setq ibuf (org-get-indirect-buffer cbuf)
+(setq ibuf (org-get-indirect-buffer cbuf heading)
 	  org-last-indirect-buffer ibuf)
 (cond
  ((or (eq org-indirect-buffer-display 'new-frame)
@@ -7497,11 +7497,11 @@ frame is not changed."
 (run-hook-with-args 'org-cycle-hook 'all)
 (and (window-live-p cwin) (select-window cwin
 
-(defun org-get-indirect-buffer (&optional buffer)
+(defun org-get-indirect-buffer (&optional buffer heading)
   (setq buffer (or buffer (current-buffer)))
   (let ((n 1) (base (buffer-name buffer)) bname)
 (while (buffer-live-p
-	(get-buffer (setq bname (concat base "-" (number-to-string n)
+	(get-buffer (setq bname (concat base "-" (or heading (number-to-string n))
   (setq n (1+ n)))
 (condition-case nil
 (make-indirect-buffer buffer bname 'clone)
-- 
1.8.4.2


-- 
 Bastien


Re: [O] How to use the file+function capture template?

2013-11-06 Thread Bastien
Hi Marcin,

Marcin Borkowski  writes:

> I'd like to configure my capture template so that I can select the
> target automatically based on the thing captured (use case: I use
> capture instead of Firefox bookmarks to store interesting links.  I'd
> like to store links to youtube videos I'd like to watch some day under
> another headline).  The manual says there is a file-function template,
> but my question is: how do I use it?  I imagine that the function
> should move the point to the right place in the file buffer, right?

Right.

> And how to access the content (like the %:link from the bookmarklet I
> use) in the elisp function?

AFAIK you can't, %:link is available only in the template itself.

-- 
 Bastien



Re: [O] Having trouble with hidestars this morning

2013-11-06 Thread Bastien
Hi Susan,

Susan Cragin  writes:

> But after compiling both emacs and org-mode from git this morning,
> and re-installing, my outlines show all the stars, and the stars
> cannot be turned off.

I do see the same problem -- Nicolas, do you know what may have caused
this?

-- 
 Bastien



Re: [O] Latex export does not work

2013-11-06 Thread Cecil Westerhof
2013/11/6 Cecil Westerhof 

> 2013/11/6 Cecil Westerhof 
>
>> I am only getting a message:
>> ! Package inputenc Error: Unicode char \u8:- not set up for use with
>> LaTeX.
>>
>> But that should be solvable.
>>
>
> I solved that by changing in my .tex file:
> \usepackage[utf8]{inputenc}
> to:
> \usepackage[utf8x]{inputenc}
>
> and running pdflatex.
>
> Is there a way to get this automatically in the .tex file, so I do not
> have to change it?
>

Based on
http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=bb488fa3b1eaa61ea2dfe7238f9da85bc42b0ffb

I have:
(defcustom org-export-latex-inputenc-alist '(\"utf8\" . \"utf8x\") "")

But still the .tex file contains:
\usepackage[utf8]{inputenc}
instead of:
\usepackage[utf8x]{inputenc}

What is the right way to do this?

-- 
Cecil Westerhof


Re: [O] [BUG] `org-agenda-sorting-strategy' does not work in `tags-todo'

2013-11-06 Thread Bastien


Hi Sébastien,

"Sebastien Vauban" 
writes:

>> Calendar for today
>> 2013-09-12 Thu 
>>  5 d ago  TODO 1Buy dog food
>>  4 d ago  TODO 2Check weekend hours at the gym
>>  3 d ago  TODO 3Do jogging
>>  Deadline TODO 4Mail package to Susan
>
> Anybody having a hint on this?

That's because deadline-up/down is active in "agenda" agenda views,
not in tags view -- and "DEADLINE<=\"\"" ... is a tag search,
not an "agenda" agenda view.

I know the answer cannot be 100% satisfying, but sorting by date
in this case would require to add a text property to each agenda
entry, and would be certainly too time consuming (not tested.)

-- 
 Bastien




Re: [O] capture template property :kill-buffer does not let me refile

2013-11-06 Thread Bastien
Hi Rodrigo,

Rodrigo Amestica  writes:

> based on 'printf' type logging I have found one solution that looks to me 
> like a
> bug fix in org-capture-refile. But I'm obviously far from guessing any side
> effect that I could be missing.
>
> In org-capture-refile if I move org-capture-finalize after the
> save-window-excursion form then the :kill-buffer option works as expected
> without interfering with the refile operation.
>
> I meant to say a bug fix because to me it sounds more reasonable to call
> org-capture-finalize really when finished, in this specific case after refile.
>
> Does that make sense?

Yes it does -- I attach a patch, can you confirm it is what you did
and it does what you want?

Also, I'd be glad if a few others could test the patch so that we can
make more sure there are no side-effects -- I could not think of any.

Thanks,

diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 871382d..b832798 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -787,14 +787,14 @@ already gone.  Any prefix argument will be passed to the refile command."
   (let ((pos (point))
 	(base (buffer-base-buffer (current-buffer)))
 	(org-refile-for-capture t))
-(org-capture-finalize)
 (save-window-excursion
   (with-current-buffer (or base (current-buffer))
 	(save-excursion
 	  (save-restriction
 	(widen)
 	(goto-char pos)
-	(call-interactively 'org-refile)))
+	(call-interactively 'org-refile)
+(org-capture-finalize)))
 
 (defun org-capture-kill ()
   "Abort the current capture process."

-- 
 Bastien


Re: [O] Temp files are not deleted after beamer export with source code blocks

2013-11-06 Thread Nicolas Goaziou
Hello,

James Harkins  writes:

> On Tuesday, October 29, 2013 4:06:29 PM HKT, Nicolas Goaziou wrote:
>> It should clean them up. Though, the "-2" suffix implies that a regexp
>> is needed to find temporary files.
>>
>> Does the following patch work?
>
> It seems not to have any effect. Here's what I did to try it:
>
> 1. cd ~/share/org-mode.git
> 2. git am
> ~/tmp/0001-ox-latex-Remove-all-temporary-files-when-compiling.patch
>   - No git errors or conflicts here
> 3. make
>   - No compilation errors
> 4. Quit and relaunch emacs.
>   - I have the following in ~/.emacs, so I should be loading org from
> my local git directory.
> (add-to-list 'load-path "/home/dlm/share/org-mode.git/lisp")
> (add-to-list 'load-path "/home/dlm/share/org-mode.git/contrib/lisp" t)
> 5. Open and export the document in question.

Thanks for the report.

> No ***-**.vrb files were deleted.

Out of curiosity: in my case vrb files follow the template "***.**.vrb"
not "***-**.vrb". Are you sure about the hyphen?


Regards,

-- 
Nicolas Goaziou



Re: [O] Latex export does not work

2013-11-06 Thread Cecil Westerhof
2013/11/6 Cecil Westerhof 

> I am only getting a message:
> ! Package inputenc Error: Unicode char \u8:- not set up for use with
> LaTeX.
>
> But that should be solvable.
>

With some trial and error and od I found that there was a strange
combination of character codes (226, 136, 146) where there should be a -.
After changing that to a -, my problems where solved.

-- 
Cecil Westerhof


Re: [O] Capture templates with "function" type

2013-11-06 Thread Bastien
Hi Brett,

Brett Viren  writes:

> Can someone say how I might get this behavior for the "function" capture
> type as well?

I'm still investigating this bug, but in the meantime you may want to
try using file+function, which does not have the bug.

-- 
 Bastien



Re: [O] Show TODO item in table of contents

2013-11-06 Thread Nicolas Goaziou
Hello,

Rainer Stengele  writes:

> In html export include todo state words in table of contents.

Would the following patch do the job?


Regards,

-- 
Nicolas Goaziou
>From 7b85dbbc22e73766ac92295d2b37ae692b20d289 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou 
Date: Wed, 6 Nov 2013 15:26:53 +0100
Subject: [PATCH] ox-html: Add TODO keyword to TOC entries

* lisp/ox-html.el (org-html--format-toc-headline): TOC entries are
  closer to regular headline formatting.
---
 lisp/ox-html.el | 54 +++---
 1 file changed, 31 insertions(+), 23 deletions(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index afc2437..84a3f45 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -1969,34 +1969,42 @@ and value is its relative level, as an integer."
 (defun org-html--format-toc-headline (headline info)
   "Return an appropriate table of contents entry for HEADLINE.
 INFO is a plist used as a communication channel."
-  (let* ((headline-number (org-export-get-headline-number headline info))
-	 (section-number
-	  (and (not (org-export-low-level-p headline info))
-	   (org-export-numbered-headline-p headline info)
-	   (concat (mapconcat 'number-to-string headline-number ".") ". ")))
+  (let* ((level (+ (org-export-get-relative-level headline info)
+		   (1- org-html-toplevel-hlevel)))
+	 (todo (and (plist-get info :with-todo-keywords)
+		(let ((todo (org-element-property :todo-keyword headline)))
+		  (and todo (org-export-data todo info)
+	 (todo-type (and todo (org-element-property :todo-type headline)))
+	 (priority (and (plist-get info :with-priority)
+			(org-element-property :priority headline)))
+	 (text (org-export-data-with-backend
+		(org-export-get-alt-title headline info)
+		;; Create an anonymous back-end that will ignore any
+		;; footnote-reference, link, radio-target and target
+		;; in table of contents.
+		(org-export-create-backend
+		 :parent 'html
+		 :transcoders '((footnote-reference . ignore)
+(link . (lambda (object c i) c))
+(radio-target . (lambda (object c i) c))
+(target . ignore)))
+		info))
 	 (tags (and (eq (plist-get info :with-tags) t)
 		(org-export-get-tags headline info
 (format "%s"
-	;; Label.
 	(org-export-solidify-link-text
 	 (or (org-element-property :CUSTOM_ID headline)
-		 (concat "sec-" (mapconcat 'number-to-string
-	   headline-number "-"
-	;; Body.
-	(concat section-number
-		(org-export-data-with-backend
-		 (org-export-get-alt-title headline info)
-		 ;; Create an anonymous back-end that will ignore
-		 ;; any footnote-reference, link, radio-target and
-		 ;; target in table of contents.
-		 (org-export-create-backend
-		  :parent 'html
-		  :transcoders '((footnote-reference . ignore)
- (link . (lambda (object c i) c))
- (radio-target . (lambda (object c i) c))
- (target . ignore)))
-		 info)
-		(and tags "   ") (org-html--tags tags)
+		 (concat "sec-"
+			 (mapconcat
+			  #'number-to-string
+			  (org-export-get-headline-number headline info)
+			  "-"
+	(apply (if (functionp org-html-format-headline-function)
+		   (lambda (todo todo-type priority text tags &rest ignore)
+			 (funcall org-html-format-headline-function
+  todo todo-type priority text tags))
+		 #'org-html-format-headline)
+		   todo todo-type priority text tags :section-number nil
 
 (defun org-html-list-of-listings (info)
   "Build a list of listings.
-- 
1.8.4.2



Re: [O] How to deal with 'contents' in (derived) exporter backend

2013-11-06 Thread Thorsten Jolitz

Hello,

Nicolas Goaziou  writes:

> Thorsten Jolitz  writes:
>
>> But when I use something like this in the headline transcode function
>>
>> #+begin_src emacs-lisp
>>   (format "(headline %S %s) "
>>   [... return headline string ...]
>>   contents)
>> #+end_src
>>
>> I get the parse-tree structure as output instead of elements/object
>> in their original Org text syntax as expected:
>>
>> #+begin_src emacs-lisp
>>   (org-data nil "(headline (title-string \"A1\" alt-title-string \"A1\"
>>   category \"tmp5\" level 1 priority nil tags nil todo-keyword nil
>>   quotedp nil archivedp nil commentedp nil footnote-secion-p nil)
>>   (section (#(\"Text *A1* \" 0 5 (:parent (paragraph (:begin 6 :end 16
>>   :contents-begin 6 :contents-end 16 :post-blank 0 :post-affiliated 6
>>   :parent (section (:begin 6 :end 16 :contents-begin 6 :contents-end 16
>>   :post-blank 0 :parent (headline (:raw-value \"A1\" :begin 1 :end 32
>>   :pre-blank 0 :contents-begin 6 :contents-end 32 :level 1 :priority nil
>>   :tags [...]
>> #+end_src
>
> You don't get the parse-tree structure, you get Org syntax within
> a propertized string. Try (org-no-properties contents) instead.

That does the trick, thank you very much, I was kind of stuck without
being aware of this function. 

-- 
cheers,
Thorsten




Re: [O] function?

2013-11-06 Thread Uwe Brauer
>> "Bastien" == Bastien   writes:
Hi Bastien,
   > Hi Uwe,
   > Uwe Brauer  writes:

   > Don't forget to add such useful functions to 
   > http://orgmode.org/worg/org-hacks.html


I came to the conclusion, that the function is not useful, so I don't
think I will post it. However I think that the following function might:
(defun my-org-table-reverse-cells-in-row ()
  "Simple function to reverse cells in one row. This might be useful in tables 
with R2L and L2R text."
  (interactive)
  (save-excursion
(newline 1)
(end-of-line 1)
(newline 1)
(goto-char (org-table-begin))
(org-table-transpose-table-at-point)
(let* ((beg (org-table-begin))
   (end (org-table-end)))
  (goto-char beg)
  (reverse-region beg end))
(org-table-transpose-table-at-point)
(kill-line nil)
(goto-char (org-table-begin))
(previous-line 1)
(kill-line nil)))

I never used this site you mentioned, how can I copy the code? Do I have
to sign copyright?

Uwe 


smime.p7s
Description: S/MIME cryptographic signature


Re: [O] RLT (hebrew) tables and org-odt-export-to-odt problems

2013-11-06 Thread Uwe Brauer
>> "Jambunathan" == Jambunathan K  writes:

   > Uwe 

   >> r2ltableorg.org is the org file and displays the text as
   >> intended. However not all of the text was written in logical order by
   >> GNU emacs, but copied from some other sources.

   > I am venturing in to the wild here and it will take multiple iterations
   > for me to even get a "feel" for what needs to be happen.  I am not even
   > sure what is right or wrong here.  Anyways...


Hi 

I tried to analyze the unzipped odt files, either generated by the
exporter or by OO. It seems to me that odt, does not support that within
*one* table, one can have one row R2L and the other L2L, but I am
not sure. If this were the case, maybe OO inserts  one row visual not
logical?



So the following simple function[1] does reverse one row of a table in
org-mode and then the export function works as expected.

hten (defun my-org-table-reverse-cells-in-row ()
  "Simple function to reverse cells in one row. This might be useful in tables 
with R2L and L2R text."
  (interactive)
  (save-excursion
(newline 1)
(end-of-line 1)
(newline 1)
(goto-char (org-table-begin))
(org-table-transpose-table-at-point)
(let* ((beg (org-table-begin))
   (end (org-table-end)))
  (goto-char beg)
  (reverse-region beg end))
(org-table-transpose-table-at-point)
(kill-line nil)
(goto-char (org-table-begin))
(previous-line 1)
(kill-line nil)))


Uwe 

Footnotes:
[1]  thanks to Michael Brand for the main idea.



smime.p7s
Description: S/MIME cryptographic signature


Re: [O] Capture templates with "function" type

2013-11-06 Thread Bastien
Hi Brett,

Bastien  writes:

> I'm still investigating this bug, but in the meantime you may want to
> try using file+function, which does not have the bug.

Capture templates using `function' should now return back to the
correct window location.  Thanks for raising this,

-- 
 Bastien



Re: [O] function?

2013-11-06 Thread Bastien
Hi Uwe,

Uwe Brauer  writes:

> I never used this site you mentioned, how can I copy the code? 

Simply send me your public key and I'll give you access to the Worg
git repository.  

Then you'll be able to clone like this:

~$ git clone w...@orgmode.org:worg.git

and push changes that will be published on http://orgmode.org/worg/

> Do I have to sign copyright?

No.  But code on the website is licensed under GPLv3.

-- 
 Bastien



Re: [O] Show TODO item in table of contents

2013-11-06 Thread Bastien
Nicolas Goaziou  writes:

>> In html export include todo state words in table of contents.
>
> Would the following patch do the job?

It does for me!  Thanks

-- 
 Bastien



Re: [O] Show TODO item in table of contents

2013-11-06 Thread Nicolas Goaziou
Hello,

Bastien  writes:

> Nicolas Goaziou  writes:
>
>>> In html export include todo state words in table of contents.
>>
>> Would the following patch do the job?
>
> It does for me!  Thanks

Applied then.


Regards,

-- 
Nicolas Goaziou



Re: [O] capture template property :kill-buffer does not let me refile

2013-11-06 Thread Rodrigo Amestica
At Wed, 06 Nov 2013 14:42:25 +0100,
Bastien wrote:
> 
> [1  ]
> Hi Rodrigo,
> 
> Rodrigo Amestica  writes:
> 
> > based on 'printf' type logging I have found one solution that looks to me 
> > like a
> > bug fix in org-capture-refile. But I'm obviously far from guessing any side
> > effect that I could be missing.
> >
> > In org-capture-refile if I move org-capture-finalize after the
> > save-window-excursion form then the :kill-buffer option works as expected
> > without interfering with the refile operation.
> >
> > I meant to say a bug fix because to me it sounds more reasonable to call
> > org-capture-finalize really when finished, in this specific case after 
> > refile.
> >
> > Does that make sense?
> 
> Yes it does -- I attach a patch, can you confirm it is what you did
> and it does what you want?

yes, that's what I did and it works as I expected. 

many thanks,
 Rodrigo

> 
> Also, I'd be glad if a few others could test the patch so that we can
> make more sure there are no side-effects -- I could not think of any.
> 
> Thanks,
> 
> [2 org-capture-refile.patch ]
> diff --git a/lisp/org-capture.el b/lisp/org-capture.el
> index 871382d..b832798 100644
> --- a/lisp/org-capture.el
> +++ b/lisp/org-capture.el
> @@ -787,14 +787,14 @@ already gone.  Any prefix argument will be passed to 
> the refile command."
>(let ((pos (point))
>   (base (buffer-base-buffer (current-buffer)))
>   (org-refile-for-capture t))
> -(org-capture-finalize)
>  (save-window-excursion
>(with-current-buffer (or base (current-buffer))
>   (save-excursion
> (save-restriction
>   (widen)
>   (goto-char pos)
> - (call-interactively 'org-refile)))
> + (call-interactively 'org-refile)
> +(org-capture-finalize)))
>  
>  (defun org-capture-kill ()
>"Abort the current capture process."
> [3  ]
> 
> -- 
>  Bastien



Re: [O] org-mode in the wild

2013-11-06 Thread Karl Voit
* Julian M. Burgos  wrote:
> Thank you very much John!!! Your document contains a wealth of information on 
> how to
> use org-mode for reproducible research!  I really like the idea of
> embedding the supporting documents (bibliography, additional analysis) into 
> the
> document. Very nice.

A agree!

> Perhaps it would be good to have a repository of practices and examples
> for reproducible research, maybe a section in Worg?

If would be very cool if John could link the repos and the PDF on:
http://orgmode.org/worg/org-contrib/babel/uses.html#sec-6

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




Re: [O] capture template property :kill-buffer does not let me refile

2013-11-06 Thread Bastien
Rodrigo Amestica  writes:

> yes, that's what I did and it works as I expected. 

Applied, thanks for confirming!

-- 
 Bastien



Re: [O] Help, I need to paste raw image from clipboard into emacs/orgmode

2013-11-06 Thread Alexander Vorobiev
Hi Klaus,

I found the function very useful so I expanded it a little to have more
flexible image file names. First, I use the base name of the file in the
current buffer as a prefix to the image file name. Then I added an integer
buffer-local variable to be the image file name's suffix (preceded by an
underscore) which is incremented every time new image is pasted:

   #+begin_src emacs-lisp
 (defvar org-clipboard-image-suffix 0)
 (make-variable-buffer-local 'org-clipboard-image-suffix)
 (setq-default org-clipboard-image-suffix 0)

 (defun org-insert-clipboard-image ()
   (interactive)
   (incf org-clipboard-image-suffix)
   (let* ((image-file
   (concat (file-name-base (buffer-file-name))
   "_"
   (format "%d" org-clipboard-image-suffix)
   ".png"))
  (exit-status
   (call-process "convert" nil nil nil
 "clipboard:" image-file)))
 (org-insert-link nil (concat "file:" image-file) "")))
 #+end_src

It would be very convenient if there were a way to determine if the
clipboard contains an image, then use defadvice to call this function with,
say, org-yank. Unfortunately I couldn't find any emacs functions to query
properties of the content of the (Windows) clipboard. I only see
w32-get-clipboard-data which returns only text.

Regards,
Alex


On Fri, Jun 7, 2013 at 1:15 PM, Klaus-Dieter Bauer <
bauer.klaus.die...@gmail.com> wrote:

> (defun my-org-insert-clipboard ()
>   (interactive)
>   (let* ((image-file "clipboard.png")
>  (exit-status
>   (call-process "convert" nil nil nil
> "clipboard:" image-file)))
> (org-insert-link nil (concat "file:" image-file) "")
> (org-display-inline-images)))
>
> That works for me (Emacs 24.3, Windows 7) though for practical use some
> more edge case handling ("don't insert on failure", "different name if file
> exists") will be wanted.
>
> kind regards, Klaus
>
>
> 2013/6/7 Vitalie Spinu 
>
>>
>> Thanks for the tip. Do you have an elisp piece that handles the image
>> insertion into org buffers?
>>
>> Thanks,
>>
>> Vitalie
>>
>>  >> Klaus-Dieter Bauer 
>>  >> on Thu, 6 Jun 2013 19:16:26 +0200 wrote:
>>
>>  > Dear All,
>>  > Please Help,
>>  > I need to paste raw image from clipboard into emacs/orgmode, I am a
>>  > microsoft onenote user and I got used to take a lot of snapshots
>> and embed
>>  > it into my notes, I think if I could know how to embed images
>> directly into
>>  > emacs/orgmode from clipboard, I will switch to emacs very easily.
>>
>>  > I searched the internet but unfortunately I didn't find the answer,
>>  > Thanks a lot.
>>  > Dodo
>>
>>  > Hello!
>>
>>  > While the original poster probably long since has implemented one of
>> the
>>  > previously suggested solutions (or given up) I thought I'd share a
>> more general
>>  > solution I found [1].
>>
>>  > ImageMagick's `convert' can use clipboard: as input file (don't know
>> if it works
>>  > as output file).
>>
>>  > convert clipboard: FILENAME-WITH-EXTENSION
>>
>>  > I tested it with the cygwin and native windows versions and both
>> worked.
>>
>>  > king regards, Klaus
>>
>>  > PS1: On Windows `convert.exe' might be shadowed by another executable,
>>  > especially C:\Windows\System32\convert.exe. In that case the PATH
>> variable
>>  > should be adjusted such that ImageMagick comes before
>> C:\Windows\system32. To
>>  > check what shadows the executable, you can run "where convert" in the
>>  > Windows-commandline.
>>  > PS2: On Windows only basic image-displaying-support is included
>> out-of-the-box.
>>  > To get full support, the easiest way is to install the full GnuWin32
>> tools
>>  > (which include the necessary image libraries) with the web-installer.
>>
>>  > --
>>
>>  > [1] User "magick" in
>>  >
>> http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=7524&p=22859
>> .
>>
>>
>


Re: [O] org-agenda moves point in all org agenda buffers

2013-11-06 Thread Bastien
Hi Samuel,

Samuel Wales  writes:

> Point is moved to beginning of buffer in every agenda file when I run
> the agenda.
>
> emacs -Q with a minimal test case and (setq org-agenda-window-setup
> 'current-window) has the bug.

This is fixed now, thanks.

-- 
 Bastien



Re: [O] function?

2013-11-06 Thread Uwe Brauer
>> "Bastien" == Bastien   writes:

   > Hi Uwe,
   > Uwe Brauer  writes:

   >> I never used this site you mentioned, how can I copy the code? 

   > Simply send me your public key and I'll give you access to the Worg
   > git repository.  

s/mime or (gnu)pgp? My pgp key is 14 years old (1024).


smime.p7s
Description: S/MIME cryptographic signature


Re: [O] function?

2013-11-06 Thread Bastien
Uwe Brauer  writes:

> s/mime or (gnu)pgp? My pgp key is 14 years old (1024).

~/.ssh/id_rsa.pub or ~/.ssh/id_dsa.pub should do -- no
problem for the age of the key.

Thanks,

-- 
 Bastien



Re: [O] Can org-capture-templates be made more flexible?

2013-11-06 Thread Leo Liu
On 2013-11-06 16:15 +0800, Bastien wrote:
> I'm not sure I understand your use-case clearly: you need to invoke
> org-capture with no target file?
>
> Thanks for further explanations

Exactly. I need the ability to send the org buffer created by capture to
the Notes.app directly. The Notes.app handles the storage and
synchronisation between multiple devices.

Leo



Re: [O] Show TODO item in table of contents

2013-11-06 Thread Rainer Stengele
Am 06.11.2013 16:13, schrieb Nicolas Goaziou:
> Hello,
> 
> Bastien  writes:
> 
>> Nicolas Goaziou  writes:
>>
 In html export include todo state words in table of contents.
>>>
>>> Would the following patch do the job?
>>
>> It does for me!  Thanks
> 
> Applied then.
> 
> 
> Regards,
> 
Wonderful! Works!

I love you guys ..

Regards, Rainer




Re: [O] Capture templates with "function" type

2013-11-06 Thread Brett Viren
Bastien  writes:

> Capture templates using `function' should now return back to the
> correct window location.  Thanks for raising this,

Thanks so much for putting time in it!

Regards,
-Brett.


pgpgYsSYgPjri.pgp
Description: PGP signature


Re: [O] Can org-capture-templates be made more flexible?

2013-11-06 Thread Bastien
Hi Leo,

Leo Liu  writes:

> On 2013-11-06 16:15 +0800, Bastien wrote:
>> I'm not sure I understand your use-case clearly: you need to invoke
>> org-capture with no target file?
>>
>> Thanks for further explanations
>
> Exactly. I need the ability to send the org buffer created by capture to
> the Notes.app directly. The Notes.app handles the storage and
> synchronisation between multiple devices.

In that case, using a target like (function ...) could do -- did you
try this?

See (info "(org)Template elements")

HTH,

-- 
 Bastien



Re: [O] org-tree-to-indirect-buffer: multiple buffers; buffer name containing ID

2013-11-06 Thread Adam Porter
Bastien  gnu.org> writes:

> The attached patch does name indirect buffers after the current tree
> heading -- thanks for this idea.
> 
> Would anyone else find this useful?

Yes, please.  :)




Re: [O] Mobile org - add new items to org file

2013-11-06 Thread Adam Porter
Chris Henderson  gmail.com> writes:

> Is there any way to make the new entries go to my gtd.org file instead?
Also: would it be possible to define where in gtd.org file the new entries
should go, like some new entries should go under Tasks and some should go
under Projects.

There is an option in the Android app that lets you choose what headline to
add new entries under.  It seems to work for me.  :)




[O] [bug] ox-org.el subtree export appears broken

2013-11-06 Thread Eric Schulte
Specifically, the title is not taken from the current heading, and
subheadings are not promoted to the top level.

Export the "Example Subtree" heading in the attached example file using
the "subtree" option to demonstrate.

Thanks,

#+Title: Subtree Export Example

* Top
** Problem
I think subtree exports are broken using the Org-mode backend.  I
would expect the subtree title to become the exported page title, and
all nested heading to be promoted to the top level, however this does
not happen.  This appears to work with other backends (confirmed with
the html backend).

** Example Subtree
With the point in this subtree I export using the =subtree= option.

*** Nested subtree one
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam
nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis
natoque penatibus et magnis dis parturient montes, nascetur ridiculus
mus. Nulla posuere. Donec vitae dolor. Nullam tristique diam non
turpis. Cras placerat accumsan nulla. Nullam rutrum. Nam vestibulum
accumsan nisl.

*** Nested subtree two
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam
nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis
natoque penatibus et magnis dis parturient montes, nascetur ridiculus
mus. Nulla posuere. Donec vitae dolor. Nullam tristique diam non
turpis. Cras placerat accumsan nulla. Nullam rutrum. Nam vestibulum
accumsan nisl.

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D


Re: [O] [ANN] Improved Flyspell check

2013-11-06 Thread Eric Schulte
I've been using this since it was sent, and I haven't noticed any bad
behavior.

Cheers,

Nicolas Goaziou  writes:

> Nicolas Goaziou  writes:
>
> Updated patch.
>
>
> -- 
> Nicolas Goaziou
>
> From 13f68648a0ff468385668f6b141748607d3f8103 Mon Sep 17 00:00:00 2001
> From: Nicolas Goaziou 
> Date: Sun, 3 Nov 2013 15:15:07 +0100
> Subject: [PATCH] Improve Flyspell check
>
> * lisp/org.el (org-mode-flyspell-verify): Rewrite function using
>   "org-element.el".  In particular, it doesn't rely on fontification
>   anymore.
> (org-remove-flyspell-overlays-in): Remove function.
> (org-do-emphasis-faces, org-activate-plain-links)
> (org-fontify-meta-lines-and-blocks-1, org-activate-footnote-links)
> (org-activate-target-links, org-activate-tags, org-activate-code)
> (org-activate-angle-links): Don't call
> `org-remove-flyspell-overlays-in'.
> * contrib/lisp/org-wikinodes.el (org-wikinodes-activate-links): Don't
>   call `org-remove-flyspell-overlays-in'.
> ---
>  contrib/lisp/org-wikinodes.el |   5 --
>  lisp/org.el   | 109 
> ++
>  2 files changed, 68 insertions(+), 46 deletions(-)
>
> diff --git a/contrib/lisp/org-wikinodes.el b/contrib/lisp/org-wikinodes.el
> index 4efc373..c6f2006 100644
> --- a/contrib/lisp/org-wikinodes.el
> +++ b/contrib/lisp/org-wikinodes.el
> @@ -79,15 +79,10 @@ to `directory'."
>(if (re-search-forward org-wikinodes-camel-regexp limit t)
> (if (equal (char-after (point-at-bol)) ?*)
> (progn
> - ;; in  heading - deactivate flyspell
> - (org-remove-flyspell-overlays-in (match-beginning 0)
> -  (match-end 0))
>   (add-text-properties (match-beginning 0) (match-end 0)
>'(org-no-flyspell t))
>   t)
>   ;; this is a wiki link
> - (org-remove-flyspell-overlays-in (match-beginning 0)
> -  (match-end 0))
>   (add-text-properties (match-beginning 0) (match-end 0)
>(list 'mouse-face 'highlight
>  'face 'org-link
> diff --git a/lisp/org.el b/lisp/org.el
> index 2382a9c..452babb 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -5459,8 +5459,6 @@ The following commands are available:
>(abbrev-table-put org-mode-abbrev-table
>   :parents (list text-mode-abbrev-table)))
>  
> -(put 'org-mode 'flyspell-mode-predicate 'org-mode-flyspell-verify)
> -
>  (defsubst org-fix-ellipsis-at-bol ()
>(save-excursion (goto-char (window-start)) (recenter 0)))
>  
> @@ -5685,9 +5683,6 @@ The time stamps may be either active or inactive.")
>   (font-lock-prepend-text-property (match-beginning 2) (match-end 2)
>'face
>(nth 1 a))
> - (and (nth 2 a)
> -  (org-remove-flyspell-overlays-in
> -   (match-beginning 0) (match-end 0)))
>   (add-text-properties (match-beginning 2) (match-end 2)
>'(font-lock-multiline t org-emphasis t))
>   (when org-hide-emphasis-markers
> @@ -5753,7 +5748,6 @@ prompted for."
>(let (f hl)
>  (when (and (re-search-forward (concat org-plain-link-re) limit t)
>  (not (org-in-src-block-p)))
> -  (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0))
>(setq f (get-text-property (match-beginning 0) 'face))
>(setq hl (org-match-string-no-properties 0))
>(if (or (eq f 'org-tag)
> @@ -5770,7 +5764,6 @@ prompted for."
>  (defun org-activate-code (limit)
>(if (re-search-forward "^[ \t]*\\(:\\(?: .*\\|$\\)\n?\\)" limit t)
>(progn
> - (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0))
>   (remove-text-properties (match-beginning 0) (match-end 0)
>   '(display t invisible t intangible t))
>   t)))
> @@ -5812,7 +5805,6 @@ by a #."
> (cond
>  ((member dc1 '("+html:" "+ascii:" "+latex:"))
>   ;; a single line of backend-specific content
> - (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0))
>   (remove-text-properties (match-beginning 0) (match-end 0)
>   '(display t invisible t intangible t))
>   (add-text-properties (match-beginning 1) (match-end 3)
> @@ -5901,7 +5893,6 @@ by a #."
>(if (and (re-search-forward org-angle-link-re limit t)
>  (not (org-in-src-block-p)))
>(progn
> - (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0))
>   (add-text-properties (match-beginning 0) (match-end 0)
>(list 'mouse-face 'highlight
>  'keymap org-mouse-map))
> @@ -5913,7 +5904,6 @@ by a #."
>(let ((fn (org-footnote-next-reference-or-definition limit)))
>  (when

Re: [O] Having trouble with hidestars this morning

2013-11-06 Thread Aaron Ecay
2013ko azaroak 6an, Bastien-ek idatzi zuen:
> 
> Hi Susan,
> 
> Susan Cragin  writes:
> 
>> But after compiling both emacs and org-mode from git this morning,
>> and re-installing, my outlines show all the stars, and the stars
>> cannot be turned off.
> 
> I do see the same problem -- Nicolas, do you know what may have caused
> this?

It is a new bug (IMO) in emacs.  Reported here:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15815

There is a workaround in the bug report also.

-- 
Aaron Ecay



Re: [O] [bug] ox-org.el subtree export appears broken

2013-11-06 Thread Nicolas Goaziou
Hello,

Eric Schulte  writes:

> Specifically, the title is not taken from the current heading, and
> subheadings are not promoted to the top level.

I partly fixed this: subheadings should now get correct level.

OTOH, "ox-org" back-end doesn't insert any keyword (DATE, AUTHOR,
TITLE), subtree export or not. If we add such keywords during subtree
export, we also have to add them during regular export. I'm not
convinced this is within the scope of that back-end.

What do you think?


Regards,

-- 
Nicolas Goaziou



Re: [O] (no subject)

2013-11-06 Thread Cecil Westerhof
2013/11/6 Cecil Westerhof 

> > I would like to keep things in the three "Hours Today". Is there a
>
>> > way to get something like:
>> > | Headline  | Time   |
>> > |---+|
>> > | *Total time*  | *6:35* |
>> > |---+|
>> > | Workshop shell scripting  |   2:12 |
>> > | Security Intake   |   2:39 |
>> > | Internal Project  |   1:44 |
>>
>> No.
>
>
> OK. I'll have to live with it, or make a workaround.
>

I solved it with:
#+BEGIN: clocktable :maxlevel 1 :scope nil :compact nil

And using narrow-region.

-- 
Cecil Westerhof


Re: [O] [BUG] hline references on left side of table formula

2013-11-06 Thread Rick Frankel

On 2013-11-06 03:23, Bastien wrote:

lom...@voila.fr writes:

I was interested to use hline references on the left side. However I 
found out that it

is not completely unsupported.
When the left side consist of:
* single cells references, it does not work
* ranged cells, it works for me (org 8.0.3)

(I'm not sure I fully understand the issue.)

The patch below tranforms the single cell references to ranged cells .

However it still does not work for references like @+ or @- I$1.. ,
which can be solve using references like @I+1#1.

If you come up with a complete patch, please submit it by following
the guidelines here: http://orgmode.org/worg/org-contribute.html


What he is saying, is that references like =@II$2=, or =@II+1$2= do not
work correctly on the left-hand side of a table format (verified by
carsten in a previous thread) which is why i created the patch to
disallow hline-relative references on th LHS.

However, he has found that ranged references line as =@II$2..@II+2$2=
do in fact work to reference a single cell on the left hand side on a
formula.

For example:

Given the input table:

| a | b |
|---+---|
| x | 1 |
| y | 2 |
|---+---|
|   |   |
|   |   |

The following results occur:

| a | b |
|---+---|
| x | 1 |
| y | 2 |
|---+---|
| x + y | 3 |
| x + y | 3 |
#+TBLFM: @II$2=vsum(@I..@II)

| a | b |
|---+---|
| x | 1 |
| y | 2 |
|---+---|
|   | 3 |
|   |   |
#+TBLFM: @II$2..@II+1$2=vsum(@I..@II)

| a | b |
|---+---|
| x | 1 |
| y | 2 |
|---+---|
| 3 | 3 |
| 3 | 3 |
#+TBLFM: @II$2=vsum(@I$2..@II$2)

| a | b |
|---+---|
| x | 1 |
| y | 2 |
|---+---|
|   | 3 |
|   |   |
#+TBLFM: @II$2..@II+1$2=vsum(@I$2..@II$2)

So, perhaps my patch was premature, but should instead should check
for hline refs w/o ranges on the lhs. Here's a new patch to only
error-out if there is no range spec. Note that this also fixes Achim's
issue w/ the colnames test failing.


rick

 8< 
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -3016,8 +3016,9 @@ known that the table will be realigned a little 
later anyway."

;; Insert constants in all formulas
(setq eqlist
(mapcar (lambda (x)
- (if (string-match "^@-?I+" (car x))
- (user-error "Can't assign to hline relative reference"))
+ (if (and (string-match "^@-?I+" (car x))
+  (not (string-match "\.\.@" (car x
+ (user-error "Can't assign to hline relative reference 
without a range specification."))

(when (string-match "\\`$[<>]" (car x))
(setq lhs1 (car x))
(setq x (cons (substring





Re: [O] [BUG] hline references on left side of table formula

2013-11-06 Thread Achim Gratz
Rick Frankel writes:
> What he is saying, is that references like =@II$2=, or =@II+1$2= do not
> work correctly on the left-hand side of a table format (verified by
> carsten in a previous thread) which is why i created the patch to
> disallow hline-relative references on th LHS.

They are working, sort of, by constructing an LHS range implicitly with
the cursor at the end of the table in the first column (equivalent of
@$).  This is hard to explain, but try a slightly more advance table:

| a | b |
|---+---|
| w | 1 |
| x | 2 |
|---+---|
|   |   |
|   |   |
|---+---|
| y | 3 |
| z | 4 |
|---+---|
|   |   |

with these formulas:
#+TBLFM: $=vsum(@-II..@-I)


> However, he has found that ranged references line as =@II$2..@II+2$2=
> do in fact work to reference a single cell on the left hand side on a
> formula.
>
> For example:
>
> Given the input table:
>
> | a | b |
> |---+---|
> | x | 1 |
> | y | 2 |
> |---+---|
> |   |   |
> |   |   |
>
> The following results occur:
>
> | a | b |
> |---+---|
> | x | 1 |
> | y | 2 |
> |---+---|
> | x + y | 3 |
> | x + y | 3 |
> #+TBLFM: @II$2=vsum(@I..@II)
>
> | a | b |
> |---+---|
> | x | 1 |
> | y | 2 |
> |---+---|
> |   | 3 |
> |   |   |
> #+TBLFM: @II$2..@II+1$2=vsum(@I..@II)
>
> | a | b |
> |---+---|
> | x | 1 |
> | y | 2 |
> |---+---|
> | 3 | 3 |
> | 3 | 3 |
> #+TBLFM: @II$2=vsum(@I$2..@II$2)
>
> | a | b |
> |---+---|
> | x | 1 |
> | y | 2 |
> |---+---|
> |   | 3 |
> |   |   |
> #+TBLFM: @II$2..@II+1$2=vsum(@I$2..@II$2)
>
> So, perhaps my patch was premature, but should instead should check
> for hline refs w/o ranges on the lhs. Here's a new patch to only
> error-out if there is no range spec. Note that this also fixes Achim's
> issue w/ the colnames test failing.
>
>
> rick
>
>  8< 
> --- a/lisp/org-table.el
> +++ b/lisp/org-table.el
> @@ -3016,8 +3016,9 @@ known that the table will be realigned a little 
> later anyway."
> ;; Insert constants in all formulas
> (setq eqlist
> (mapcar (lambda (x)
> - (if (string-match "^@-?I+" (car x))
> - (user-error "Can't assign to hline relative reference"))
> + (if (and (string-match "^@-?I+" (car x))
> +  (not (string-match "\.\.@" (car x
> + (user-error "Can't assign to hline relative reference 
> without a range specification."))
> (when (string-match "\\`$[<>]" (car x))
> (setq lhs1 (car x))
> (setq x (cons (substring
>
>
>
>
-- 

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

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




Re: [O] [BUG] hline references on left side of table formula

2013-11-06 Thread Achim Gratz
Achim Gratz writes:
[...]
> with these formulas:
> #+TBLFM: $=vsum(@-II..@-I)

whoops, press C-c C-c in the wrong buffer.

I meant these formulas:

#+TBLFM: @$=vsum(@-II..@-I)
#+TBLFM: @II=vsum(@-II..@-I)
#+TBLFM: @III=vsum(@-II..@-I)
#+TBLFM: @=vsum(@-II..@-I)
#+TBLFM: @II..$2=vsum(@-II..@-I)
#+TBLFM: @III..$2=vsum(@-II..@-I)
#+TBLFM: @..$2=vsum(@-II..@-I)
#+TBLFM: @II+1..@II$2=vsum(@-II..@-I)
#+TBLFM: @II$2..@II+1$2=vsum(@-II..@-I)

Some of the results are useful when your table has a certain, even
though in general this does the wrong thing as Carsten said.  I'm not
really having an opinion on whether this should be an error (as your
previous patch does, which should then add a correction to the test that
is now failing) or if some / all of this should stay allowed until
somebody musters the time to fix it properly (I think this would amount
to re-implementing a good part of what is org-table).


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

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




Re: [O] [bug] ox-org.el subtree export appears broken

2013-11-06 Thread Eric Schulte
Nicolas Goaziou  writes:

> Hello,
>
> Eric Schulte  writes:
>
>> Specifically, the title is not taken from the current heading, and
>> subheadings are not promoted to the top level.
>
> I partly fixed this: subheadings should now get correct level.
>

Confirmed, thanks.

>
> OTOH, "ox-org" back-end doesn't insert any keyword (DATE, AUTHOR,
> TITLE), subtree export or not. If we add such keywords during subtree
> export, we also have to add them during regular export. I'm not
> convinced this is within the scope of that back-end.
>
> What do you think?
>

I don't know as much about backends so I'm willing to defer.

My initial thoughts are that inserting keywords *with* values while not
inserting empty keywords would be the most intuitive.  This way a
subtree export would insert a title (taken from the subtree heading),
and any other keywords set as subtree properties, but whole-buffer
export wouldn't insert any keywords which weren't present in the
original.

I hope this makes sense, and thanks for the quick fix.

Best,

>
>
> Regards,

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



[O] Timestamp repeaters

2013-11-06 Thread Samuel W. Flint
I've been looking through the manual about timestamp repeaters, and I see
no way of specifying it repeating only a certain number of times.  Is
there a way to do this?

Sam


-- 
Sam Flint
swfl...@flintfam.org
freenode: swflint
(402) 517-8468
http://flintfam.org/~swflint
BAFBF3FF




Re: [O] [bug] ox-org.el subtree export appears broken

2013-11-06 Thread Nicolas Goaziou
Eric Schulte  writes:

> My initial thoughts are that inserting keywords *with* values while not
> inserting empty keywords would be the most intuitive.

TITLE always have a value. When not specified, it defaults to buffer's
name.

Also, what keywords? Document keywords (DATE, AUTHOR, TITLE)? Or other
export related keyword (CREATOR, DESCRIPTION, KEYWORDS, EMAIL)? Anything
else (OPTIONS, LANGUAGE...)?

Also, should these belong to the inner or outer template, i.e. should
they be excluded unconditionally on a "body-only" export, or not?

This is not very difficult to implement, but I'd rather have precise
specifications first. And since you are the one making the request...


Regards,

-- 
Nicolas Goaziou



Re: [O] [ANN] Improved Flyspell check

2013-11-06 Thread Nicolas Goaziou
Hello,

Eric Schulte  writes:

> I've been using this since it was sent, and I haven't noticed any bad
> behavior.

Thanks for the feedback.

BTW, I tried to add `org-self-insert-command' to
`flyspell-delayed-commands', since `self-insert-command' belongs to
`flyspell-default-delayed-commands', but I didn't notice any
improvement. Does this change anything for you?


Regards,

-- 
Nicolas Goaziou



Re: [O] Temp files are not deleted after beamer export with source code blocks

2013-11-06 Thread James Harkins

On Wednesday, November 6, 2013 10:15:44 PM HKT, Nicolas Goaziou wrote:

No ***-**.vrb files were deleted.


Out of curiosity: in my case vrb files follow the template "***.**.vrb"
not "***-**.vrb". Are you sure about the hyphen?


Hm, you're right -- I was sure they are hyphens, but I just looked again 
and they are indeed dots.


As a final test, I deleted all the .vrb files manually and exported my 
document again. Then, after the export process finished, I refreshed a 
dired buffer for the directory in question:


 -rw-rw-r-- 1 dlm dlm   504 Nov  7 09:28 lp-slides.5.vrb
 -rw-rw-r-- 1 dlm dlm   667 Nov  7 09:28 lp-slides.6.vrb
 -rw-rw-r-- 1 dlm dlm   563 Nov  7 09:28 lp-slides.7.vrb
 -rw-rw-r-- 1 dlm dlm   662 Nov  7 09:28 lp-slides.8.vrb

These were all created during the last export cycle, and not deleted by 
that cycle.


hjh



Re: [O] Can org-capture-templates be made more flexible?

2013-11-06 Thread Leo Liu
On 2013-11-07 00:25 +0800, Bastien wrote:
> In that case, using a target like (function ...) could do -- did you
> try this?

thanks for the pointer. I glanced at this option while reading the
org-capture-templates' doc.

>From org-capture-set-target-location:

   ((eq (car target) 'function)
(funcall (nth 1 target))
(org-capture-put :exact-position (point))
(setq target-entry-p (and (derived-mode-p 'org-mode) (org-at-heading-p

and org-capture-finalize calls save-buffer I think this option requires
a file still.

Thanks,
Leo



Re: [O] [BUG] hline references on left side of table formula

2013-11-06 Thread Michael Brand
Hi Rick

On Wed, Nov 6, 2013 at 7:50 PM, Rick Frankel  wrote:
> +  (not (string-match "\.\.@" (car x

This would be the same as

> +  (not (string-match "..@" (car x

but you meant

> +  (not (string-match "\\.\\.@" (car x

Michael



Re: [O] Latex export does not work

2013-11-06 Thread Vladimir Lomov
Hello,
** Cecil Westerhof [2013-11-06 14:23:15 +0100]:

> 2013/11/6 Cecil Westerhof 

>> 2013/11/6 Cecil Westerhof 

>>> I am only getting a message:
>>> ! Package inputenc Error: Unicode char \u8:- not set up for use with
>>> LaTeX.

>>> But that should be solvable.


>> I solved that by changing in my .tex file:
>> \usepackage[utf8]{inputenc}
>> to:
>> \usepackage[utf8x]{inputenc}

>> and running pdflatex.

>> Is there a way to get this automatically in the .tex file, so I do not
>> have to change it?


> Based on
> http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=bb488fa3b1eaa61ea2dfe7238f9da85bc42b0ffb

> I have:
> (defcustom org-export-latex-inputenc-alist '(\"utf8\" . \"utf8x\") "")

> But still the .tex file contains:
> \usepackage[utf8]{inputenc}
> instead of:
> \usepackage[utf8x]{inputenc}

> What is the right way to do this?

I'm not give an advice how to get 'utf8x' option for inputenc
(personally I redefine all LaTeX stuff of Org) but for the record this is very
useful information about 'utf8' vs 'utf8x':
http://tex.stackexchange.com/questions/13067/utf8x-vs-utf8-inputenc

Also, you may try lualatex instead of pdflatex.

---
WBR, Vladimir Lomov

-- 
Under the wide and starry sky,
Dig my grave and let me lie,
Glad did I live and gladly die,
And laid me down with a will,
And this be the verse that you grave for me,
Here he lies where he longed to be,
Home is the sailor home from the sea,
And the hunter home from the hill.
-- Robert Loius Stevenson, "Requiem"



[O] bug#15815: 24.3.50; distant-foreground face attribute and org-hide face

2013-11-06 Thread Paul Eggert
For what it's worth, I backed out the integer-related face changes
(trunk bzr 114993, 2013-11-06 00:14:56 UTC) and the bug was still there.
This tends to confirm the guess that the bug is
in the :distant-foreground-related changes
(circa trunk bzr 114895, 2013-11-01 15:47:10 UTC).