Re: [O] Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)'
Hi Thorsten, Thorsten Jolitz 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
Re: [O] Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)'
Bastien 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
Re: [O] Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)'
Hi Thorsten, Thorsten Jolitz 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
Re: [O] Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)'
Nick Dokos 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
Re: [O] Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)'
Thorsten Jolitz 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
[O] Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)'
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