Re: [O] Preview tikz in org-mode (reduce margins of produced images)

2014-05-20 Thread Leu Zhe
Hi Nick,

Thanks you for your help.

Finally I found a solution by referring the examples in texample.net.
I just replaced the \documentclass{article} to
 documentclass[varwidth]{standalone},
then it works perfectly.

I am not familiar enriched-mode, too.
It is also very strange that why i can not receive the email in my gmail...

Thank you anyway.

Leu


[O] temporarily un-ignoring scheduled tasks in global todo list

2014-05-20 Thread Christoph Groth
Hi,

I like to have

(setq org-agenda-todo-ignore-scheduled 'all)
(setq org-agenda-todo-ignore-deadlines 'all)
(setq org-agenda-tags-todo-honor-ignore-options t)

but sometimes I would like to search for some item that I know that is
scheduled somewhere into the future.  Or I want to verify whether some
item exists.

What would be the best way to temporarily show all tasks?  I am thinking
of writing a function that calls org-agenda with the above variables
temporarily set to the default values.  (That should be possible in
elisp, but I do not yet know how.)  Is there a better way?

Alternatively, one could always show all items in the global todo list,
but somehow mark the already scheduled ones.  Orgmode does not seem to
allow for something like this out-of-the-box, though.

Thanks,
Christoph




Re: [O] export to org, header args disappear

2014-05-20 Thread Aaron Ecay
Hello Bastien and Brady,

The babel/export interface does not attempt to manage the header args
when it rewrites source blocks.  I think this code is pretty subtle.
Check out the (let (... (replacement ...)) ...) code in
‘org-babel-exp-process-buffer’ and the attached patch which fixes the
problem (superficially; I’m not sure if it’s the correct fundamental
approach).

>From 7faf58afa659cf63042464dbd15ad62239416832 Mon Sep 17 00:00:00 2001
From: Aaron Ecay 
Date: Wed, 21 May 2014 01:58:18 -0400
Subject: [PATCH] ox-org: fix export of source blocks with header args

---
 lisp/ob-exp.el  | 52 +
 testing/lisp/test-ob-exp.el |  6 +++---
 2 files changed, 32 insertions(+), 26 deletions(-)

diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el
index 220a3c3..ce45d84 100644
--- a/lisp/ob-exp.el
+++ b/lisp/ob-exp.el
@@ -311,7 +311,7 @@ The function respects the value of the :exports header argument."
 	 (org-babel-exp-code info)
 
 (defcustom org-babel-exp-code-template
-  "#+BEGIN_SRC %lang%switches%flags\n%body\n#+END_SRC"
+  "#+BEGIN_SRC %lang%switches%params\n%body\n#+END_SRC"
   "Template used to export the body of code blocks.
 This template may be customized to include additional information
 such as the code block name, or the values of particular header
@@ -322,7 +322,7 @@ and the following %keys may be used.
  name -- the name of the code block
  body -- the body of the code block
  switches -- the switches associated to the code block
- flags - the flags passed to the code block
+ params  the parameters passed to the code block
 
 In addition to the keys mentioned above, every header argument
 defined for the code block may be used as a key and will be
@@ -332,27 +332,33 @@ replaced with its value."
 
 (defun org-babel-exp-code (info)
   "Return the original code block formatted for export."
-  (setf (nth 1 info)
-	(if (string= "strip-export" (cdr (assoc :noweb (nth 2 info
-	(replace-regexp-in-string
-	 (org-babel-noweb-wrap) "" (nth 1 info))
-	  (if (org-babel-noweb-p (nth 2 info) :export)
-	  (org-babel-expand-noweb-references
-	   info org-babel-exp-reference-buffer)
-	(nth 1 info
-  (org-fill-template
-   org-babel-exp-code-template
-   `(("lang"  . ,(nth 0 info))
- ("body"  . ,(org-escape-code-in-string (nth 1 info)))
- ("switches" . ,(let ((f (nth 3 info)))
-		  (and (org-string-nw-p f) (concat " " f
- ("flags" . ,(let ((f (assq :flags (nth 2 info
-		   (and f (concat " " (cdr f)
- ,@(mapcar (lambda (pair)
-		 (cons (substring (symbol-name (car pair)) 1)
-		   (format "%S" (cdr pair
-	   (nth 2 info))
- ("name"  . ,(or (nth 4 info) "")
+  ;; Here we assume that point is in the source block, an assumption
+  ;; we inherit from `org-babel-exp-src-block'.
+  (let* ((sb (org-element-at-point))
+	 (params (org-element-property :parameters sb)))
+(setf (nth 1 info)
+	  (if (string= "strip-export" (cdr (assoc :noweb (nth 2 info
+	  (replace-regexp-in-string
+	   (org-babel-noweb-wrap) "" (nth 1 info))
+	(if (org-babel-noweb-p (nth 2 info) :export)
+		(org-babel-expand-noweb-references
+		 info org-babel-exp-reference-buffer)
+	  (nth 1 info
+(org-fill-template
+ org-babel-exp-code-template
+ `(("lang"  . ,(nth 0 info))
+   ("body"  . ,(org-escape-code-in-string (nth 1 info)))
+   ("switches" . ,(let ((f (nth 3 info)))
+			(and (org-string-nw-p f) (concat " " f
+   ("flags" . ,(let ((f (assq :flags (nth 2 info
+		 (and f (concat " " (cdr f)
+   ("params" . ,(when (and params (not (string= params "")))
+		  (concat " " params)))
+   ,@(mapcar (lambda (pair)
+		   (cons (substring (symbol-name (car pair)) 1)
+			 (format "%S" (cdr pair
+		 (nth 2 info))
+   ("name"  . ,(or (nth 4 info) ""))
 
 (defun org-babel-exp-results (info type &optional silent hash)
   "Evaluate and return the results of the current code block for export.
diff --git a/testing/lisp/test-ob-exp.el b/testing/lisp/test-ob-exp.el
index 1fe810b..b5738d5 100644
--- a/testing/lisp/test-ob-exp.el
+++ b/testing/lisp/test-ob-exp.el
@@ -289,7 +289,7 @@ Here is one at the end of a line. =2=
 : 2
 
 #+NAME: src1
-#+BEGIN_SRC emacs-lisp
+#+BEGIN_SRC emacs-lisp :exports both
 \(+ 1 1)
 #+END_SRC"
 (org-test-with-temp-text
@@ -316,9 +316,9 @@ Here is one at the end of a line. =2=
   "Test exporting a source block with a flag."
   (should
(string-match
-"\\`#\\+BEGIN_SRC emacs-lisp -some-flag$"
+"\\`#\\+BEGIN_SRC emacs-lisp -x$"
 (org-test-with-temp-text
-	"#+BEGIN_SRC emacs-lisp :flags -some-flag\n\(+ 1 1)\n#+END_SRC"
+	"#+BEGIN_SRC emacs-lisp -x\n\(+ 1 1)\n#+END_SRC"
   (org-export-execute-babel-code)
   (buffer-string)
 
-- 
1.9.3


--
Aaron Ecay


[O] Quoting functions with ' vs #'

2014-05-20 Thread Aaron Ecay
Hello,

Commit a5686d87 (link[1]) changes several uses of #' to '.  Is this org
“house style”?  It disables a compile-time warning about potentially
undefined functions:

#+begin_src elisp
(defun i-give-a-warning () (mapc #'doesnt-exist '(1 2 3)))

(defun i-do-not () (mapc 'doesnt-exist2 '(1 2 3)))
#+end_src

When I’m writing elisp, this warning catches my own mistakes on a pretty
regular basis, and so I’m rather fond of it.  But if bare ' is how org
code should be written, it would be good to know that.

Thanks,
Aaron

[1] 


--
Aaron Ecay



Re: [O] Preview tikz in org-mode (reduce margins of produced images)

2014-05-20 Thread Nick Dokos
Bastien  writes:

> Nick Dokos  writes:
>
>> Unfortunately, you seem to have attached it as text/enriched and it is
>> messed up. Can you please attach it as text/plain?
>
> I attach it just in case.

Didn't know about enriched-mode - thanks!

But back to the original question: with the redefined
org-format-latex-header, I get errors (probably because the preview is
produced by running latex, whereas the redefined header seems to require
xetex). Without the redefined header, I get a preview which does *not*
have large margins. So the header is probably the culprit: I would start
deleting things from it, until the problem disappears. In particular,
the fullpage.sty settings look suspicious to me. Maybe somebody who has
set up previews with xe(la)tex can provide a more helpful answer
(doesn't that require code changes to org?)

-- 
Nick




Re: [O] latex export beginner

2014-05-20 Thread Nick Dokos
Steven Arntson  writes:

> I'm taking my first baby steps at exporting an org file to LaTex. I know
> a little about org-mode, and almost nothing about LaTex.
>
> I type C-c C-e l o
>
> A file named file.tex is produced, but the process halts with an error:
>
> org-latex-compile: PDF file ./plm.pdf wasn't produced: [LaTeX error] 
>
> A program called pdfTex produces a buffer with extensive output,
> including:
>
> ! LaTeX Error: Missing \begin{document}.
>
> This seems like some markup that should probably be included in my file
> automatically as part of the export? Shoud I add "/begin{document}" to
> my org doc?
>

No, the exporter should have done that. Post your org file and the
resulting tex file.

Also, the version of your org mode: C-u M-x org-version will insert
it in the current buffer.
-- 
Nick




Re: [O] Tag setting mode creates two additional windows

2014-05-20 Thread Dmitry Gorbik
Awesome, thanks a lot!

Dima

On May 20, 2014, at 1:21 PM, Bastien  wrote:

> Hi Dmitry,
> 
> Dmitry Gorbik  writes:
> 
>> This one didn’t work, I modified it like this to make it work:
> 
> Okay, double-checked and applied in maint, thanks.
> 
> -- 
> Bastien




[O] latex export beginner

2014-05-20 Thread Steven Arntson
I'm taking my first baby steps at exporting an org file to LaTex. I know
a little about org-mode, and almost nothing about LaTex.

I type C-c C-e l o

A file named file.tex is produced, but the process halts with an error:

org-latex-compile: PDF file ./plm.pdf wasn't produced: [LaTeX error] 

A program called pdfTex produces a buffer with extensive output,
including:

! LaTeX Error: Missing \begin{document}.

This seems like some markup that should probably be included in my file
automatically as part of the export? Shoud I add "/begin{document}" to
my org doc?

Thank you!
Steven Arntson




Re: [O] Problems with org-capture

2014-05-20 Thread Bastien
Hi Josef,

Josef Wolf  writes:

> Any ideas on that problem?

I'll take a look later on -- in the meantime, can you tell what
version of Emacs and Org you are using?

M-x emacs-version RET
M-x org-version RET

Thanks,

-- 
 Bastien



Re: [O] current task being worked in agenda time grid

2014-05-20 Thread Bastien
Eric S Fraga  writes:

> Of course, you *could* change the mode line so that clocking information
> comes earlier in the line... but playing with the mode line can be a
> real time sink, and I speak from experience!  My mode line bears little
> resemblance to the default and the changes were motivated by my using
> Emacs on very small systems such as the OpenPandora.

A mode-line?  What mode-line?

http://bzg.fr/emacs-hide-mode-line.html

> but definitely getting off-topic here :-)

Feels good sometimes :)

-- 
 Bastien



Re: [O] [PATCH] Make the point visible when jumping to the mark

2014-05-20 Thread Bastien
Hi Ian,

Ian Kelling  writes:

> I posted this patch in September. It seems it was forgotten.

I missed it as the time.

> I posted it again on April 30th, nothing yet.  I also have another
> patch thats been sitting on the list for a few weeks now after
> having a discussion and a positive response.

Yes, in http://article.gmane.org/gmane.emacs.orgmode/86050

Did you receive the FSF confirmation for your copyright assignment?
That's the information we need before applying the patches.

> I'd like to do a git pull and find my patches applied at some point,
> and I'm wondering if/when that will happen. And is there anything I
> can do to help?

If the process is completed let us know and we will move on.

Thanks!

-- 
 Bastien



Re: [O] Bug with subscripts and superscripts

2014-05-20 Thread Bastien
Hi Hugo,

Hugo M  writes:

> I'm using org-mode 8.2.3a.

You are referring to the online documentation of Emacs, which
documents Org 7.9.3f.

Please read the Org documentation matching your Org version.

-- 
 Bastien



Re: [O] Org-hide face leaking out to org-columns view

2014-05-20 Thread Bastien
Hi Nikolai,

Nikolai Weibull  writes:

>> It seems that if you use
>>
>> #+STARTUP: indent
>>
>> the org-hide face used for the hidden stars will remain when using the
>> org-columns view, resulting on, in my case, white on gray.
>
> To clarify, this leaks out over the whole item, not just the stars,
> making the whole item column hard to read.
>
>> Is there a workaround to this that I’m not thinking of?

I'm not sure I understand the problem.

Can you send a small picture?

In any case, here with Org 8.2.6 I don't see a problem: both the
indentation and the hiding of the stars are canceled when using the
column view.

-- 
 Bastien



Re: [O] wish: provide flush_right/right_aligned text rendering directive

2014-05-20 Thread Bastien
Hi Gregor,

Gregor Zattler  writes:

> I wish for a #+BEGIN_FLUSH_RIGHT (#+BEGIN_RIGHT_ALIGNED)
> directive in order to render text right flushed (right aligned)
> in export backends.

Just out of curiosity, what backend do you need this for?

Cheers,

-- 
 Bastien



Re: [O] Set tags in region

2014-05-20 Thread Bastien
As I don't see it mentioned in this thread:

  (setq org-loop-over-headlines-in-active-region t)

will do wonders for several commands.

If someone has a good idea where to put this in the
manual, I'm all ears!

-- 
 Bastien



Re: [O] Clock-in in agenda makes some headings with links disappear

2014-05-20 Thread Bastien
Hi Thomas,

Thomas Morgan  writes:

> Here is a recipe for what might be another manifestation
> of this bug.

Yes -- something tricky, but I really want to fix this for the
next maintainance release.  Thanks for the heads up,

-- 
 Bastien



Re: [O] export to org, header args disappear

2014-05-20 Thread Bastien
Hi Brady,

Brady Trainor  writes:

> I have code blocks such as
>
> #+BEGIN_SRC emacs-lisp :tangle no
> ...
> #+END_SRC
>
> and when I export the file to org, it becomes
>
> #+BEGIN_SRC emacs-lisp
> ...
> #+END_SRC
>
> Is there an option to include the header args on export?

Not to my knowledge -- I played a bit with implementing a new
"verbatim" value for the :exports parameter, but I finally find
this confusing.  Maybe someone will have better ideas.

-- 
 Bastien



Re: [O] Bug: R code block fails on one-dimensional variable [8.2.6 (8.2.6-dist @ /Users/dmirylenka/src/org-8.2.6/lisp/)]

2014-05-20 Thread Bastien
Hi Daniil,

Daniil Mirylenka  writes:

> I am execute the following code block,
> (in an empty scratch buffer, by running 'M-x org-babel-execute-src-block'):
>> #+BEGIN_SRC R :var x='(1 2 3)
>>   x
>> #+END_SRC
> What I expect is:
>> #+RESULTS:
>> | 1 | 2 | 3 |
> Instead, I get no output, and the following error message:

Fixed along your suggestion, thanks,

-- 
 Bastien



Re: [O] Preview tikz in org-mode (reduce margins of produced images)

2014-05-20 Thread Bastien
Nick Dokos  writes:

> Unfortunately, you seem to have attached it as text/enriched and it is
> messed up. Can you please attach it as text/plain?

I attach it just in case.



test.org
Description: Lotus Organizer

-- 
 Bastien


Re: [O] M- does not work as described in the manual

2014-05-20 Thread Bastien
Hi Kevin,

There used to be such a problem but it has been fixed.

When you report a bug, please first check it's not here anymore
with the latest stable version, or at least provide the version
string of Org.

Thanks,

-- 
 Bastien



Re: [O] C-c C-e h h (export to html)

2014-05-20 Thread Nick Dokos
Bastien  writes:

> Hi Dave,
>
> Dave Pawson  writes:
>
>> C-c C-e hreports HTML export done, pushed to kill ring and clipboard.
>> Repeatable, no error. I thought I needed h  h  to get the html export?
>
> Yes, you need `C-c C-e h h' with Org >8.0.
>
> Or `C-c C-e h h' to export in a buffer and display the buffer.
>

That last one should be `C-c C-e h H'

-- 
Nick




Re: [O] (org-insert-headline '(4)) should insert new headline before point

2014-05-20 Thread Bastien
Hi Leonard,

I followed your directions and added another fix.

Things should be okay now, let me know if not.

Thanks,

-- 
 Bastien



Re: [O] [PATCH] Make the point visible when jumping to the mark

2014-05-20 Thread Ian Kelling
> From 9191e4a364e251119cf8b7c72e41f6c0d09583f2 Mon Sep 17 00:00:00 2001
> Message-ID: <87ha5aqa93@treetowl.lan>
> MIME-Version: 1.0
> Content-Type: text/plain
>
> *lisp/org.el: Advise commands which jump to the mark
> ---
>
> There are several non-org commands that jump to a location and would be
> unwieldy if the location remained hidden, (isearch, bookmark-jump,
> save-place), but org-mode has code to fix them. In this patch, I
> followed their example.
>
> I have an emacs fsf copyright assignment completed & on file with fsf, I can
> send gpg signed copy if you need it.
>
> - Ian Kelling
>
>
>  lisp/org.el |   21 +
>  1 file changed, 21 insertions(+)
>
> diff --git a/lisp/org.el b/lisp/org.el
> index 44a4e44..9365059 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -24326,6 +24326,27 @@ To get rid of the restriction, use 
> \\[org-agenda-remove-restriction-lock]."
>  (outline-invisible-p)))
> (org-show-context 'bookmark-jump)))
>  
> +(eval-after-load "simple"
> +  '(defadvice set-mark-command (after org-make-visible activate)
> + "Make the point visible with `org-show-context'."
> + (org-mark-jump-unhide)))
> +
> +(eval-after-load "simple"
> +  '(defadvice exchange-point-and-mark (after org-make-visible activate)
> + "Make the point visible with `org-show-context'."
> + (org-mark-jump-unhide)))
> +
> +(eval-after-load "simple"
> +  '(defadvice pop-global-mark (after org-make-visible activate)
> + "Make the point visible with `org-show-context'."
> + (org-mark-jump-unhide)))
> +
> +(defun org-mark-jump-unhide ()
> +  "Make the point visible with `org-show-context' after jumping to the mark."
> +  (when (and (derived-mode-p 'org-mode)
> +  (outline-invisible-p))
> +(org-show-context 'mark-goto)))
> +
>  ;; Make session.el ignore our circular variable
>  (defvar session-globals-exclude)
>  (eval-after-load "session"

I posted this patch in September. It seems it was forgotten. I posted it
again on April 30th, nothing yet. I also have another patch thats been
sitting on the list for a few weeks now after having a discussion and a
positive response. I'd like to do a git pull and find my patches applied
at some point, and I'm wondering if/when that will happen. And is there
anything I can do to help?

- Ian Kelling



Re: [O] [PATCH] org.el (org-offer-links-in-entry): Reuse global variable

2014-05-20 Thread Bastien
Hi Albert,

Albert Krewinkel  writes:

> * org.el (org-offer-links-in-entry): Use global variable
>   `org-any-link-re' instead of defining a string-equal local variable.
>
> The `re' variable defined in function `org-offer-links-in-entry' is
> string-equal to `org-any-link-re' and is hence replaced by the latter.
>
> TINYCHANGE

Finally applied, thanks!

-- 
 Bastien



Re: [O] Can I create an agenda sorted manually keeping its order at refresh?

2014-05-20 Thread Samuel Wales
you can use, for example, priorities to indicate the order you want,
and then refresh the agenda.

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  And
ANYBODY can get it.

Denmark: free Karina Hansen NOW.



Re: [O] Org + Elpy Python + IPython

2014-05-20 Thread Ken Mankoff

And with a bit more work (and help from others) I have it working.

IPython, Org, Elpy, session or no-session. Still cannot set
(elpy-use-ipython) which makes the IPython sessions a bit less awesome
(no popup help, for example). But everything else appears to work.

(setq org-babel-python-command "ipython --pylab=osx --pdb --nosep --classic 
--no-banner --no-confirm-exit")

;; https://github.com/jorgenschaefer/elpy/issues/191
;; https://lists.gnu.org/archive/html/emacs-orgmode/2014-03/msg00405.html
;; make IPython work w/ Org
(defadvice org-babel-python-evaluate
  (around org-python-use-cpaste
  (session body &optional result-type result-params preamble) activate)
  "Add a %cpaste and '--' to the body, so that ipython does the right thing."
  (setq body (concat "%cpaste -q\n" body "\n--\n"))
  ad-do-it
  (if (stringp ad-return-value)
  (setq ad-return-value (replace-regexp-in-string "\\(^Pasting code; enter 
'--' alone on the line to stop or use Ctrl-D\.[\r\n]:*\\)" ""
  ad-return-value


 -k.




Re: [O] Tag setting mode creates two additional windows

2014-05-20 Thread Bastien
Hi Dmitry,

Dmitry Gorbik  writes:

> This one didn’t work, I modified it like this to make it work:

Okay, double-checked and applied in maint, thanks.

-- 
 Bastien



Re: [O] Archive subtree with parent structure

2014-05-20 Thread Bastien
Hi Florian,

Florian Lindner  writes:

> Do you know what is the appropriate place to file such an feature as a
> whishlist item? M-x org-submit-bug-report RET ?

The right way is to use [FR] in your subject line and send the feature
request to this list -- I won't have time to implement this myself but 
I can see how it could be useful.

-- 
 Bastien



Re: [O] Bug: Formula `vcount' fails to count values in date format [8.2.6 (8.2.6-dist @ d:/opt/emacs/site-lisp/org/)]

2014-05-20 Thread Bastien
Hi Gang,

Gang Chen  writes:

> I found line 2715 of file org-table.el:
>
> #+BEGIN_SRC
> (setq form (replace-regexp-in-string org-ts-regexp3 "<\\1>" form))
> #+END_SRC
>
> change the value of `form' from `vcount([2014-01-01,2014-01-03]' to
> `vcount(<2014-01-01,>)'. Is this the expected behavior?

Clearly not -- I fixed this in maint, thanks for reporting it!

-- 
 Bastien



Re: [O] C-c C-e h h (export to html)

2014-05-20 Thread Bastien
Hi Dave,

Dave Pawson  writes:

> C-c C-e hreports HTML export done, pushed to kill ring and clipboard.
> Repeatable, no error. I thought I needed h  h  to get the html export?

Yes, you need `C-c C-e h h' with Org >8.0.

Or `C-c C-e h h' to export in a buffer and display the buffer.

> I'll re-introduce .emacs slowly now.

Okay, please keep us posted if you see posted if you find something
weird.

-- 
 Bastien



Re: [O] org-table-copy-down incrementor

2014-05-20 Thread Bastien
Hi Michael,

Michael Brand  writes:

> As I see only now the use case
> |  1.1 |
> | -0.5 |
> does not seem easy to increment by -1.6 due to the formatting of the
> result, so I don't expect it to be implemented. (number-to-string is
> not enough because of the inaccuracy of the fraction.)

Yes.  There is also `thing-at-point' which does not recognize 1.1 as a
number... I circumvented this by using `calc-eval'.  The above should
now work correctly.

>> (const :tag "Don't increment the value when copying a field" t)))
>
> Wasn't the t meant to be nil?

It was a typo, thanks for reporting it!

-- 
 Bastien



Re: [O] C-c C-e h h (export to html)

2014-05-20 Thread Dave Pawson
On 20 May 2014 17:03, Bastien  wrote:
> Dave Pawson  writes:
>
>> Fails with
>> #+STARTUP:showall
>> #+TITLE: No limit Hold 'Em Poker
>>
>>
>> * Introduction
>>
>> Texas Hold'em is a community card poker game, with game play focused
>> as much on the betting as on the cards being played.
>
> I can't reproduce this.

> Yes, probably.  Try with a bare emacs -q and add suspicious config
> bit progressively to find the culprit.  Boring, but it works.

emacs -q file.org
C-c C-e hreports HTML export done, pushed to kill ring and clipboard.
Repeatable, no error. I thought I needed h  h  to get the html export?

I'll re-introduce .emacs slowly now.

regards




-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk



Re: [O] M- does not work as described in the manual

2014-05-20 Thread Igor Sosa Mayor
Kevin Van Horn  writes:

> Section 2.5 of the online manual states that "If [M-] is used at the 
> beginning of a headline the new headline is created before the current line."
[...]
> That is, I get a blank headline AFTER the current headline, and it becomes 
> the new parent of the original headline's children.
>
> As far as I can tell, that leaves me with no easy way of creating a new 
> heading as the first subheading of an existing heading.

are you really at the beginning of the headline? I have no problems with
this feature in org 8.2.6. 

Which is your org-version?




[O] org-mode regression(?): can't C-c C-o can't parse links that contain [/] AND [%]

2014-05-20 Thread Nicolas Bercher

Hi,
I use to have first level Org entries like this:

* name [/] [%]

But since I upgraded to Debian Wheezy Org-mode 7.8.11, these targets
are no more reachable using org-links I used for years.
As a result, only [/] OR [%] seems supported.

This simple org file below illustrates the issue.

Is this a regression?
(At least, this is really annoying me.)

Thanks for your feedback.
Nicolas

-8<-

Index:
 - [[*not%20OK][not OK]]
 - [[*OK1][OK1]]
 - [[*OK2][OK2]]

* not OK [1/2] [50%]
** DONE action1
** TODO action2

* OK1 [1/2]
** DONE action1
** TODO action2

* OK2 [50%]
** DONE action1
** TODO action2



[O] M- does not work as described in the manual

2014-05-20 Thread Kevin Van Horn
Section 2.5 of the online manual states that "If [M-] is used at the 
beginning of a headline the new headline is created before the current line."

This is not what happens. If I have

* Foo
** Bar
*** Baz

with the cursor at the beginning of headline "Bar", and use M-, I get

* Foo
** Bar
**
*** Baz

instead of

* Foo
**
** Bar
*** Baz 

That is, I get a blank headline AFTER the current headline, and it becomes the 
new parent of the original headline's children.

As far as I can tell, that leaves me with no easy way of creating a new heading 
as the first subheading of an existing heading.





Kevin S. Van Horn, Ph.D. | Senior Developer III
The Modellers
6995 Union Park Center Ste 300 | Salt Lake City, UT 84047
Salt Lake City Office (Mountain Time)

D: 801.290.3823
E: kevin.vanh...@themodellers.com 

www.themodellers.com




[O] Bug: R code block fails on one-dimensional variable [8.2.6 (8.2.6-dist @ /Users/dmirylenka/src/org-8.2.6/lisp/)]

2014-05-20 Thread Daniil Mirylenka

I am execute the following code block,
(in an empty scratch buffer, by running 'M-x org-babel-execute-src-block'):

#+BEGIN_SRC R :var x='(1 2 3)
  x
#+END_SRC

What I expect is:

#+RESULTS:
| 1 | 2 | 3 |

Instead, I get no output, and the following error message:

Wrong number of arguments: max, 0

The problem seems to be with one-dimensional variables, like x='(1 2 3):
when I change the variable to either x=2 or x='((1 2 3)), the code works 
as expected.


Here is the output from the debugger:

Debugger entered--Lisp error: (wrong-number-of-arguments max 0)
  max()
  apply(max nil)
  org-babel-R-assign-elisp(x (1 2 3) nil nil)
  #[(pair) "\302@A\303\304\"A\305\232\303\306  \"A\305\232$\207" 
[pair params org-babel-R-assign-elisp assoc :colnames "yes" :rownames] 
7]((x 1 2 3))
  mapcar(#[(pair) "\302@A\303\304\"A\305\232\303\306 
 \"A\305\232$\207" [pair params org-babel-R-assign-elisp assoc 
:colnames "yes" :rownames] 7] ((x 1 2 3)))
  org-babel-variable-assignments:R(((:comments . "") (:shebang . "") 
(:cache . "no") (:padline . "") (:noweb . "no") (:tangle . "no") 
(:exports . "code") (:results . "replace") (:var x 1 2 3) (:session . 
"none") (:hlines . "no") (:result-type . value) (:result-params 
"replace") (:rowname-names) (:colname-names)))
  org-babel-expand-body:R("x" ((:comments . "") (:shebang . "") 
(:cache . "no") (:padline . "") (:noweb . "no") (:tangle . "no") 
(:exports . "code") (:results . "replace") (:var x 1 2 3) (:session . 
"none") (:hlines . "no") (:result-type . value) (:result-params 
"replace") (:rowname-names) (:colname-names)) nil)
  org-babel-execute:R("x" ((:comments . "") (:shebang . "") (:cache . 
"no") (:padline . "") (:noweb . "no") (:tangle . "no") (:exports . 
"code") (:results . "replace") (:var x 1 2 3) (:session . "none") 
(:hlines . "no") (:result-type . value) (:result-params "replace") 
(:rowname-names) (:colname-names)))

  org-babel-execute-src-block()
  call-interactively(org-babel-execute-src-block record nil)
  command-execute(org-babel-execute-src-block record)
  execute-extended-command(nil "org-babel-execute-src-block")
  call-interactively(execute-extended-command nil nil)


Not sure if it helps, but for me the problem goes away when I change the 
following lines in ob-R.el:


What is there currently:

(let ((max (apply #'max (mapcar #'length (org-remove-if-not
#'sequencep value
   (min (apply #'min (mapcar #'length (org-remove-if-not
#'sequencep value

What I change it to:

(let* ((lengths (mapcar #'length (org-remove-if-not #'sequencep value)))
 (max (if lengths (apply #'max lengths) 0))
 (min (if lengths (apply #'min lengths) 0))

Bellow you can find my setup.

Best regards,
Daniil



Emacs  : GNU Emacs 24.3.1 (x86_64-apple-darwin13.0.0, NS 
apple-appkit-1265.00)

 of 2013-10-25 on dmirylenka
Package: Org-mode version 8.2.6 (8.2.6-dist @ 
/Users/dmirylenka/src/org-8.2.6/lisp/)


current state:
==
(setq
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)

 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-shell-link-function 'yes-or-no-p
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)

 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook 
change-major-mode-hook org-show-block-all append local] 5]
 #[nil "\300\301\302\303\304$\207" [org-add-hook 
change-major-mode-hook org-babel-show-result-all append local] 5]

 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees 
org-cycle-hide-drawers org-cycle-hide-inline-tasks 
org-cycle-show-empty-lines

  org-optimize-window-after-visibility-change)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-babel-load-languages '((R . t))
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )



[O] Bug: Formula `vcount' fails to count values in date format [8.2.6 (8.2.6-dist @ d:/opt/emacs/site-lisp/org/)]

2014-05-20 Thread Gang Chen
Emacs  : GNU Emacs 24.3.1 (i386-mingw-nt5.1.2600)
 of 2013-03-18 on MARVIN
Package: Org-mode version 8.2.6 (8.2.6-dist @ d:/opt/emacs/site-lisp/org/)

Hello, I have a problem when using `vcount' in table.

As the following table:

#+BEGIN_SRC
|   |   date |
|---+|
| * | 2014-01-01 |
| * | 2014-01-03 |
|---+|
| _ |Cnt |
| * |  1 |
#+TBLFM: $Cnt=vcount(@I..@II)
#+END_SRC

After evaluation of the formula of $Cnt, the value is 1, not 2.

I found line 2715 of file org-table.el:

#+BEGIN_SRC
(setq form (replace-regexp-in-string org-ts-regexp3 "<\\1>" form))
#+END_SRC

change the value of `form' from `vcount([2014-01-01,2014-01-03]' to
`vcount(<2014-01-01,>)'. Is this the expected behavior?

Thank you very much in advance!



Re: [O] Tag setting mode creates two additional windows

2014-05-20 Thread Bastien
Hi Dmitry,

Dmitry Gorbik  writes:

> Do you think this can be committed to the trunk?

I'd rather clearly understand what's going on, I don't think
the patch is the final one.

Thanks,

PS: I'm handling past emails when I have some time like now,
so don't worry, the patch does not get lost.

-- 
 Bastien



Re: [O] org-babel-demarcate-block should preserve case of block declaration

2014-05-20 Thread Bastien
Hi Alexander,

Alexander Baier  writes:

> Org 8.3 is also the version
> to be included into Emacs 24.4, isn't it?

No: Emacs 24.4 will include the latest stable release, which
is released from the maint branch and will be 8.2.x.

-- 
 Bastien



Re: [O] Org + Elpy Python + IPython

2014-05-20 Thread Ken Mankoff

Addendum to this old thread:

On 2014-05-07 at 22:52, Ken Mankoff  wrote:
> FYI Org + Elpy + IPython all play nicely now.
>
> There have been some previous posts about people (me included) having
> trouble using the full IPython stack in Org Mode. Some of those
> problems were limited to when using sessions, and others only if
> trying to take full advantage of the nice Python support provided by
> Elpy (enabled via the (elpy-use-ipython) command).
>
> I think the primary issue was Org text analysis on the >>> prompt which
> in IPython becomes "In [n]:". This is solved with the "--classic" flag
> to ipython.
>
> With this setup:
>
> (setq org-babel-python-command "ipython --pylab=qt4 --pdb --nosep --classic 
> --no-banner --no-confirm-exit")
>
> I now have Org, Python, IPython, and Elpy (including
> (elpy-use-ipython)) all running together in session and non-session
> mode.

ipython --classic appears to let IPython work properly with Org, but it
does not. There are some nefarious bugs. For example, the second
indented for loop (foo, bar) never runs if the interpreter is "ipython
--classic", but runs properly for "python".

for n in [1,2]:
print n
for a in ['a','b']:
print a

for f in ['foo','bar']:
print f

It appears that IPython munges empty lines differently than python. I've
tried the " --no-autoindent" and "--no-pprint" and the blank line still
causes problems. Anyway, I recommend sticking with plain Python which
works in all code I've tried both session and non-session.

  -k.





Re: [O] org-table-copy-down incrementor

2014-05-20 Thread Michael Brand
Hi Bastien

On Tue, May 20, 2014 at 4:11 PM, Bastien  wrote:
> Michael Brand  writes:
>> For me it would be already enough and preferred when the increment
>> would be the same as in the two fields above point.
>
> I pushed a change in master for this --

Thank you for implementing this.

> can you please check it works as expected for you?

Yes it does: SHIFT-RET on the last row of the tables
| 2 |
| 5 |
and
| 2 |
and
| [2014-04-30 Wed] |
| [2014-05-07 Wed] |
and
| [2014-04-30 Wed] |
increment as expected.

As I see only now the use case
|  1.1 |
| -0.5 |
does not seem easy to increment by -1.6 due to the formatting of the
result, so I don't expect it to be implemented. (number-to-string is
not enough because of the inaccuracy of the fraction.)

> (const :tag "Don't increment the value when copying a field" t)))

Wasn't the t meant to be nil?

Michael



Re: [O] Tag setting mode creates two additional windows

2014-05-20 Thread Dmitry Gorbik
Hello Bastien,

Do you think this can be committed to the trunk?

Thanks,
Dima

> On May 15, 2014, at 4:18 AM, Dmitry Gorbik  wrote:
> 
> This one didn’t work, I modified it like this to make it work:
> 
> 
> 
> 
> Dima
> 
>> On May 15, 2014, at 3:37 AM, Bastien  wrote:
>> 
>> Dmitry Gorbik  writes:
>> 
>>> I have found interesting email threads related to exactly same issue.
>>> But it looks like it was fixed since then, not sure why it reproduces
>>> for me again:
>>> 
>>> http://lists.gnu.org/archive/html/emacs-orgmode/2010-12/msg00443.html
>>> http://article.gmane.org/gmane.emacs.orgmode/34802
>> 
>> Can you try the attached patch against the master's HEAD?
>> 
>> 
>> -- 
>> Bastien
> 



Re: [O] C-c C-e h h (export to html)

2014-05-20 Thread Dave Pawson
On 20 May 2014 16:13, Bastien  wrote:
> Hi Dave,
>
> Dave Pawson  writes:
>
>> Emacs 24.3.1 (Org mode 8.2.6)
>
> Please report the full Org version with M-x org-version RET

Org-mode version 8.2.6 (8.2.6-18-gaaae4a-elpa

>
>> Scenario: Launch emacs. Open file in org-mode.
>> Convert to html once - no problem.
>>
>> Repeat the conversion. Messages buffer shows
>
> I can't reproduce this.  Can you provide a minimal recipe with the
> file to convert and the steps?


Currently rather a large file
  I'll try a smaller one.

 'recipe'?
Sequence was
open emacs.
open the xxx.org file
convert to html once, OK
convert to html a second time, fails with the above message?
Is that what you mean?

regards





-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk



Re: [O] Can I create an agenda sorted manually keeping its order at refresh?

2014-05-20 Thread Bastien
Hi Martin,

"Martin Beck"  writes:

> I'd like to create an agenda view which is sorted manually so that I
> can put the things on the agenda in the order like I want to act on
> them and preserve this order even if the agenda is rebuilt or closed
> and created again.
>  
> Is that possible already?

Nope -- this would require to store information about this manual
sorting *somewhere* when the agenda view is not present, i.e. in the
headlines themselves, or in a place where we would put meta-data about
the agenda views.

The manual sorting is really for temporary convenience.

-- 
 Bastien



Re: [O] org-babel-demarcate-block should preserve case of block declaration

2014-05-20 Thread Alexander Baier
On 2014-05-20 18:01 Bastien wrote:
> Alexander Baier  writes:
>
>> Thanks! Do you know when this change will be released?
>
> Yes and no -- it will be release with Org 8.3, which is not far from a
> near future, but quite close to a semi-distant future.  IOW: we don't
> have a date for 8.3, but you can use git to enjoy the fix :)

As this is something I don't use that often and can be worked around by
C-p M-4 M-u, I will wait for that release.  Org 8.3 is also the version
to be included into Emacs 24.4, isn't it?

Regards,
-- 
Alexander Baier



Re: [O] C-c C-e h h (export to html)

2014-05-20 Thread Bastien
Dave Pawson  writes:

> Fails with
> #+STARTUP:showall
> #+TITLE: No limit Hold 'Em Poker
>
>
> * Introduction
>
> Texas Hold'em is a community card poker game, with game play focused
> as much on the betting as on the cards being played.

I can't reproduce this.

> My concern is that I have installed many packages over 18 years
> of emacs use? Some interaction perhaps?

Yes, probably.  Try with a bare emacs -q and add suspicious config
bit progressively to find the culprit.  Boring, but it works.

-- 
 Bastien



Re: [O] org-mode regression(?): can't C-c C-o can't parse links that contain [/] AND [%]

2014-05-20 Thread Bastien
Hi Nicolas,

Nicolas Bercher  writes:

> But since I upgraded to Debian Wheezy Org-mode 7.8.11, these targets
> are no more reachable using org-links I used for years.
> As a result, only [/] OR [%] seems supported.

This is fixed in our "maint" branch, which you can use by installing
Emacs from the package system or from git.

See http://orgmode.org/manual/Installation.html for details.

Thanks for reporting this,

-- 
 Bastien



Re: [O] org-babel-demarcate-block should preserve case of block declaration

2014-05-20 Thread Bastien
Alexander Baier  writes:

> Thanks! Do you know when this change will be released?

Yes and no -- it will be release with Org 8.3, which is not far from a
near future, but quite close to a semi-distant future.  IOW: we don't
have a date for 8.3, but you can use git to enjoy the fix :)

-- 
 Bastien



Re: [O] C-c C-e h h (export to html)

2014-05-20 Thread Dave Pawson
On 20 May 2014 16:43, Bastien  wrote:
> Dave Pawson  writes:
>
>>   I'll try a smaller one.

Fails with
#+STARTUP:showall
#+TITLE: No limit Hold 'Em Poker


* Introduction

Texas Hold'em is a community card poker game, with game play focused
as much on the betting as on the cards being played.



>
>> Sequence was
>> open emacs.
>> open the xxx.org file
>> convert to html once, OK
>> convert to html a second time, fails with the above message?
>> Is that what you mean?
>
> Yes -- I assume you used `C-c C-e h h' the first and second time
> and you didn't visit the buffer containing the exported result.

Yes, that's right.

> At least that's how I tried to reproduce the bug.  But please try
> to narrow down by exporting a smaller file, this surely comes
> from here.


My concern is that I have installed many packages over 18 years
of emacs use? Some interaction perhaps?

regards




-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk



Re: [O] org-babel-demarcate-block should preserve case of block declaration

2014-05-20 Thread Alexander Baier
On 2014-05-20 17:40 Bastien wrote:
> Hi Alexander,
>
> Alexander Baier  writes:
>
>> Thus preserving the case of BEGIN/END_SRC. Is there any reason this is
>> always in lower case?
>
> No.  From master, C-c C-v C-d now preserves the case, thanks for
> reporting this.

Thanks! Do you know when this change will be released?

Regards,
-- 
Alexander Baier



Re: [O] C-c C-e h h (export to html)

2014-05-20 Thread Bastien
Dave Pawson  writes:

>   I'll try a smaller one.

Yes, please.

>  'recipe'?
> Sequence was
> open emacs.
> open the xxx.org file
> convert to html once, OK
> convert to html a second time, fails with the above message?
> Is that what you mean?

Yes -- I assume you used `C-c C-e h h' the first and second time
and you didn't visit the buffer containing the exported result.
At least that's how I tried to reproduce the bug.  But please try
to narrow down by exporting a smaller file, this surely comes
from here.

Thanks,

-- 
 Bastien



Re: [O] org-babel-demarcate-block should preserve case of block declaration

2014-05-20 Thread Bastien
Hi Alexander,

Alexander Baier  writes:

> Thus preserving the case of BEGIN/END_SRC. Is there any reason this is
> always in lower case?

No.  From master, C-c C-v C-d now preserves the case, thanks for
reporting this.

-- 
 Bastien



Re: [O] agenda window shift

2014-05-20 Thread Bastien
Hi Fred,

Fred Hansen  writes:

> I recently rebuilt my computer, and after reinstalling emacs and
> orgmode the agenda window has a new, undesirable, behavior. After
> making any change, the window moves to place the previously edited
> location at the top of the window. For instance, if I complete a task
> on line 5, the window adjusts so that line 5 is now the first line at
> the top of the window.

This error has been fixed and is not in the latest stable version.

What is your Emacs and Org version?

Thanks,

-- 
 Bastien



Re: [O] Two letter combinations agenda and org-agenda-files variable

2014-05-20 Thread Igor Sosa Mayor
Bastien  writes:

> No, you need to set variables to the custom commands definitions
> themselves.

I see... thanks for your answer!




Re: [O] Insert calc vector directly into spreadsheet cells?

2014-05-20 Thread Bastien
Hi Steven,

Steven Adrian  writes:

> #+TBLFM: @1$1..@1$10=index(10)

Table formulas apply to individual fields, not to a range of fields.

> But the formula above just puts the whole vector in each cell. Can anyone
> tell me how to put the vector values in individual cells?

AFAIU you will need several TBLFM lines for this.

HTH,

-- 
 Bastien



Re: [O] Two letter combinations agenda and org-agenda-files variable

2014-05-20 Thread Bastien
Hi Igor,

Igor Sosa Mayor  writes:

> if I define a org-agenda-custom-command in which I have a (so-called?)
> two-letter combination agenda like this: 
>
> (setq org-agenda-custom-commands
>'(("x" agenda)
>  ("h" . "HOME+Name tags searches") ; description for "h" prefix
>  ("hl" tags "+home+Lisa")
>  ("hp" tags "+home+Peter")
>  ("hk" tags "+home+Kim")))
>
> is it possible to declare org-agenda-files in the head of the
> combination in order to apply them to all the letter combinations (hl,
> hp, hk)?

No, you need to set variables to the custom commands definitions
themselves.

Best,

-- 
 Bastien



Re: [O] C-c C-e h h (export to html)

2014-05-20 Thread Bastien
Hi Dave,

Dave Pawson  writes:

> Emacs 24.3.1 (Org mode 8.2.6)

Please report the full Org version with M-x org-version RET

> Scenario: Launch emacs. Open file in org-mode.
> Convert to html once - no problem.
>
> Repeat the conversion. Messages buffer shows

I can't reproduce this.  Can you provide a minimal recipe with the
file to convert and the steps?

Thanks,

-- 
 Bastien



Re: [O] [PATCH] Improve usage of odt content templates

2014-05-20 Thread Bastien
Hi Nicolas,

Nicolas Goaziou  writes:

> I think this is a more general issue: should we implement an
>
>   #+OPTIONS: title:nil
>
> feature? I think it makes some sense since we already have date:nil and
> author:nil. In any case, keywords are not meant to be used for booleans.
> This should be an OPTIONS item.

+1!

-- 
 Bastien



[O] agenda window shift

2014-05-20 Thread Fred Hansen
I recently rebuilt my computer, and after reinstalling emacs and orgmode the 
agenda window has a new, undesirable, behavior. After making any change, the 
window moves to place the previously edited location at the top of the window. 
For instance, if I complete a task on line 5, the window adjusts so that line 5 
is now the first line at the top of the window. I've tried to illustrate below:
__
L1: TODO task 1
L2: TODO task 2
L3: TODO task 3
L4: TODO task 4
L5: TODO task 5
L6: TODO task 6
__

after completing task 5 the window looks like this:

__
L5: DONE task 5

L6: TODO task 6
__


Any ideas? Thanks.

Re: [O] org-review-schedule

2014-05-20 Thread Alan Schmitt
Hi Bastien,

On 2014-05-15 12:07, Bastien  writes:

> Hi Alan,
>
> Alan Schmitt  writes:
>
>> I need to learn how to do this. In the meantime, I've put the code on
>> github: https://github.com/brabalan/org-review
>
> Since the big secret plan to move contrib/ files to Org ELPA is not
> yet to happen, and since it may take time for you to add org-review
> to GNU ELPA, I simply suggest you add this file to contrib/.

Thank you for the opportunity. I've been getting spoiled by the use of
github (to track issues, and to have documentation at the same place
than the code). I'm wondering if there is a way to have the code both on
github and in the contrib directory. Is there any current package doing
it?

Regarding the documentation, by the way, where should one put it for
contrb packages? On worg?

> It will get exposure when we announce it for the upcoming 8.3 release.

This is an important matter to take into account indeed 😉

Thanks,

Alan



Re: [O] [bug] Commented DEADLINE line still referenced

2014-05-20 Thread Bastien


Hi Sébastien,

Sebastien Vauban 
writes:

> Having such lines in one Org file (where the DEADLINE line is
> commented):
>
> ** TODO Aspirer les filtres de ventilation D350
># DEADLINE: <2014-04-09 Wed .+1m -0d>
>
> Les filtres peuvent être nettoyés avec un aspirateur, pas avec de
> l'eau. En général, nous conseillons de les nettoyer chaque mois.
>
> still makes that task be referenced in my agenda.

Which agenda?

I cannot reproduce this with a simple week agenda view.

-- 
 Bastien




Re: [O] org-table-copy-down incrementor

2014-05-20 Thread Bastien
Hi Michael,

Michael Brand  writes:

> For me it would be already enough and preferred when the increment
> would be the same as in the two fields above point.

I pushed a change in master for this -- can you please check it works
as expected for you?

Thanks for this suggestion!  (A lot easier than other routes likes
using a dedicated #+TBLINC line.)

Best,

-- 
 Bastien



[O] [bug] Commented DEADLINE line still referenced

2014-05-20 Thread Sebastien Vauban
Hello,

Having such lines in one Org file (where the DEADLINE line is
commented):

--8<---cut here---start->8---
** TODO Aspirer les filtres de ventilation D350
   # DEADLINE: <2014-04-09 Wed .+1m -0d>

Les filtres peuvent être nettoyés avec un aspirateur, pas avec de
l'eau. En général, nous conseillons de les nettoyer chaque mois.
--8<---cut here---end--->8---

still makes that task be referenced in my agenda.

Current workaround: to add a space between DEAD and LINE for example.

Best regards,
  Seb

-- 
Sebastien Vauban




[O] org-mode regression(?): can't C-c C-o can't parse links that contain [/] AND [%]

2014-05-20 Thread Nicolas Bercher

Hi,
I use to have first level Org entries like this:

* name [/] [%]

But since I upgraded to Debian Wheezy Org-mode 7.8.11, these targets
are no more reachable using org-links I used for years.
As a result, only [/] OR [%] seems supported.

This simple org file below illustrates the issue.

Is this a regression?
(At least, this is really annoying me.)

Thanks for your feedback.
Nicolas

-8<-

Index:
 - [[*not%20OK][not OK]]
 - [[*OK1][OK1]]
 - [[*OK2][OK2]]

* not OK [1/2] [50%]
** DONE action1
** TODO action2

* OK1 [1/2]
** DONE action1
** TODO action2

* OK2 [50%]
** DONE action1
** TODO action2



Re: [O] Org based websites w/o export

2014-05-20 Thread Bernd Haug
On 19 May 2014 19:58, Ken Mankoff  wrote:
> Jr works by having javascript render the markdown to HTML. That is, you
> write markdown, upload markdown w/o running a generator, and the
> generator runs in the browser of the viewer.
>
> This is efficient for the server (simpler pages) and author (no need to
> run a static site generator), but may be globally inefficient for a
> popular site (many browser doing rendering).

I'd phrase this point more strongly:
The whole concept of intensive client-side rendering
is fashionable, but an eminently bad idea from a
number of perspectives.

I ran my list past Ken and he encouraged me to post them (thanks), so here goes:

1) UX:

Rendering in the browser's rendering engine is always faster than
rendering in JS and then in the browser's rendering engine. Speed
matters.

2) Engineering ("l'art pour l'art"):

Not caching the most eminently cacheable thing on Earth, the rendering
of static web pages, makes baby Dijkstra cry.

3) Economics (egoistical):

Search engines are optimized for interpreting and presenting HTML. If
you want to be found, have your content in HTML.

4) Economics (global):

Electricity ain't free; why spend it many times over even if it's not
you doing the spending?

5) Ecology

There are impacts to wasting power beyond its monetary price.



So, enough with the criticism. How to constructively approach this?

If the size difference between HTML and MD makes a difference for
your bandwidth cost, maybe consider just precompressing your files
offline (this, too, can be done prior to uploading…) and teaching your
web server that for files x.html, deliver x.html.gz as a pre
compressed stream first if available.

Cheers, Bernd



[O] org-babel-demarcate-block should preserve case of block declaration

2014-05-20 Thread Alexander Baier
Hello,

consider the following code block with point at X:

#+BEGIN_SRC emacs-lisp
  (defun test () nil)
X
  (defun another-test () nil)
#+END_SRC

Calling org-babel-demarcate-block (C-c C-v C-d normally) will produce
the following:

#+BEGIN_SRC emacs-lisp
  (defun test () nil)
#+end_src
X
#+begin_src emacs-lisp
  (defun another-test () nil)
#+END_SRC

I, however, would expect to see this:

#+BEGIN_SRC emacs-lisp
  (defun test () nil)
#+END_SRC
X
#+BEGIN_SRC emacs-lisp
  (defun another-test () nil)
#+END_SRC

Thus preserving the case of BEGIN/END_SRC. Is there any reason this is
always in lower case?

Org-mode version 8.2.6 (release_8.2.6 @
/home/delexi/.emacs.d/ext/org-mode/lisp/)

Regards,
-- 
Alexander Baier



Re: [O] still seeing semi-regular lockups

2014-05-20 Thread Eric Abrahamsen
Daimrod  writes:

> Eric Abrahamsen  writes:
>
>> On 05/19/14 23:21 PM, Daimrod wrote:
>>> Daimrod  writes:
>>>
 I have also semi-regular lockup with org-mode. I have opened a bug on
 debbugs and here is what Stefan told me to try to debug this:

> You can try `debug-on-event'.
> 
> There's jit-lock-debug-mode but it doesn't disable inhibit-quit.
> So you'll need to additionally use
> 
>(advice-add 'jit-lock--debug-fontify :around
>  (lambda (fun &rest args)
>(with-local-quit (apply fun args
> 
> Of course sometimes this doesn't work because jit-lock-debug-mode
> changes the way things are executed and the bug may not manifest itself
> any more, but it's worth a try.
> 
> Another source of info is to
> 
>   M-x trace-function RET org-adaptive-fill-function RET
>   M-x trace-function RET org-element-at-point RET
>   M-x trace-function RET org-element--cache-sync RET
>   M-x trace-function RET org-element--cache-process-request RET
> 
> Then reproduce the hang, then break the hang somehow (maybe with the
> jit-lock-debug hack above, or maybe with debug-on-event, or with C-g C-g
> C-g, ...), then look at the *trace..* buffer.

 I'll try to see what I can find this week end and report back.
>>>
>>> Ok, so the good news is the `debug-on-event' trick works. If you got a
>>> lockup, you can get a classic elisp backtrace by sending the SIGUSR2 to
>>> the Emacs process.
>>>
>>> The bad news is that I don't know yet how to reproduce the lockup. It
>>> seems to happen mostly (if not only) when I use org-mode +
>>> visual-line-mode + adaptive-wrap-prefix-mode + an input-method like
>>> latin-postfix.
>>>
>>> And it probably has to do with the cache mechanism. I'll try to
>>> reproduce it with the cache disabled but it hard to test because, as I
>>> said, I don't know how to reproduce it yet.
>>>
>>> I'll keep testing and see if I can reproduce it reliably.
>>>
>>> Stay tuned!
>>
>> Of course I haven't gotten a single lock-up since reporting in last time...
>
> :D
>
> Do you have a similar setup? That is visual-line-mode,
> adaptive-wrap-prefix-mode, input-method?

None of those three, I'm afraid! It was hanging on a variety of editing
operations that, as far as I can tell, had little in common. There's a
possibility that they were list-item-related, but really there wasn't
much commonality.

E




Re: [O] [PATCH] Improve usage of odt content templates

2014-05-20 Thread Detlef Steuer
Am Tue, 20 May 2014 16:37:45 +0800
schrieb Eric Abrahamsen :

> Rasmus  writes:
> 
> > Nicolas Goaziou  writes:
> >
> >> I think this is a more general issue: should we implement an
> >>
> >>   #+OPTIONS: title:nil
> >>
> >> feature? I think it makes some sense since we already have
> >> date:nil and author:nil. In any case, keywords are not meant to be
> >> used for booleans. This should be an OPTIONS item.
> >
> > That's nicer than a blank title ("#+TITLE: ").
> >
> > I prefer the earlier ox-behavior where no title would be printed if
> > title was missing, rather than using the file-name.  The file name
> > is never interesting in my work flow.  If introducing a title
> > option it would be nice if an option is "print title if present" so
> > that this can be set by default.
> 
> +1

+2

Have fought with "set filename as title" before, would like and use 
such an option.

Detlef

> 
> I'm forever deleting the title because I forget to insert an empty
> string #+TITLE option. If there was an `org-export-with-title' option
> I'd set it to nil and be happy 80% of the time.
> 
> E
> 
> 
> 



-- 
Detlef Steuer

---

Dr. Detlef Steuer
Helmut-Schmidt-Universität
Fakultät WiSo
Holstenhofweg 85
22043 Hamburg

Tel:  040/6541-2819
mail: ste...@hsu-hh.de





Re: [O] [PATCH] Improve usage of odt content templates

2014-05-20 Thread Christian Kellermann
Rasmus  writes:
> That's nicer than a blank title ("#+TITLE: ").
>
> I prefer the earlier ox-behavior where no title would be printed if
> title was missing, rather than using the file-name.  The file name is
> never interesting in my work flow.  If introducing a title option it
> would be nice if an option is "print title if present" so that this
> can be set by default.

I can second this, the filename never looks nice when doing an export.

Kind regards,

Christian




Re: [O] Referring to results rather than code block

2014-05-20 Thread Loris Bennett
Hi Nick,

Nick Dokos  writes:

> "Loris Bennett"  writes:
>
>> Hi,
>>
>> I have a code block like this
>>
>> #+NAME: users_per_month
>> #+HEADER: :results append
>> #+BEGIN_SRC sh :dir /root@sadmin:
>> sacct=/cm/shared/apps/slurm/current/bin/sacct
>> for y in {2014..2014}; do
>> for m in {03..04}; do
>> month=$y-$m
>> first=$y-$m-01
>> last=`date -d "$first + 1 month - 1 day" +"%Y-%m-%d"`
>> n=`$sacct -S $first -E $last  -o user -X -n | sort | uniq | wc -l`
>> echo $month $n
>> done
>> done
>> #+END_SRC
>>
>> which produces something like this
>>
>> #+RESULTS: users_per_month
>> | 2012-01 | 1 |
>> | 2012-02 |10 |
>> | 2012-03 |   100 |
>> | 2012-04 |  1000 |
>>
>> I'm using append because the generation of a datapoint takes a while.
>>
>> I'd like to plot the data with something like:
>>
>> #+NAME: plot_users_per_month
>> #+HEADER: var data=users_per_month
>> #+HEADER: :results output graphics
>> #+HEADER: :file ./users_per_month.pdf :exports both
>> #+HEADER: :session *r*
>> #+BEGIN_SRC R
>> library(ggplot2)
>>
>> bar_colour  <- "#69B4D8" # steely blue
>>
>> month <- data$V1
>> users <- data$V2
>> df <- data.frame(month,users)
>> p <- ggplot(df,aes(x=month,y=users)) +
>>   geom_bar(stat="identity",alpha=0.5,fill=bar_colour) +
>>   xlab("date") +
>> ylab("users")
>> p
>> #+END_SRC
>>
>> However, this is just generating a plot of the data generated by the
>> source block and not of the total results table.
>>
>> Can I give the results block a different name to the source block, so
>> that I can refer to it directly, or should I be doing something
>> completely different?
>>
>
> I believe so: the source name ties the source block to the same named
> result block - that allows the source block to find the result block
> and modify it appropriately. The results block can be named and then
> that name can be used in the plotting block, e.g.
>
>
> #+name: foo
> #+BEGIN_SRC sh :results output table append :var n=5
> for x in $(seq $n)
> do
> echo $x $(expr $x \* $x)
> done
> #+END_SRC
>
> #+name: foo_results
> #+RESULTS: foo
> | 1 |  1 |
> | 2 |  4 |
> | 3 |  9 |
> | 4 | 16 |
> | 5 | 25 |
>
>
> #+NAME: plot_foo_results
> #+HEADER: :var data=foo_results
> #+HEADER: :file ./foo.pdf :exports both
> #+BEGIN_SRC gnuplot
> plot data
> #+END_SRC
>
> Nick

Oh, that's rather obvious *blush*.  I suppose I was thinking that the
whole results block is generated and it didn't occur to me to just give
it a name.

Thanks,

Loris  

-- 
This signature is currently under construction.




Re: [O] still seeing semi-regular lockups

2014-05-20 Thread Daimrod
Eric Abrahamsen  writes:

> On 05/19/14 23:21 PM, Daimrod wrote:
>> Daimrod  writes:
>>
>>> I have also semi-regular lockup with org-mode. I have opened a bug on
>>> debbugs and here is what Stefan told me to try to debug this:
>>>
 You can try `debug-on-event'.
 
 There's jit-lock-debug-mode but it doesn't disable inhibit-quit.
 So you'll need to additionally use
 
(advice-add 'jit-lock--debug-fontify :around
  (lambda (fun &rest args)
(with-local-quit (apply fun args
 
 Of course sometimes this doesn't work because jit-lock-debug-mode
 changes the way things are executed and the bug may not manifest itself
 any more, but it's worth a try.
 
 Another source of info is to
 
   M-x trace-function RET org-adaptive-fill-function RET
   M-x trace-function RET org-element-at-point RET
   M-x trace-function RET org-element--cache-sync RET
   M-x trace-function RET org-element--cache-process-request RET
 
 Then reproduce the hang, then break the hang somehow (maybe with the
 jit-lock-debug hack above, or maybe with debug-on-event, or with C-g C-g
 C-g, ...), then look at the *trace..* buffer.
>>>
>>> I'll try to see what I can find this week end and report back.
>>
>> Ok, so the good news is the `debug-on-event' trick works. If you got a
>> lockup, you can get a classic elisp backtrace by sending the SIGUSR2 to
>> the Emacs process.
>>
>> The bad news is that I don't know yet how to reproduce the lockup. It
>> seems to happen mostly (if not only) when I use org-mode +
>> visual-line-mode + adaptive-wrap-prefix-mode + an input-method like
>> latin-postfix.
>>
>> And it probably has to do with the cache mechanism. I'll try to
>> reproduce it with the cache disabled but it hard to test because, as I
>> said, I don't know how to reproduce it yet.
>>
>> I'll keep testing and see if I can reproduce it reliably.
>>
>> Stay tuned!
>
> Of course I haven't gotten a single lock-up since reporting in last time...

:D

Do you have a similar setup? That is visual-line-mode,
adaptive-wrap-prefix-mode, input-method?

-- 
Daimrod/Greg



Re: [O] how to 'add capture item' in agenda view

2014-05-20 Thread Eric Abrahamsen
David Belohrad  writes:

> Dear All,
>
> when I run org-agenda with 'a' (agenda for current week or day), my
> agenda is displayed. Now if I'm on a specific day, I'd like to quickly
> enter a note using org-capture such, that it will automatically enter
> into the captured template a time, which corresponds to the time/date
> i'm currently pointing by cursor in org-agenda.
>
> is there any way how to accomplish this? typical use is e.g., you make a
> schedule for a doctor, who gives you 5 different dates to
> schedule. Currenly I run first org-agenda and look on a specific date
> (if i'm available), then org-capture and I have to rewrite the chosen
> time/date into my capture template again (even if i'm pointing to it in
> org-agenda).
>
> many thanks
> .d.

Sure is: use the "k" key in the agenda view. "k" for "kapture",
naturally. That will start the capture process using the date under
point, if possible.

E




Re: [O] [PATCH] Improve usage of odt content templates

2014-05-20 Thread Eric Abrahamsen
Rasmus  writes:

> Nicolas Goaziou  writes:
>
>> I think this is a more general issue: should we implement an
>>
>>   #+OPTIONS: title:nil
>>
>> feature? I think it makes some sense since we already have date:nil and
>> author:nil. In any case, keywords are not meant to be used for booleans.
>> This should be an OPTIONS item.
>
> That's nicer than a blank title ("#+TITLE: ").
>
> I prefer the earlier ox-behavior where no title would be printed if
> title was missing, rather than using the file-name.  The file name is
> never interesting in my work flow.  If introducing a title option it
> would be nice if an option is "print title if present" so that this
> can be set by default.

+1

I'm forever deleting the title because I forget to insert an empty
string #+TITLE option. If there was an `org-export-with-title' option
I'd set it to nil and be happy 80% of the time.

E




Re: [O] Org based websites w/o export

2014-05-20 Thread Rasmus
Ken Mankoff  writes:

> I've just come across an interesting website generator that I think has
> potential for making Org websites. I have no affiliation with this
> project, but thought it might interest this community. I have an
> interest in an org-based website, but none of the existing ones have met
> my needs yet.
>
> Jr https://github.com/Xeoncross/jr is a static static (yes 2x) site
> generator. Most static site generators work by you writing markdown,
> then you converting to HTML locally, and then you uploading the static
> HTML pages. Existing Org site generators work like this to, I think -
> export to markdown and then convert again with Jekyll. Or of course you
> can convert Org to HTML directly.
>
> Jr works by having javascript render the markdown to HTML. That is, you
> write markdown, upload markdown w/o running a generator, and the
> generator runs in the browser of the viewer.
>
> This is efficient for the server (simpler pages) and author (no need to
> run a static site generator), but may be globally inefficient for a
> popular site (many browser doing rendering).
>
> If Jr or a fork rendered Org to HTML instead of Markdown to HTML, then
> we could have website that are directly written in Org. A starting place
> for this is the existing Javascript support for Org here
> http://orgmode.org/manual/JavaScript-support.html but that still
> requires you to export the Org file to HTML before uploading it to the
> web.
>
> Anyway... maybe of interest to some of y'all. I'll be watching that
> program develop and may be contributing to an Org port of it as I have
> time.

Looks interesting; thanks for sharing.  I'll check it out later.  One
concern, is that for NoScript user, JS is kind of pain compared to
"real" static HTML. . .  I'm guessing these sites completely broken
without JS.

Has anyone tested the Jerkyll Org plugin¹?  It might be v2-specific,
but it would be nice to just be able to commit your Org files. . .

–Rasmus

Footnotes: 
¹   http://jekyllrb.com/docs/plugins/

-- 
May contains speling mistake




Re: [O] still seeing semi-regular lockups

2014-05-20 Thread Eric Abrahamsen

On 05/19/14 23:21 PM, Daimrod wrote:
> Daimrod  writes:
>
>> I have also semi-regular lockup with org-mode. I have opened a bug on
>> debbugs and here is what Stefan told me to try to debug this:
>>
>>> You can try `debug-on-event'.
>>> 
>>> There's jit-lock-debug-mode but it doesn't disable inhibit-quit.
>>> So you'll need to additionally use
>>> 
>>>(advice-add 'jit-lock--debug-fontify :around
>>>  (lambda (fun &rest args)
>>>(with-local-quit (apply fun args
>>> 
>>> Of course sometimes this doesn't work because jit-lock-debug-mode
>>> changes the way things are executed and the bug may not manifest itself
>>> any more, but it's worth a try.
>>> 
>>> Another source of info is to
>>> 
>>>   M-x trace-function RET org-adaptive-fill-function RET
>>>   M-x trace-function RET org-element-at-point RET
>>>   M-x trace-function RET org-element--cache-sync RET
>>>   M-x trace-function RET org-element--cache-process-request RET
>>> 
>>> Then reproduce the hang, then break the hang somehow (maybe with the
>>> jit-lock-debug hack above, or maybe with debug-on-event, or with C-g C-g
>>> C-g, ...), then look at the *trace..* buffer.
>>
>> I'll try to see what I can find this week end and report back.
>
> Ok, so the good news is the `debug-on-event' trick works. If you got a
> lockup, you can get a classic elisp backtrace by sending the SIGUSR2 to
> the Emacs process.
>
> The bad news is that I don't know yet how to reproduce the lockup. It
> seems to happen mostly (if not only) when I use org-mode +
> visual-line-mode + adaptive-wrap-prefix-mode + an input-method like
> latin-postfix.
>
> And it probably has to do with the cache mechanism. I'll try to
> reproduce it with the cache disabled but it hard to test because, as I
> said, I don't know how to reproduce it yet.
>
> I'll keep testing and see if I can reproduce it reliably.
>
> Stay tuned!

Of course I haven't gotten a single lock-up since reporting in last time...



Re: [O] how to 'add capture item' in agenda view

2014-05-20 Thread Bernhard Pröll

There is an org-capture-use-agenda-date variable that seems to do what you're 
looking for.

bernhard

David Belohrad  schrieb am Tue, 20. May 08:09:

Dear All,

when I run org-agenda with 'a' (agenda for current week or day), my
agenda is displayed. Now if I'm on a specific day, I'd like to quickly
enter a note using org-capture such, that it will automatically enter
into the captured template a time, which corresponds to the time/date
i'm currently pointing by cursor in org-agenda.

is there any way how to accomplish this? typical use is e.g., you make a
schedule for a doctor, who gives you 5 different dates to
schedule. Currenly I run first org-agenda and look on a specific date
(if i'm available), then org-capture and I have to rewrite the chosen
time/date into my capture template again (even if i'm pointing to it in
org-agenda).

many thanks
.d.