From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#10056: 24.0.91; Mark deactivation Date: Sun, 09 Dec 2012 01:03:52 +0200 Organization: JURTA Message-ID: <87wqws48gn.fsf@mail.jurta.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1355008842 25023 80.91.229.3 (8 Dec 2012 23:20:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Dec 2012 23:20:42 +0000 (UTC) Cc: 10056@debbugs.gnu.org To: Dani Moncayo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 09 00:20:55 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 1ThThW-00006y-Mt for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Dec 2012 00:20:54 +0100 Original-Received: from localhost ([::1]:46934 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ThThK-0007X6-6o for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Dec 2012 18:20:42 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:43482) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ThThG-0007Wt-SR for bug-gnu-emacs@gnu.org; Sat, 08 Dec 2012 18:20:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ThThF-0005pd-NH for bug-gnu-emacs@gnu.org; Sat, 08 Dec 2012 18:20:38 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51268) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ThThF-0005pZ-IA for bug-gnu-emacs@gnu.org; Sat, 08 Dec 2012 18:20:37 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1ThThe-0005T2-1f for bug-gnu-emacs@gnu.org; Sat, 08 Dec 2012 18:21:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Dec 2012 23:21:01 +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.135500880920926 (code B ref 10056); Sat, 08 Dec 2012 23:21:01 +0000 Original-Received: (at 10056) by debbugs.gnu.org; 8 Dec 2012 23:20:09 +0000 Original-Received: from localhost ([127.0.0.1]:33281 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ThTgm-0005RN-QK for submit@debbugs.gnu.org; Sat, 08 Dec 2012 18:20:09 -0500 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:33150 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ThTgj-0005RE-VY for 10056@debbugs.gnu.org; Sat, 08 Dec 2012 18:20:07 -0500 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 9D776451CD4E; Sat, 8 Dec 2012 15:19:37 -0800 (PST) In-Reply-To: (Dani Moncayo's message of "Sat, 8 Dec 2012 11:09:27 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) 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.x 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:68204 Archived-At: >> As I pointed out previously in this thread, the mark should be >> deactivated (in general - there can be some exceptions) after any >> command that operates on the active region. Not doing so is annoying, The problem is how to implement a general rule "the mark should be deactivated after any command that operates on the active region". One way to define "operates on the active region" is when a command uses `region-beginning' and `region-end'. You can try this definition by evaluating: (defun deactivate-mark--advice () (setq deactivate-mark t)) (advice-add 'region-beginning :after #'deactivate-mark--advice) (advice-add 'region-end :after #'deactivate-mark--advice) Does this do what you want with the following functions? >> There are still cases where I observe this misbehavior. Namely: >> >> kill-region [1] >> kill-rectangle [1] >> prepend-to-register >> append-to-register >> narrow-to-region [2] >> c-indent-line-or-region [3] >> delete-duplicate-lines [3] >> delete-matching-lines [3] >> delete-non-matching-lines [3] >> delete-blank-lines [3] > > Add "fill-paragraph [3]" to the above list. Important use-case. Does this have a side effect undesirable for other functions?