[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)'
From: |
Nick Dokos |
Subject: |
Re: [O] Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)' |
Date: |
Sun, 03 Feb 2013 14:43:03 -0500 |
Thorsten Jolitz <address@hidden> wrote:
>
> Hi List,
>
> just wondering (and curious) if this is a bug or (in some way) expected
> behaviour:
>
> Say point is at the beginning of the first line of an Org-mode source
> block:
>
> ,------------------------------------------------
> | #+begin_src plantuml :file er-class-diagram.png
> | scale 600 width ... # point at beg-of-line
> `------------------------------------------------
>
> Now, when I call interactive command org-babel-mark-block' either with
> 'M-x org-babel-mark-block' or 'C-c C-v C-M-h', the body of the source
> block is (visibly) marked as expected (transient-mark-mode is on).
>
> But with the point at the same position, evaluating with 'M-:'
>
> ,--------------------------------------
> | Eval: (org-babel-mark-block)
> `--------------------------------------
>
> returns the position of point without (visibly) marking the source-block
> body.
>
The function is called differently in the two cases:
* backtrace with ESC ESC : (org-babel-mark-block)
org-babel-mark-block()
eval((org-babel-mark-block) nil)
eval-expression((org-babel-mark-block) nil)
call-interactively(eval-expression nil nil)
* backtrace with M-x org-babel-mark-block
org-babel-mark-block()
call-interactively(org-babel-mark-block record nil)
command-execute(org-babel-mark-block record)
execute-extended-command(nil "org-babel-mark-block")
call-interactively(execute-extended-command nil nil)
I don't know if that accounts for the difference - my guess is that
it probably does, but I don't know how.
Nick