From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#10056: 24.0.91; `copy-to-register' does not deactivate the mark Date: Fri, 3 Aug 2012 21:47:29 +0000 Message-ID: <20120803214728.GA11675@acm.acm> References: <87aa7qm1gv.fsf@gnu.org> <87boizuq60.fsf@gnu.org> <20120801211745.GA4203@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1344030750 5497 80.91.229.3 (3 Aug 2012 21:52:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 3 Aug 2012 21:52:30 +0000 (UTC) Cc: 10056@debbugs.gnu.org, Chong Yidong To: Dani Moncayo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 03 23:52:30 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1SxPnJ-0000jP-Gs for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Aug 2012 23:52:29 +0200 Original-Received: from localhost ([::1]:34432 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SxPnI-0007sX-UR for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Aug 2012 17:52:28 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49486) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SxPnF-0007sK-Oj for bug-gnu-emacs@gnu.org; Fri, 03 Aug 2012 17:52:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SxPnE-000620-Qm for bug-gnu-emacs@gnu.org; Fri, 03 Aug 2012 17:52:25 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50546) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SxPnE-00061s-Nf for bug-gnu-emacs@gnu.org; Fri, 03 Aug 2012 17:52:24 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SxPuc-00058C-Aj for bug-gnu-emacs@gnu.org; Fri, 03 Aug 2012 18:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Aug 2012 22:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10056 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10056-submit@debbugs.gnu.org id=B10056.134403114319637 (code B ref 10056); Fri, 03 Aug 2012 22:00:02 +0000 Original-Received: (at 10056) by debbugs.gnu.org; 3 Aug 2012 21:59:03 +0000 Original-Received: from localhost ([127.0.0.1]:60090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SxPtf-00056f-5Y for submit@debbugs.gnu.org; Fri, 03 Aug 2012 17:59:03 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:14377 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SxPtc-00056G-GR for 10056@debbugs.gnu.org; Fri, 03 Aug 2012 17:59:01 -0400 Original-Received: (qmail 3194 invoked by uid 3782); 3 Aug 2012 21:51:21 -0000 Original-Received: from acm.muc.de (pD951B677.dip.t-dialin.net [217.81.182.119]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 03 Aug 2012 23:51:19 +0200 Original-Received: (qmail 11737 invoked by uid 1000); 3 Aug 2012 21:47:29 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:62804 Archived-At: Hi, Dani. On Thu, Aug 02, 2012 at 12:07:06AM +0200, Dani Moncayo wrote: > >> > As for c-indent-line-or-region, I have no opinion on that at all. > >> (I'm CC-ing Alan. Hopefully he has an opinion) This is the current > >> behavior I observe: > >> * If the command has to adjust the indentation of some line(s) in the > >> region, the mark is deactivated at the end of the command. > >> * Else, the mark is not deactivated. > >> This behavior is definitely annoying for me: when I mark some fragment > >> of code and type TAB, what I want is that Emacs revise the indentation > >> of code, and correct it if necessary, but in any case, I don't want > >> the mark to remain active. > > Have you looked at the code for c-i-l-o-region? At a quick glance, I > > can't see where the distinction is made between indentation adjusted and > > not adjusted. I don't actually use transient-mark-mode myself, so this > > hasn't annoyed me one way or the other. > > Is the distinction there for a reason, or did it just get there by > > accident? The defun is only several (as opposed to many) years old, so > > the evidence should still be available in the bzr repo. > I'm sorry, I (still) don't have enough knowledge of Emacs to delve > into such questions. > I reported this bug as a mere user, hoping that you (the maintainers), > if agree with my reasoning, make the suitable changes to the program. Sorry, misunderstanding on my part there. > In the case at hand, what I reported is quite simple, I think: from > "emacs -Q" (transient mark mode on) visit some C file, select some > fragment of code and type TAB. > Hopefully you'll see the same behavior as me: > * If the code in the region was already well indented, nothing happens > and the mark remains active. > * Else, the code is indented and the mark is deactivated. Yes, I see this. > What I say is that the mark should be deactivated _always_ at the end > of the command, because the "transient" operation (revise the > indentation of those lines) is done. > This is so obvious to me that I'm surprised of seeing you so > hesitant... but well, you decide :) The hesitancy comes from long experience of Emacs; things which are so obviously wrong to some are obviously the RT to others. I was wondering if this behaviour, strange though it seems to both of us, might have been programmed deliberately. In this case, there seems to be some bug at the lower levels of Emacs. There is nothing in CC Mode I can find to explain this strange behaviour. According to the elisp manual, the normal way of deactivating a region when transient mark mode is enabled is to set the variable `deactivate-mark', which instructs the command loop to do the business. CC Mode doesn't set `deactivate-mark' at all. Maybe some primitive does. I don't really know transient-mark-mode. Yidong, have you any suggestions here? > -- > Dani Moncayo -- Alan Mackenzie (Nuremberg, Germany).