From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xue Fuqiao Newsgroups: gmane.emacs.devel Subject: Re: Calling 'org-babel-mark-block' with 'M-x cmd' and 'M-: (cmd)' Date: Fri, 15 Feb 2013 23:21:55 +0800 Organization: The Church of Emacs Message-ID: <20130215232155.2339410d425e1b9dd479b67d@gmail.com> References: <871uchk7gq.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1360941778 18419 80.91.229.3 (15 Feb 2013 15:22:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 Feb 2013 15:22:58 +0000 (UTC) Cc: emacs-devel@gnu.org To: Thorsten Jolitz Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 15 16:23:20 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U6N88-0007VA-4H for ged-emacs-devel@m.gmane.org; Fri, 15 Feb 2013 16:23:16 +0100 Original-Received: from localhost ([::1]:60859 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6N7o-0000By-Bu for ged-emacs-devel@m.gmane.org; Fri, 15 Feb 2013 10:22:56 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:42030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6N7g-0000Ai-Ke for emacs-devel@gnu.org; Fri, 15 Feb 2013 10:22:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U6N7a-0000Yc-Cy for emacs-devel@gnu.org; Fri, 15 Feb 2013 10:22:48 -0500 Original-Received: from mail-da0-f41.google.com ([209.85.210.41]:60566) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6N7a-0000YJ-6q for emacs-devel@gnu.org; Fri, 15 Feb 2013 10:22:42 -0500 Original-Received: by mail-da0-f41.google.com with SMTP id e20so1495742dak.14 for ; Fri, 15 Feb 2013 07:22:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:from:to:cc:subject:message-id:in-reply-to :references:organization:x-mailer:mime-version:content-type :content-transfer-encoding; bh=FKRniRuH8E5uFQETRGHe9Vssg/+AgDlOq/pDCmY2ofA=; b=y77rTx/SnMUDM01skS5lyIf0JDUUTBRJ/okvjbrZWnlZOLDFcWYEonLZXAKyTLubN1 NKk0WSuVFalxXk7n/dD24eumpMb3jFl5T8uR6QhLxIAZO+cs2IhpOQ1gWaQE0+gDiAhy DDXiXK3WEY3+r4bdNDlmxftP6tee0kIS34/hiS3L/K2W8sl4b0joZlBuMHStxUB3ramg JWJcbFAAN9fTDB4TYJKlUhADd2hJQ7x2Wxz8uVMKKr2YxqdAgq4hra/T4v//fNrJjizJ 1Lw1j5xGj7z5h9JoJIximZzkrsEnW+MQ6q58xm9nFDQLstFKb2UZFye7OG2nXFzf8jRe cFdQ== X-Received: by 10.68.245.229 with SMTP id xr5mr6596783pbc.163.1360941761375; Fri, 15 Feb 2013 07:22:41 -0800 (PST) Original-Received: from Emacs ([124.117.94.252]) by mx.google.com with ESMTPS id w2sm88521330pax.22.2013.02.15.07.22.07 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Feb 2013 07:22:39 -0800 (PST) In-Reply-To: <871uchk7gq.fsf@gmail.com> X-Mailer: Sylpheed 3.2.0 (GTK+ 2.24.13; x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.210.41 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:157050 Archived-At: On Fri, 15 Feb 2013 14:55:01 +0100 Thorsten Jolitz wrote: > 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. You probably should not use this function in Lisp programs; it is usually a mistake for a Lisp function to use any subroutine that uses or sets the mark. > cheers, > Thorsten -- Best regards, Xue Fuqiao. http://www.emacswiki.org/emacs/XueFuqiao