GNU bug report logs - #13724
Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)'

Previous Next

Packages: org-mode, emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Fri, 15 Feb 2013 20:06:02 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13724 in the body.
You can then email your comments to 13724 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to tjolitz <at> gmail.com, bug-gnu-emacs <at> gnu.org:
bug#13724; Package emacs. (Fri, 15 Feb 2013 20:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
New bug report received and forwarded. Copy sent to tjolitz <at> gmail.com, bug-gnu-emacs <at> gnu.org. (Fri, 15 Feb 2013 20:06:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: bug-gnu-emacs <at> gnu.org
Subject: Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)'
Date: Fri, 15 Feb 2013 12:30:55 -0500
[Message part 1 (text/plain, inline)]
Get a bug-number for it.

[Message part 2 (message/rfc822, inline)]
From: Thorsten Jolitz <tjolitz <at> gmail.com>
To: emacs-devel <at> gnu.org
Subject: Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)'
Date: Fri, 15 Feb 2013 14:55:01 +0100
Hi List, 

this was posted and discussed on the Org-mode mailing list, but without
any real conclusion if it is a Bug in Emacs - or something else. So it
was suggested to repost it here. 

Say point is behind the closing parenthesis of the sexp in this Org-mode source
block:

,-------------------------------------
| #+begin_src emacs-lisp
| (+ 3 4)          # point behind sexp
| #+end_src
`-------------------------------------

Now, when I call

,-----------------------------
| M-x org-babel-mark-block RET
`-----------------------------

or

,-------------------------
| M-x org-mark-element RET
`-------------------------

the body of the source block (or the whole source-block) is (visibly)
marked as expected (transient-mark-mode is on), and 'M-w' puts the
active region into the kill-ring. 

But with the point at the same position, doing

,-----------------------------
| M-: (org-babel-mark-block) RET
`-----------------------------

or

,-------------------------
| M-: (org-mark-element) RET
`-------------------------

moves point to the beginning of source-block (body) and returns the
position of point without (visibly) marking the source-block body.
There is no region activated, 'M-w' puts nothing in the kill-ring. 

-- 
cheers,
Thorsten



Information forwarded to bug-gnu-emacs <at> gnu.org, emacs-orgmode <at> gnu.org:
bug#13724; Package emacs,org-mode. (Fri, 15 Feb 2013 20:43:01 GMT) Full text and rfc822 format available.

Message #8 received at 13724 <at> debbugs.gnu.org (full text, mbox):

From: Bastien <bzg <at> altern.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Thorsten Jolitz <tjolitz <at> gmail.com>, 13724 <at> debbugs.gnu.org
Subject: Re: bug#13724: Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-:
	(cmd)'
Date: Fri, 15 Feb 2013 21:41:09 +0100
Let me restate the issue:

M-x mark-word RET will highlight the word at point.
M-: (mark-word) RET will *not* highlight the word at point.

My understanding was that interactive call of mark-word
highlight the region, while non-interactive call do not
highlight it.

Is this wrong?

`org-mark-element' and `org-babel-mark-block' are not
different to `mark-word' here.

-- 
 Bastien




Information forwarded to bug-gnu-emacs <at> gnu.org, emacs-orgmode <at> gnu.org:
bug#13724; Package emacs,org-mode. (Fri, 15 Feb 2013 23:51:01 GMT) Full text and rfc822 format available.

Message #11 received at 13724 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: 13724 <at> debbugs.gnu.org
Cc: Thorsten Jolitz <tjolitz <at> gmail.com>
Subject: Re: bug#13724: Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-:
	(cmd)'
Date: Fri, 15 Feb 2013 18:50:02 -0500
> ,-------------------------
> | M-: (org-mark-element) RET
> `-------------------------
> moves point to the beginning of source-block (body) and returns the
> position of point without (visibly) marking the source-block body.

Indeed, thank you.  Should be fixed now, thanks to the patch below,


        Stefan


--- lisp/simple.el	2013-02-12 04:46:18 +0000
+++ lisp/simple.el	2013-02-15 17:35:00 +0000
@@ -1328,7 +1327,8 @@
 	(setq debug-on-error new-value))))
 
   (let ((print-length eval-expression-print-length)
-	(print-level eval-expression-print-level))
+	(print-level eval-expression-print-level)
+        (deactivate-mark))
     (if eval-expression-insert-value
 	(with-no-warnings
 	 (let ((standard-output (current-buffer)))





bug closed, send any further explanations to 13724 <at> debbugs.gnu.org and Stefan Monnier <monnier <at> iro.umontreal.ca> Request was from Stefan Monnier <monnier <at> iro.umontreal.ca> to control <at> debbugs.gnu.org. (Fri, 15 Feb 2013 23:53:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 16 Mar 2013 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 159 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.