* Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)'
@ 2013-02-03 19:10 Thorsten Jolitz
2013-02-03 19:43 ` Nick Dokos
0 siblings, 1 reply; 6+ messages in thread
From: Thorsten Jolitz @ 2013-02-03 19:10 UTC (permalink / raw)
To: emacs-orgmode
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.
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)'
2013-02-03 19:10 Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)' Thorsten Jolitz
@ 2013-02-03 19:43 ` Nick Dokos
2013-02-03 20:01 ` Thorsten Jolitz
0 siblings, 1 reply; 6+ messages in thread
From: Nick Dokos @ 2013-02-03 19:43 UTC (permalink / raw)
To: Thorsten Jolitz; +Cc: emacs-orgmode
Thorsten Jolitz <tjolitz@googlemail.com> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)'
2013-02-03 19:43 ` Nick Dokos
@ 2013-02-03 20:01 ` Thorsten Jolitz
2013-02-11 14:43 ` Bastien
0 siblings, 1 reply; 6+ messages in thread
From: Thorsten Jolitz @ 2013-02-03 20:01 UTC (permalink / raw)
To: emacs-orgmode
Nick Dokos <nicholas.dokos@hp.com> writes:
> 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.
Interesting, I have to check what happens when I use this function in a
program. Kind of strange, though, is that a bug in
'org-babel-mark-block' - or in Emacs itself?
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)'
2013-02-03 20:01 ` Thorsten Jolitz
@ 2013-02-11 14:43 ` Bastien
2013-02-12 16:55 ` Thorsten Jolitz
0 siblings, 1 reply; 6+ messages in thread
From: Bastien @ 2013-02-11 14:43 UTC (permalink / raw)
To: Thorsten Jolitz; +Cc: emacs-orgmode
Hi Thorsten,
Thorsten Jolitz <tjolitz@googlemail.com> writes:
> Interesting, I have to check what happens when I use this function in a
> program. Kind of strange, though, is that a bug in
> 'org-babel-mark-block' - or in Emacs itself?
I think it may have been a temporary bug in Emacs.
Can you reproduce it with a recent Emacs?
Also, M-h is bound to `org-mark-element', which will mark a block
(the whole block, not just its content). You might find it useful
too!
Best,
--
Bastien
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)'
2013-02-11 14:43 ` Bastien
@ 2013-02-12 16:55 ` Thorsten Jolitz
2013-02-12 21:32 ` Bastien
0 siblings, 1 reply; 6+ messages in thread
From: Thorsten Jolitz @ 2013-02-12 16:55 UTC (permalink / raw)
To: emacs-orgmode
Bastien <bzg@altern.org> writes:
Hi Bastien,
> Can you reproduce it with a recent Emacs?
My Emacs is fairly recent:
,--------------------------------------------------------------------------------
| GNU Emacs 24.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.6.4)
| of 2013-01-20 on eric
|
| Org-mode version 7.9.3e (7.9.3e-921-g4d5c79 @ /home/tj/gitclone/org-mode/lisp/)
`--------------------------------------------------------------------------------
> Also, M-h is bound to `org-mark-element', which will mark a block
> (the whole block, not just its content). You might find it useful
> too!
Thats very useful, indeed.
But the same thing happens when calling 'org-babel-mark-block' or
'org-mark-element' with 'M-: (cmd)': cursor jumps to beginning of the
block/element, nothing is highlighted (transient mark mode), and doing
'M-w' does not put anything into the kill-ring. With 'M-x cmd',
highlighting and copying works.
Thats not really a problem for me - just a bit strange.
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)'
2013-02-12 16:55 ` Thorsten Jolitz
@ 2013-02-12 21:32 ` Bastien
0 siblings, 0 replies; 6+ messages in thread
From: Bastien @ 2013-02-12 21:32 UTC (permalink / raw)
To: Thorsten Jolitz; +Cc: emacs-orgmode
Hi Thorsten,
Thorsten Jolitz <tjolitz@gmail.com> writes:
> Thats not really a problem for me - just a bit strange.
So maybe this is by design.
Similarily M-: (org-mark-element) RET does not highlight the
region, while M-x org-mark-element RET does.
Perhaps you can ask on emacs-devel for confirming this (or
maybe someone who knows better will chime in this thread!)
--
Bastien
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-02-12 21:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-03 19:10 Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)' Thorsten Jolitz
2013-02-03 19:43 ` Nick Dokos
2013-02-03 20:01 ` Thorsten Jolitz
2013-02-11 14:43 ` Bastien
2013-02-12 16:55 ` Thorsten Jolitz
2013-02-12 21:32 ` Bastien
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).