Subject: bug#23245: closed (Re: bug#23245:)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 01 Oct 2020 12:14:01 +0000

Your bug report

#23245: 25.0.92; cua-mode inhibits deactivate-region-hook

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
23245: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23245
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#23245:
From: Stefan Kangas <[email-masked]>
To: Thomas Frössman <[email-masked]>
Cc: [email-masked]
Date: Thu, 1 Oct 2020 05:13:17 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

Stefan Kangas <[email-masked]> writes:

> Thomas Frössman <[email-masked]> writes:
>
>> I mixed up the mark/region functions a bit while testing so maybe it's not an emacs bug. I will continue to investigate later.
>>
>> My actual problem is resolved by deactivating cua-mode and this did not happen in emacs 24.x..
>>
>> The NEWS file says that "deactivate-mark is now buffer local".. that could maybe be related.
>
> Could you please clarify what exactly is the issue here, if any?  Please
> give a recipe starting from "emacs -Q", if possible.
>
> Thanks in advance.

More information was requested, but none was given within 7 weeks, so
I'm closing this bug.  If this is still an issue, please reply to this
email (use "Reply to all" in your email client) and we can reopen the
bug report.

Best regards,
Stefan Kangas

Subject: 25.0.92; cua-mode inhibits deactivate-region-hook
From: Thomas Frössman <[email-masked]>
To: [email-masked]
Date: Fri, 08 Apr 2016 18:50:43 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

I noticed that https://github.com/fgallina/region-bindings-mode started
to fail to deactive from time to time after I swiched to the emacs-25
branch.

I think I have tracked the problem down to cua-mode being the thing
which causes this.

I have been able to reproduce this problem.  If i use the init.el below
and repeatadly activates and deactivates regions for a while an AM
is logged to the messages buffer without a DM following the
deactivation, after this (region-active-p) evaluates to nil but there
was to deactivation hook fired.

(defun AM ()
  (message "AM"))
(defun DM ()
  (message "DM" ))
(add-hook 'activate-mark-hook 'AM)
(add-hook 'deactivate-mark-hook 'DM)
(cua-mode)

In GNU Emacs 25.0.92.8 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.7)
 of 2016-04-08 built on transwhale
Repository revision: 7ad1d075b940f276adaf3b6bb0c024079c403f80
Windowing system distributor 'The X.Org Foundation', version 11.0.11702000
System Description:	Ubuntu 15.10

Configured using:
 'configure --with-x-toolkit=gtk3 --with-file-notification=inotify
 --without-pop --without-toolkit-scroll-bars --with-xwidgets'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB GTK3 X11 XWIDGETS

Important settings:
  value of $LC_COLLATE: sv_SE.utf8
  value of $LC_CTYPE: sv_SE.utf8
  value of $LC_MESSAGES: en_US.utf8
  value of $LC_MONETARY: sv_SE.utf8
  value of $LC_NUMERIC: sv_SE.utf8
  value of $LC_TIME: sv_SE.utf8
  value of $LANG: en_US.utf8
  locale-coding-system: utf-8