Re: [O] avoiding "First item of list cannot move without its subtree"

2017-02-20 Thread Nicolas Goaziou
Hello,

"Max Rydahl Andersen"  writes:

> Might be - but seems it fits very naturally to be able to at least
> allow to move list items outside its parent.
>
> Don't get me wrong - I  like it defaults to stopping, but would prefer
> it would ask or let me do shift + left + left to override or something
> similar.

IMO, the current behaviour is the right one.

However, you can advice, e.g., `org-shiftmetaleft' so it catches the
error and calls `org-ctrl-c-star' instead.

Regards,

-- 
Nicolas Goaziou0x80A93738



Re: [O] org-export-babel-evaluate=nil ignores ":exports results" setting - this has changed

2017-02-20 Thread Derek Feichtinger

Hi Chuck

On 21.02.2017 00:54, Charles C. Berry wrote:

On Mon, 20 Feb 2017, Derek Feichtinger wrote:

When org-export-babel-evaluate is set to nil, I see a different 
behavior now as compared to earlier versions of org.


Indeed.

It is now *obsolete* and its behavior has intentionally been changed 
as noted here:


In my current version from MELPA the info text is not yet reflecting 
this change. Thanks for pointing me to it.




,[ C-h v org-export-babel-evaluate RET ]
| org-export-babel-evaluate is a variable defined in ‘org-compat.el’.
| Its value is t
|
|   This variable is an alias for ‘org-export-use-babel’.
|   This variable is obsolete since Org 9.1;
|   use ‘org-export-use-babel’ instead.

and here

 (info "(org) Exporting code blocks")


I think that this should be considered a bug.


Allowing header args to be processed (as before) also allows for 
arbitrary code to be executed.  The point of setting 
‘org-export-use-babel’ or `org-export-babel-evaluate' to nil was to 
prevent this.  For that reason the former behavior was a bug.


OK. I can see that one wants to prevent most header args of babel blocks 
from being reeavaluated, but the :exports argument does not affect 
evaluation, but simply the representation of the result exported to the 
target document. So, I think that this argument still should be 
observed. Otherwise the resulting document would be completely changed 
once I introduce ‘org-export-use-babel’. I might want to introduce it to 
conserve the current code block results, while still being very much 
interested in exporting it to a different format, or re-exporting it at 
a later point (after having added new chapters that are manually evaluated).


So, I still feel that this is a very much needed functionality that has 
been lost on the way. I have made many documents over the last few years 
that relied on this functionality, e.g. files collecting logs or 
producing analysis results that were dependent on a particular state of 
a system at that moment of time. I hope that the observing of the 
:exports argument can be reintroduced.


Derek

--
Paul Scherrer Institut
Dr. Derek Feichtinger   Phone:   +41 56 310 47 33
Section Head Science-IT Email: derek.feichtin...@psi.ch
Building/Room No. WHGA/U126
CH-5232 Villigen PSI




[O] Python loops with ":results output"

2017-02-20 Thread Seb
Hello,

Is it not possible to avoid having the continuation triple dots in the
first output line when capturing output from a Python loop?

------
Export artifact:

#+BEGIN_SRC python :session :results output :exports results
for i in range(3):
print("Iter {0}".format(i))

#+END_SRC

#+RESULTS:
: 
: ... Iter 0
: Iter 1
: Iter 2
------

Thanks for any advice,

-- 
Seb




Re: [O] ob-clojure.el does not evaluate org-mode clojure src block

2017-02-20 Thread numbch...@gmail.com
Seems have someone meet same problem with me:
https://emacs.stackexchange.com/questions/30857/clojure-code-evaluation-in-org-mode-produces-no-output

[stardiviner] GPG key ID: 47C32433
IRC(freeenode): stardiviner Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/

On Mon, Feb 20, 2017 at 8:41 PM, numbch...@gmail.com 
wrote:

> ```
>   #+BEGIN_SRC clojure :session
>   (def kk "stardiviner")
>   #+END_SRC
> ```
>
> Press =[C-c C-c]= to evaluate this. Then check out =kk= in CIDER REPL
> buffer.
>
> That's why my problem happens:
>
> https://emacs.stackexchange.com/questions/30849/how-to-
> generate-inline-plot-result-for-ob-clojure
>
> Also I did some simple edebug on ob-clojure.el:
>
> =ob-clojure.el::org-babel-execute:clojure=
>
> ```
>   #+BEGIN_SRC emacs-lisp
>   (nrepl-dict-get
>(nrepl-sync-request:eval "(print \"hello, world!\")"
> (cider-current-connection) (cider-current-session))
>;; key: "output", "status"
>"output")
>   #+END_SRC
> ```
>
> ```
>#+RESULTS:
>#+BEGIN_EXAMPLE
>(dict "status"
>  ("namespace-not-found" "done" "error" "done" "state" "state")
>  "id" "8" "session" "7dcda490-01d9-4411-a05b-804a4f8663b6"
> "changed-namespaces"
>  (dict)
>  "repl-type" "cljclj")
>#+END_EXAMPLE
> ```
>
> You can see the request evaluate result is error.
>
>
> [stardiviner] GPG key ID: 47C32433
> IRC(freeenode): stardiviner Twitter:  @numbchild
> Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
> Blog: http://stardiviner.github.io/
>


Re: [O] org-export-babel-evaluate=nil ignores ":exports results" setting - this has changed

2017-02-20 Thread Charles C. Berry

On Mon, 20 Feb 2017, Derek Feichtinger wrote:

When org-export-babel-evaluate is set to nil, I see a different behavior now 
as compared to earlier versions of org.


Indeed.

It is now *obsolete* and its behavior has intentionally been changed as 
noted here:


,[ C-h v org-export-babel-evaluate RET ]
| org-export-babel-evaluate is a variable defined in ‘org-compat.el’.
| Its value is t
|
|   This variable is an alias for ‘org-export-use-babel’.
|   This variable is obsolete since Org 9.1;
|   use ‘org-export-use-babel’ instead.
|
| Documentation:
| Switch controlling code evaluation and header processing during export.
| When set to nil no code will be evaluated as part of the export
| process and no header arguments will be obeyed.  When set to
| ‘inline-only’, only inline code blocks will be executed.  Users
| who wish to avoid evaluating code on export should use the header
| argument ‘:eval never-export’.
|
| You can customize this variable.
|
| [back]
`

and here

 (info "(org) Exporting code blocks")


I think that this should be considered a bug.


Allowing header args to be processed (as before) also allows for arbitrary 
code to be executed.  The point of setting ‘org-export-use-babel’ or 
`org-export-babel-evaluate' to nil was to prevent this.  For that reason 
the former behavior was a bug.



Chuck

Re: [O] Saving org-capture buffer while writing it

2017-02-20 Thread Stig Brautaset

Narendra Joshi  writes:
>> Dunno about backups, but I experience this problem too. (Another
>> annoyance I have is accidentally hitting `C-c C-c' to tick a check box
>> and having my in-progress work being moved.) It can help to use the
>> `:immediate-finish' and `:jump-to-captured' settings like so:
>>
>> #+BEGIN_SRC emacs-lisp
>>   ("n" "Note" entry (file "Notes.org")
>>(file "tpl-note.org")
>>:empty-lines 1
>>:immediate-finish t
>>:jump-to-captured t)
>> #+END_SRC
>
> Do you write your email with Org-mode?

I do! (Sometimes.) I have bound `C-c x' in message-mode to swap to
`org-mode', and `C-c x' in org mode to swap to message-mode. Mostly I do
it for the outlining, but using babel to properly indent source code
snippets is very nice too.

> I have seen a lot of people writing the source code blocks and
> surprising they are syntax highlighted in Gnus. This makes me wonder
> if `org-mode' has support for writing emails too.

It does! Obviously Org markup is already perfectly readable as plain
text emails. And if you want to send HTML emails, check out
`org-mime-htmlize' which is part of `org-mime' from org-plus-contrib
(see: http://orgmode.org/elpa.html)

Stig

--
; GNU Emacs 25.1.1, Org mode version 9.0.5



Re: [O] Saving org-capture buffer while writing it

2017-02-20 Thread Myles English

on [2017-02-20] at 22:02 Narendra Joshi writes:

> Myles English  writes:
>
>> Hello,
>>
>> on [2017-02-20] at 14:05 Narendra Joshi writes:
>>
>>> Hi,
>>>
>>> Sometimes when I am taking notes, I end up spending a lot of time in a
>>> capture buffer. If I happen to switch to something else, I end up
>>> loosing the capture buffer. I probably just kill the buffer
>>> accidentally, or do `C-c C-k'.
>>>
>>> Is there a way I can take backups of the buffer to a file?
>
>> I usually just save it (C-c s) and it is saved to where it would be
>> saved anyway when I eventually do C-c C-c.
> I just noticed that saving with `C-x C-s` does save the buffer. Why do
> you have a personal binding for saving the buffer? Is it doing something
> else?

I meant C-x C-s.





[O] org-export-babel-evaluate=nil ignores ":exports results" setting - this has changed

2017-02-20 Thread Derek Feichtinger
When org-export-babel-evaluate is set to nil, I see a different behavior 
now as compared to earlier versions of org.


Now it seems that all header arguments of a code block are ignored, 
including the arguments to the :exports setting. Even when I have set 
":exports results" or ":exports code" I always get code and results 
exported in the resulting document. If org-export-babel-evaluate is set 
to t then everything behaves the way I was used to, ":exports results" 
just exports the results and when set to "code" just the code is exported.


I think that this should be considered a bug. I frequently (even most of 
the time) want to evaluate the org blocks manually, not upon export, but 
I want to be able to define whether only the results should be visible 
in the exported document. For generated pictures this is usually the 
normal case.


I am using org 9.0.5 from MELPA now, and I can't completely say when 
this changed, but I am very sure that a few weeks ago the behavior was 
different, since I am using org a lot for preparing documents.


Simple test document:

#
* Test

  #+BEGIN_SRC elisp :results output :exports code
(princ (format "This should only export the code\nemacs %s\norg %s" 
emacs-version org-version))

  #+END_SRC

  #+RESULTS:
  : This should only export the code
  : emacs 25.1.1
  : org 9.0.5

  #+BEGIN_SRC elisp :results output :exports results
(princ (format "This should only export the results\nemacs %s\norg 
%s" emacs-version org-version))

  #+END_SRC

  #+RESULTS:
  : This should only export the results
  : emacs 25.1.1
  : org 9.0.5


* COMMENT Org babel settings
Local Variables:
org-export-babel-evaluate: nil
End:


ASCII exported document when org-export-babel-evaluate: nil


1 Test
==

  ,
  | (princ (format "This should only export the code\nemacs %s\norg %s" 
emacs-version org-version))

  `

  ,
  | This should only export the code
  | emacs 25.1.1
  | org 9.0.5
  `

  ,
  | (princ (format "This should only export the results\nemacs %s\norg 
%s" emacs-version org-version))

  `

  ,
  | This should only export the results
  | emacs 25.1.1
  | org 9.0.5
  `


ASCII exported document when org-export-babel-evaluate: t

1 Test
==

  ,
  | (princ (format "This should only export the code\nemacs %s\norg %s" 
emacs-version org-version))

  `

  ,
  | This should only export the results
  | emacs 25.1.1
  | org 9.0.5
  `


Best regards,
Derek


--
Paul Scherrer Institut
Dr. Derek Feichtinger   Phone:   +41 56 310 47 33
Section Head Science-IT Email: derek.feichtin...@psi.ch
Building/Room No. WHGA/U126
CH-5232 Villigen PSI




Re: [O] Saving org-capture buffer while writing it

2017-02-20 Thread Narendra Joshi
Myles English  writes:

> Hello,
>
> on [2017-02-20] at 14:05 Narendra Joshi writes:
>
>> Hi,
>>
>> Sometimes when I am taking notes, I end up spending a lot of time in a
>> capture buffer. If I happen to switch to something else, I end up
>> loosing the capture buffer. I probably just kill the buffer
>> accidentally, or do `C-c C-k'.
>>
>> Is there a way I can take backups of the buffer to a file?

> I usually just save it (C-c s) and it is saved to where it would be
> saved anyway when I eventually do C-c C-c.
I just noticed that saving with `C-x C-s` does save the buffer. Why do
you have a personal binding for saving the buffer? Is it doing something
else?

-- 
Narendra Joshi



Re: [O] avoiding "First item of list cannot move without its subtree"

2017-02-20 Thread Max Rydahl Andersen



* Some important topic
  - idea 1, some notes
  - idea 2, another note
  - idea 3, a third note


Maybe change your approach and use headlines throughout:

* Some important topic
** idea 1
some notes
** idea 2
another note
** idea 3
a third note

?

You can still move these about and pro/de-mote them as required but 
you

can now add task management keywords easily.


I did it this way until I learned about basic lists.

I prefer basic lists because they visually default to be much less 
prominent highlighted.


Thus I prefer the lighter approach by default and only make thins into 
headings when needed.


/max
http://about.me/maxandersen



Re: [O] avoiding "First item of list cannot move without its subtree"

2017-02-20 Thread Max Rydahl Andersen

And then I go over these and I use the shift/alt+keys to reorder the
ideas up and down and eventually I would like to do this:

```
* Some important topic
  - idea 1, some notes
  ** TODO idea 2, another note
  - idea 3, a third note
```


What is that? Is "** TODO idea 2, another note" a headline, in which
case it should be at column 0?


Yes sorry, bad indent.


Headlines are different from plain lists. You can use C-c * on second
item to turn it into a headline.


Yes, I know about that one - but I would prefer not having to change to
another set of keys :)

I can do shift arrow left/rigt/up/down for the list item *until* I hit 
the top heading.



You can also move to the beginning of line (C-a), kill word (M-d) and
insert the two stars. It is a longer but maybe more natural, since 
those

are standard text editing keys.


this is what I do know - just more tedious if shift + arrows could ask 
instead of blocking.



I know I can press a short cut to make it a top item, but why can't
I just use the normal standard tree editing keys ?


I'm not sure to understand what "standard tree editing keys" you're
talking about.


shift arrows up/down/left/righit.


AFAIU, you want to turn a structure (a list) into another one (a
headline). There's a command for that, but I don't consider the action
to be a standard editing one.


Yes, but it would be so convenient it would not just block edit and 
require

shifting to completely different keys IMO.


Is there a way to have org-mode ask what kind of thing it should do
when I move the lists "out-of-bounds" instead
of just error out on me ?


IMO, you may be mis-using the tool.


Might be - but seems it fits very naturally to be able to at least allow 
to move list items outside its parent.


Don't get me wrong - I  like it defaults to stopping, but would prefer 
it would ask or let me do shift + left + left to override or something 
similar.



/max
http://about.me/maxandersen


Re: [O] Saving org-capture buffer while writing it

2017-02-20 Thread Myles English
Hello,

on [2017-02-20] at 14:05 Narendra Joshi writes:

> Hi,
>
> Sometimes when I am taking notes, I end up spending a lot of time in a
> capture buffer. If I happen to switch to something else, I end up
> loosing the capture buffer. I probably just kill the buffer
> accidentally, or do `C-c C-k'.
>
> Is there a way I can take backups of the buffer to a file?

I usually just save it (C-c s) and it is saved to where it would be
saved anyway when I eventually do C-c C-c.

Myles



Re: [O] ob-async

2017-02-20 Thread Alex Bennée

Ken Mankoff  writes:

> An RSS feed I follow mentioned ob-async here:
> https://github.com/astahlman/ob-async
>
> I haven't seen it mentioned on the list yet. Perhaps others would be
> interested in asynchronous Babel processing. I've seen the feature
> requested often on this list.

This is not the first attempt to my knowledge. I know of:

  - my hacky attempt https://github.com/stsquad/async-org-babel
  - John Kitchen's python specific version 
http://kitchingroup.cheme.cmu.edu/blog/2015/11/20/Asynchronously-running-python-blocks-in-org-mode/
  - this matlab version 
http://emacs.stackexchange.com/questions/21301/async-execution-in-org-babel

So I think there have been enough proof of concepts of using async.el
and inserting results at a later date. I think what would be really
useful is some feedback from the org-mode maintainers about the various
approaches and if something generic could be included with org-mode
itself.

Any thoughts?

--
Alex Bennée



Re: [O] Saving org-capture buffer while writing it

2017-02-20 Thread Narendra Joshi
Stig Brautaset  writes:

> Narendra Joshi  writes:
>
>> Hi,
>>
>> Sometimes when I am taking notes, I end up spending a lot of time in a
>> capture buffer. If I happen to switch to something else, I end up
>> loosing the capture buffer. I probably just kill the buffer
>> accidentally, or do `C-c C-k'.
>>
>> Is there a way I can take backups of the buffer to a file?
>
> Dunno about backups, but I experience this problem too. (Another
> annoyance I have is accidentally hitting `C-c C-c' to tick a check box
> and having my in-progress work being moved.) It can help to use the
> `:immediate-finish' and `:jump-to-captured' settings like so:
>
> #+BEGIN_SRC emacs-lisp
>   ("n" "Note" entry (file "Notes.org")
>(file "tpl-note.org")
>:empty-lines 1
>:immediate-finish t
>:jump-to-captured t)
> #+END_SRC
>
> Stig
>
> --
> ; GNU Emacs 25.1.1, Org mode version 9.0.5

Do you write your email with Org-mode? I have seen a lot of people
writing the source code blocks and surprising they are syntax
highlighted in Gnus. This makes me wonder if `org-mode' has support for
writing emails too.

Thanks for the info about new keywords. :)

-- 
Narendra Joshi



Re: [O] [PATCH] Add org-babel support for hledger

2017-02-20 Thread Nicolas Goaziou
Hello,

Simon Michael  writes:

> I'd like org-babel to support hledger for generating financial
> reports, similar to the existing support for Ledger.

Thank you. I'll happily merge it with the code base after some details
are sorted out.

> I don't know the exact process to follow (instructions in the git
> repo, on the website and in irc are different) and have not yet signed
> FSF copyright assignment - any help appreciated.

The first step is to sign the FSF copyright assignment since the patch
is non-trivial. Then we can apply the patch.

An entry in ORG-NEWS file would be great. It can be sent separately from
the patch, or with it, as you see fit. Unit tests are more than welcome,
too.

> Below is the output of git format-patch.

Some comments follow.

> +;;; ob-hledger.el --- org-babel functions for hledger

It is a common mistake across code base, but it should be: Org Babel ...
or simply Babel ...

Also, you should activate lexical binding:

  ob-ledger.el --- Babel Functions for hledger  -*- lexical-binding: t; -*- 
 

> +;; Org-Babel support for evaluating hledger entries.

See above.

> +(defun org-babel-execute:hledger (body params)
> +  "Execute a block of hledger entries with org-babel.  This function is
> +called by `org-babel-execute-src-block'."

The first line of a docstring needs to be a sentence on its own. So,

  Execute a block of hledger entries with Babel.  
   This function is   called by `org-babel-execute-src-block'."

> +  (message "executing hledger source code block")
> +  (let ((result-params (split-string (or (cdr (assoc :results params)) "")))

assoc -> assq

> + (cmdline (cdr (assoc :cmdline params)))

Ditto.

> +(in-file (org-babel-temp-file "hledger-"))
> + (out-file (org-babel-temp-file "hledger-output-")))
> +(with-temp-file in-file (insert body))
> +(message "%s" (concat "hledger"
> +  (if (> (length body) 0)
> +  (concat " -f " (org-babel-process-file-name 
> in-file))
> +"")
> +  " " cmdline))
> +(with-output-to-string
> +  (shell-command (concat "hledger"
> + (if (> (length body) 0)
> + (concat " -f " (org-babel-process-file-name 
> in-file))
> +   "")
> + " " cmdline
> + " > " (org-babel-process-file-name out-file

This is calling for some refactoring:

  (concat "hledger" (if ...) " " cmdline)

could be built only once and bound to a symbol.


Regards,

-- 
Nicolas Goaziou



Re: [O] Saving org-capture buffer while writing it

2017-02-20 Thread Eric S Fraga
On Monday, 20 Feb 2017 at 14:05, Narendra Joshi wrote:
> Hi,
>
> Sometimes when I am taking notes, I end up spending a lot of time in a
> capture buffer. If I happen to switch to something else, I end up
> loosing the capture buffer. I probably just kill the buffer
> accidentally, or do `C-c C-k'.
>
> Is there a way I can take backups of the buffer to a file?

I believe that the capture window is simply a view into the file where
the note will be placed so it should actually be there already unless
you cancel.  It is not a separate buffer.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.4-242-g2c27b8


signature.asc
Description: PGP signature


Re: [O] avoiding "First item of list cannot move without its subtree"

2017-02-20 Thread Eric S Fraga
On Monday, 20 Feb 2017 at 12:58, Max Rydahl Andersen wrote:
> Hi,
>
> First time poster and recently started using org-mode and so far enjoying it 
> :)
>
> One nag I do have though is how moving of basic lists are handled.
> I constantly bump into "First item of list cannot move without its subtree"
>
> Is there a way to avoid this error and instead be given the option to
> say "Please just move it up to the next level" ?
>
> What I often have is that I during a meeting or brain dump do this:
>
> * Some important topic
>   - idea 1, some notes
>   - idea 2, another note
>   - idea 3, a third note

Maybe change your approach and use headlines throughout:

* Some important topic
** idea 1
some notes
** idea 2
another note
** idea 3
a third note

?

You can still move these about and pro/de-mote them as required but you
can now add task management keywords easily.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.4-242-g2c27b8


signature.asc
Description: PGP signature


Re: [O] avoiding "First item of list cannot move without its subtree"

2017-02-20 Thread Nicolas Goaziou
Hello,

"Max Rydahl Andersen"  writes:

> What I often have is that I during a meeting or brain dump do this:
>
> ```
> * Some important topic
>   - idea 1, some notes
>   - idea 2, another note
>   - idea 3, a third note
> ```

OK.

> And then I go over these and I use the shift/alt+keys to reorder the
> ideas up and down and eventually I would like to do this:
>
> ```
> * Some important topic
>   - idea 1, some notes
>   ** TODO idea 2, another note
>   - idea 3, a third note
> ```

What is that? Is "** TODO idea 2, another note" a headline, in which
case it should be at column 0?

Headlines are different from plain lists. You can use C-c * on second
item to turn it into a headline.

You can also move to the beginning of line (C-a), kill word (M-d) and
insert the two stars. It is a longer but maybe more natural, since those
are standard text editing keys.

> I know I can press a short cut to make it a top item, but why can't
> I just use the normal standard tree editing keys ?

I'm not sure to understand what "standard tree editing keys" you're
talking about.

AFAIU, you want to turn a structure (a list) into another one (a
headline). There's a command for that, but I don't consider the action
to be a standard editing one.

> Is there a way to have org-mode ask what kind of thing it should do
> when I move the lists "out-of-bounds" instead
> of just error out on me ?

IMO, you may be mis-using the tool.

Regards,

-- 
Nicolas Goaziou



Re: [O] Saving org-capture buffer while writing it

2017-02-20 Thread Stig Brautaset

Narendra Joshi  writes:

> Hi,
>
> Sometimes when I am taking notes, I end up spending a lot of time in a
> capture buffer. If I happen to switch to something else, I end up
> loosing the capture buffer. I probably just kill the buffer
> accidentally, or do `C-c C-k'.
>
> Is there a way I can take backups of the buffer to a file?

Dunno about backups, but I experience this problem too. (Another
annoyance I have is accidentally hitting `C-c C-c' to tick a check box
and having my in-progress work being moved.) It can help to use the
`:immediate-finish' and `:jump-to-captured' settings like so:

#+BEGIN_SRC emacs-lisp
  ("n" "Note" entry (file "Notes.org")
   (file "tpl-note.org")
   :empty-lines 1
   :immediate-finish t
   :jump-to-captured t)
#+END_SRC

Stig

--
; GNU Emacs 25.1.1, Org mode version 9.0.5



[O] Saving org-capture buffer while writing it

2017-02-20 Thread Narendra Joshi

Hi,

Sometimes when I am taking notes, I end up spending a lot of time in a
capture buffer. If I happen to switch to something else, I end up
loosing the capture buffer. I probably just kill the buffer
accidentally, or do `C-c C-k'.

Is there a way I can take backups of the buffer to a file?

Thanks,
Narendra Joshi



[O] avoiding "First item of list cannot move without its subtree"

2017-02-20 Thread Max Rydahl Andersen

Hi,

First time poster and recently started using org-mode and so far 
enjoying it :)


One nag I do have though is how moving of basic lists are handled.
I constantly bump into "First item of list cannot move without its 
subtree"


Is there a way to avoid this error and instead be given the option to 
say "Please just move it up to the next level" ?


What I often have is that I during a meeting or brain dump do this:

```
* Some important topic
  - idea 1, some notes
  - idea 2, another note
  - idea 3, a third note
```

And then I go over these and I use the shift/alt+keys to reorder the 
ideas up and down and eventually I would like to do this:


```
* Some important topic
  - idea 1, some notes
  ** TODO idea 2, another note
  - idea 3, a third note
```

I know I can press a short cut to make it a top item, but why can't I 
just use the normal standard tree editing keys ?


Is there a way to have org-mode ask what kind of thing it should do when 
I move the lists "out-of-bounds" instead

of just error out on me ?

Thank you,
/max
http://about.me/maxandersen


[O] ob-clojure.el does not evaluate org-mode clojure src block

2017-02-20 Thread numbch...@gmail.com
```
  #+BEGIN_SRC clojure :session
  (def kk "stardiviner")
  #+END_SRC
```

Press =[C-c C-c]= to evaluate this. Then check out =kk= in CIDER REPL
buffer.

That's why my problem happens:

https://emacs.stackexchange.com/questions/30849/how-to-generate-inline-plot-result-for-ob-clojure

Also I did some simple edebug on ob-clojure.el:

=ob-clojure.el::org-babel-execute:clojure=

```
  #+BEGIN_SRC emacs-lisp
  (nrepl-dict-get
   (nrepl-sync-request:eval "(print \"hello, world!\")"
(cider-current-connection) (cider-current-session))
   ;; key: "output", "status"
   "output")
  #+END_SRC
```

```
   #+RESULTS:
   #+BEGIN_EXAMPLE
   (dict "status"
 ("namespace-not-found" "done" "error" "done" "state" "state")
 "id" "8" "session" "7dcda490-01d9-4411-a05b-804a4f8663b6"
"changed-namespaces"
 (dict)
 "repl-type" "cljclj")
   #+END_EXAMPLE
```

You can see the request evaluate result is error.


[stardiviner] GPG key ID: 47C32433
IRC(freeenode): stardiviner Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/


Re: [O] Possible Bug in Capture.

2017-02-20 Thread Nicolas Goaziou
Hello,

li...@wilkesley.net writes:

> I have just switched from maint to master and now get the following 
> error capturing to a date tree:
>
> #+begin_src emacs-lisp
> Debugger entered--Lisp error: (error "Invalid capture target 
> specification: (file+datetree 
> \"~/Documents/emacs/org/org_files/tasks/notes.org\" \"Notes.\")")
>signal(error ("Invalid capture target specification: (file+datetree 
> \"~/Documents/emacs/org/org_files/tasks/notes.org\" \"Notes.\")"))
>error("Invalid capture target specification: %S" (file+datetree 
> "~/Documents/emacs/org/org_files/tasks/notes.org" "Notes."))
>org-capture-set-target-location()
>org-capture(nil)
>call-interactively(org-capture nil nil)
>command-execute(org-capture)
>
> #+end_src
>
> This is my capture template:
>
> ("n" "Notes" entry (file+datetree
>   "~/Documents/emacs/org/org_files/tasks/notes.org" "Notes.") "* %U %? 
> :note:refile:" :prepend t)

Your template is invalid. Per `org-capture-templates', it should be

  (file+datetree "path/to/file")

IOW, there should be no "Notes."


Regards,

-- 
Nicolas Goaziou



[O] Possible Bug in Capture.

2017-02-20 Thread lists
I have just switched from maint to master and now get the following 
error capturing to a date tree:


#+begin_src emacs-lisp
Debugger entered--Lisp error: (error "Invalid capture target 
specification: (file+datetree 
\"~/Documents/emacs/org/org_files/tasks/notes.org\" \"Notes.\")")
  signal(error ("Invalid capture target specification: (file+datetree 
\"~/Documents/emacs/org/org_files/tasks/notes.org\" \"Notes.\")"))
  error("Invalid capture target specification: %S" (file+datetree 
"~/Documents/emacs/org/org_files/tasks/notes.org" "Notes."))

  org-capture-set-target-location()
  org-capture(nil)
  call-interactively(org-capture nil nil)
  command-execute(org-capture)

#+end_src

This is my capture template:

("n" "Notes" entry (file+datetree
 "~/Documents/emacs/org/org_files/tasks/notes.org" "Notes.") "* %U %? 
:note:refile:" :prepend t)


This appears to have been introduced in:

commit 958eacdf2294b4edd6aa797d57d4c36ada682089
Author: Nicolas Goaziou 
Date:   Sun Nov 6 09:29:09 2016 +0100

org-capture: Small refactoring

* lisp/org-capture.el (org-capture-set-target-location): Refactor 
using

  pattern-matching for clarity.

Ian.