From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)' Date: Sun, 03 Feb 2013 14:43:03 -0500 Message-ID: <10035.1359920583@alphaville> References: <877gmpdxid.fsf@googlemail.com> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:46958) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U25T6-00060V-QC for emacs-orgmode@gnu.org; Sun, 03 Feb 2013 14:43:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U25T5-0000ib-ON for emacs-orgmode@gnu.org; Sun, 03 Feb 2013 14:43:12 -0500 Received: from g1t0028.austin.hp.com ([15.216.28.35]:3349) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U25T5-0000iO-Gw for emacs-orgmode@gnu.org; Sun, 03 Feb 2013 14:43:11 -0500 In-Reply-To: Message from Thorsten Jolitz of "Sun, 03 Feb 2013 20:10:18 +0100." <877gmpdxid.fsf@googlemail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Thorsten Jolitz Cc: emacs-orgmode@gnu.org 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