* bug#13724: Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)'
@ 2013-02-15 17:30 Stefan Monnier
2013-02-15 20:41 ` Bastien
2013-02-15 23:50 ` Stefan Monnier
0 siblings, 2 replies; 3+ messages in thread
From: Stefan Monnier @ 2013-02-15 17:30 UTC (permalink / raw)
To: 13724; +Cc: Thorsten Jolitz
[-- Attachment #1: Type: text/plain, Size: 26 bytes --]
Get a bug-number for it.
[-- Attachment #2: Type: message/rfc822, Size: 4954 bytes --]
From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-devel@gnu.org
Subject: Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)'
Date: Fri, 15 Feb 2013 14:55:01 +0100
Message-ID: <871uchk7gq.fsf@gmail.com>
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#13724: Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)'
2013-02-15 17:30 bug#13724: Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)' Stefan Monnier
@ 2013-02-15 20:41 ` Bastien
2013-02-15 23:50 ` Stefan Monnier
1 sibling, 0 replies; 3+ messages in thread
From: Bastien @ 2013-02-15 20:41 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Thorsten Jolitz, 13724
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#13724: Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)'
2013-02-15 17:30 bug#13724: Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)' Stefan Monnier
2013-02-15 20:41 ` Bastien
@ 2013-02-15 23:50 ` Stefan Monnier
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2013-02-15 23:50 UTC (permalink / raw)
To: 13724; +Cc: Thorsten Jolitz
> ,-------------------------
> | 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)))
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-02-15 23:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-15 17:30 bug#13724: Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)' Stefan Monnier
2013-02-15 20:41 ` Bastien
2013-02-15 23:50 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.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).