From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 17 23:22:12 2013 Received: (at submit) by debbugs.gnu.org; 18 Apr 2013 03:22:12 +0000 Received: from localhost ([127.0.0.1]:57684 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1USfQK-0004q3-Aw for submit@debbugs.gnu.org; Wed, 17 Apr 2013 23:22:12 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48680) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1USfQH-0004pv-C9 for submit@debbugs.gnu.org; Wed, 17 Apr 2013 23:22:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USfLw-0003Hg-N1 for submit@debbugs.gnu.org; Wed, 17 Apr 2013 23:17:42 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_50,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_XBL,RP_MATCHES_RCVD,T_DKIM_INVALID, T_HK_SPAMMY_FILENAME autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:45954) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USfLw-0003Hc-J2 for submit@debbugs.gnu.org; Wed, 17 Apr 2013 23:17:40 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60028) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USfLu-0002NK-0Q for bug-gnu-emacs@gnu.org; Wed, 17 Apr 2013 23:17:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USfLr-0003Gl-5x for bug-gnu-emacs@gnu.org; Wed, 17 Apr 2013 23:17:37 -0400 Received: from nm35-vm9.bullet.mail.bf1.yahoo.com ([72.30.239.59]:39969) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USfLq-0003Gd-TF for bug-gnu-emacs@gnu.org; Wed, 17 Apr 2013 23:17:35 -0400 Received: from [98.139.214.32] by nm35.bullet.mail.bf1.yahoo.com with NNFMP; 18 Apr 2013 03:17:33 -0000 Received: from [98.139.212.249] by tm15.bullet.mail.bf1.yahoo.com with NNFMP; 18 Apr 2013 03:17:33 -0000 Received: from [127.0.0.1] by omp1058.mail.bf1.yahoo.com with NNFMP; 18 Apr 2013 03:17:33 -0000 X-Yahoo-Newman-Property: ymail-5 X-Yahoo-Newman-Id: 570761.11172.bm@omp1058.mail.bf1.yahoo.com Received: (qmail 38846 invoked by uid 60001); 18 Apr 2013 03:17:33 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1366255053; bh=/f+FPV+MnubkNE6+YLk729SH4pwvjWuLYI8gBcsrLwc=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Subject:To:MIME-Version:Content-Type; b=X1+ThmWZE4IqjHLXNyDcwFPNEUoKCI/sYEfIoBsHNBiTKxvxTDvqjNBbprNR6S2uUkcYR8cA6jkSKhJKVnKwPvdz6wnxktXtDLzw5Rfk9Shz9BdbG7P1VQ9V7ykZOmfpyQCuBg1S27tFix1JlFzyETuPYYeMsTZNu4kyp5PMMM4= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Subject:To:MIME-Version:Content-Type; b=X+I1lq2AWu79Pf3aZ0VcffyJR4rsirl8pTCltAQz1EHmPK5Ne+L1uLWjY9p6q45Dhak5QWJV09jb2Y7Nj7ZFHjCVi8IOhvPAKcB1sC6+OhQW0dAzMfrlN/ODlNezS3aQgxoD0yV6NsJDNR65Gxqg13uxBcwAiBJnGrfzPZmS4cI=; X-YMail-OSG: ISIgZ70VM1lNdDxxA76Ob9qDa574U20tN5ofJR5C4DRqeEa 1hq2f690e0oe_Ne2q6zo6o6HqLQ2Q04pxUDrRW7RsRmTUPGhUuIlIcdVLq8x ibNk6SdD7Gh6aq1rd4x86IbXeps1gdgg4DT3SwgxFnrTJYmr0ttOHe5U__1g 6vSR6Qj.tiwI_Ch5_T0856U2pAq70PXIJqNkL3DW5ZMufr0kjCAUbUED61bp 3djqj6xlbJcwIEtUd3LtJ97_wPg.xMKBxyiriaAQmZ1LshBd7MaBIpaflmuL 47XItnFsC0pHE16DCfowirWZ2YVe8PkeFwzXUIvogLcbX1hcMZgjm4k6zxQP ZCkP4FavXlERHwFZa01TduBX38XoOesIwoqawwd8hBlfG37MGk64V7YhM.Ew tp_jInnKD6arXdlTWkHT2OiFBptEWEfmKH2dZ0JCQuKBfW_DMq.EBkwfXJVO DE5vS1FeYAUuaFcq9BlZ1nm52IhIPWjs- Received: from [62.75.138.125] by web141101.mail.bf1.yahoo.com via HTTP; Wed, 17 Apr 2013 20:17:33 PDT X-Rocket-MIMEInfo: 002.001, VXNpbmcgRW1hY3MgMjQuMwplbWFjcyAtUQood2lubmVyLW1vZGUgMSkKKGFkZC1ob29rICdkZWFjdGl2YXRlLW1hcmstaG9vayAobGFtYmRhICgpIChzZXRxIGN1cnNvci10eXBlIHQpKSkKKGFkZC1ob29rICdhY3RpdmF0ZS1tYXJrLWhvb2sgKGxhbWJkYSAoKSAoc2V0cSBjdXJzb3ItdHlwZSAnYmFyKSkpCkMteCAyCkMtYyBsZWZ0CgpOb3RpY2UgdGhhdCB0aGUgY3Vyc29yIHR5cGUgaXMgbm93IGEgYmFyLCBub3QgYSBibG9jay4gSXQgc2hvdWxkIGJlIGEgYmxvY2suClRoZSBhdHRhY2hlZCB3aW5uZXJidWcBMAEBAQE- X-Mailer: YahooMailClassic/15.1.7 YahooMailWebService/0.8.140.532 Message-ID: <1366255053.95181.YahooMailClassic@web141101.mail.bf1.yahoo.com> Date: Wed, 17 Apr 2013 20:17:33 -0700 (PDT) From: Kelly Dean Subject: [PATCH] Winner mode fails to run mark activation and deactivation hooks To: bug-gnu-emacs@gnu.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="844607989-528228110-1366255053=:95181" X-detected-operating-system: by eggs.gnu.org: FreeBSD 8.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) --844607989-528228110-1366255053=:95181 Content-Type: text/plain; charset=us-ascii Using Emacs 24.3 emacs -Q (winner-mode 1) (add-hook 'deactivate-mark-hook (lambda () (setq cursor-type t))) (add-hook 'activate-mark-hook (lambda () (setq cursor-type 'bar))) C-x 2 C-c left Notice that the cursor type is now a bar, not a block. It should be a block. The attached winnerbug.patch fixes it. BTW, by default in Emacs, when the region is active but empty, there's no visual indication of this status. Neither is there indication of the active region if point is one less than mark and blink-cursor-mode is off. Also, if point is greater than mark, the active region is highlighted, but the block cursor does an inverse-video highlight of the character following the region, which (speaking from experience) an Emacs newbie finds distracting, since it seems to indicate that that character is also part of the region. Setting the cursor type to bar when the region is active solves all those problems, and I recommend it as the default for Emacs. --844607989-528228110-1366255053=:95181 Content-Type: text/x-diff; name="winnerbug.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="winnerbug.patch" LS0tIGVtYWNzLTI0LjMvbGlzcC93aW5uZXIuZWwKKysrIGVtYWNzLTI0LjMv bGlzcC93aW5uZXIuZWwKQEAgLTMwOSw3ICszMDksOSBAQAogICAgICAgICAg ICAgICAgICBmb3IgZW50cnkgPSAoY2FkciAoYXNzcSBidWYgd2lubmVyLXBv aW50LWFsaXN0KSkKICAgICAgICAgICAgICAgICAgZG8gKHByb2duIChzZXQt YnVmZmVyIGJ1ZikKICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzZXQt bWFyayAoY2FyIGVudHJ5KSkKLSAgICAgICAgICAgICAgICAgICAgICAgICAg IChzZXRmICh3aW5uZXItYWN0aXZlLXJlZ2lvbikgKGNkciBlbnRyeSkpKSkp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAoc2V0ZiAod2lubmVyLWFj dGl2ZS1yZWdpb24pIChjZHIgZW50cnkpKQorCQkJICAgKGlmIChjZHIgZW50 cnkpIChydW4taG9va3MgJ2FjdGl2YXRlLW1hcmstaG9vaykKKwkJCSAgICAg KHJ1bi1ob29rcyAnZGVhY3RpdmF0ZS1tYXJrLWhvb2spKSkpKQogICAgICAg OzsgRGVsZXRlIHdpbmRvd3MsIHdob3NlIGJ1ZmZlcnMgYXJlIGRlYWQgb3Ig Ym9yaW5nLgogICAgICAgOzsgUmV0dXJuIHQgaWYgdGhpcyBpcyBzdGlsbCBh IHBvc3NpYmxlIGNvbmZpZ3VyYXRpb24uCiAgICAgICAob3IgKG51bGwgeHdp bnMpCg== --844607989-528228110-1366255053=:95181-- From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 18 09:19:50 2013 Received: (at 14225) by debbugs.gnu.org; 18 Apr 2013 13:19:51 +0000 Received: from localhost ([127.0.0.1]:58352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1USokf-0007eL-SU for submit@debbugs.gnu.org; Thu, 18 Apr 2013 09:19:50 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:37371) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1USoka-0007dz-PF for 14225@debbugs.gnu.org; Thu, 18 Apr 2013 09:19:48 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+LAd/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kE4gLBsEtjQ+DewOSII1FAoUTgV6DE4FT X-IPAS-Result: Av4EABK/CFHO+LAd/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kE4gLBsEtjQ+DewOSII1FAoUTgV6DE4FT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="7707244" Received: from 206-248-176-29.dsl.teksavvy.com (HELO pastel.home) ([206.248.176.29]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 18 Apr 2013 09:15:11 -0400 Received: by pastel.home (Postfix, from userid 20848) id 828F667859; Thu, 18 Apr 2013 09:15:11 -0400 (EDT) From: Stefan Monnier To: Kelly Dean Subject: Re: bug#14225: [PATCH] Winner mode fails to run mark activation and deactivation hooks Message-ID: References: <1366255053.95181.YahooMailClassic@web141101.mail.bf1.yahoo.com> Date: Thu, 18 Apr 2013 09:15:11 -0400 In-Reply-To: <1366255053.95181.YahooMailClassic@web141101.mail.bf1.yahoo.com> (Kelly Dean's message of "Wed, 17 Apr 2013 20:17:33 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 14225 Cc: 14225@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > Notice that the cursor type is now a bar, not a block. It should be a block. > The attached winnerbug.patch fixes it. Thanks. I installed a slightly different patch which uses higher-level functions instead. > BTW, by default in Emacs, when the region is active but empty, there's no > visual indication of this status. Neither is there indication of the active > region if point is one less than mark and blink-cursor-mode is off. Also, if > point is greater than mark, the active region is highlighted, but the block > cursor does an inverse-video highlight of the character following the > region, which (speaking from experience) an Emacs newbie finds distracting, > since it seems to indicate that that character is also part of the > region. Setting the cursor type to bar when the region is active solves all > those problems, and I recommend it as the default for Emacs. I'd never thought about it, but it does sound like a good idea. This said, I see two problems with it: - we'll probably bump into more bugs along the lines of this one (should all be fixable, but). - every once will be exposed to this change, and someone out there is bound to dislike it. So could you send a separate email about it to emacs-devel? No need to participate in the ensuing flamewar, but it's important to let people use their flamethrowers to "let it out" ;-) Stefan === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-04-18 06:24:10 +0000 +++ lisp/ChangeLog 2013-04-18 13:08:17 +0000 @@ -1,3 +1,10 @@ +2013-04-18 Stefan Monnier + + * winner.el (winner-active-region): Use region-active-p, activate-mark + and deactivate-mark (bug#14225). + + * simple.el (deactivate-mark): Don't inline it. + 2013-04-18 Tassilo Horn * files.el (auto-mode-alist): Delete OpenDocument and StarOffice === modified file 'lisp/simple.el' --- lisp/simple.el 2013-04-18 00:12:33 +0000 +++ lisp/simple.el 2013-04-18 13:05:44 +0000 @@ -4177,7 +4177,7 @@ (marker-position (mark-marker)) (signal 'mark-inactive nil))) -(defsubst deactivate-mark (&optional force) +(defun deactivate-mark (&optional force) "Deactivate the mark. If Transient Mark mode is disabled, this function normally does nothing; but if FORCE is non-nil, it deactivates the mark anyway. === modified file 'lisp/winner.el' --- lisp/winner.el 2013-01-01 09:11:05 +0000 +++ lisp/winner.el 2013-04-18 13:04:51 +0000 @@ -45,10 +45,8 @@ (if (featurep 'xemacs) `(if ,store (zmacs-activate-region) (zmacs-deactivate-region)) - `(setq mark-active ,store))))) - (if (boundp 'mark-active) - mark-active - (region-active-p))) + `(if ,store (activate-mark) (deactivate-mark)))))) + (region-active-p)) (defalias 'winner-edges (if (featurep 'xemacs) 'window-pixel-edges 'window-edges)) From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 22 15:12:49 2013 Received: (at control) by debbugs.gnu.org; 22 Apr 2013 19:12:49 +0000 Received: from localhost ([127.0.0.1]:37610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UUMAS-0000Io-BW for submit@debbugs.gnu.org; Mon, 22 Apr 2013 15:12:48 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:34931) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UUMAP-0000Id-Tw for control@debbugs.gnu.org; Mon, 22 Apr 2013 15:12:46 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1UUM5h-0000LX-5b for control@debbugs.gnu.org; Mon, 22 Apr 2013 15:07:53 -0400 Date: Mon, 22 Apr 2013 15:07:53 -0400 Message-Id: Subject: control message for bug 14225 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.0 (-----) close 14225 24.4 From unknown Sat Sep 06 02:03:35 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 21 May 2013 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator