emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: Thorsten Jolitz <tjolitz@googlemail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)'
Date: Sun, 03 Feb 2013 14:43:03 -0500	[thread overview]
Message-ID: <10035.1359920583@alphaville> (raw)
In-Reply-To: Message from Thorsten Jolitz <tjolitz@googlemail.com> of "Sun, 03 Feb 2013 20:10:18 +0100." <877gmpdxid.fsf@googlemail.com>

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

  reply	other threads:[~2013-02-03 19:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10035.1359920583@alphaville \
    --to=nicholas.dokos@hp.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tjolitz@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).