unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#23245: 25.0.92; cua-mode inhibits deactivate-region-hook
@ 2016-04-08 16:50 Thomas Frössman
  2016-04-08 16:52 ` Thomas Frössman
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Thomas Frössman @ 2016-04-08 16:50 UTC (permalink / raw)
  To: 23245

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






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#23245: 25.0.92; cua-mode inhibits deactivate-region-hook
  2016-04-08 16:50 bug#23245: 25.0.92; cua-mode inhibits deactivate-region-hook Thomas Frössman
@ 2016-04-08 16:52 ` Thomas Frössman
  2016-04-08 17:56 ` bug#23245: Thomas Frössman
  2016-04-10 18:08 ` bug#23245: Status: 25.0.92; cua-mode inhibits deactivate-region-hook Thomas Frössman
  2 siblings, 0 replies; 6+ messages in thread
From: Thomas Frössman @ 2016-04-08 16:52 UTC (permalink / raw)
  To: 23245

[-- Attachment #1: Type: text/plain, Size: 1970 bytes --]

doh, I mixed up the mark/region functions a bit while testing.. Maybe it's
not a bug then. I will continue to investigate later.

On Fri, Apr 8, 2016 at 6:50 PM, Thomas Frössman <thomasf@jossystem.se>
wrote:

> 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
>
>


-- 
Thomas Frössman
http://t.jossystem.se

[-- Attachment #2: Type: text/html, Size: 2665 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#23245:
  2016-04-08 16:50 bug#23245: 25.0.92; cua-mode inhibits deactivate-region-hook Thomas Frössman
  2016-04-08 16:52 ` Thomas Frössman
@ 2016-04-08 17:56 ` Thomas Frössman
  2020-08-12  2:52   ` bug#23245: Stefan Kangas
  2016-04-10 18:08 ` bug#23245: Status: 25.0.92; cua-mode inhibits deactivate-region-hook Thomas Frössman
  2 siblings, 1 reply; 6+ messages in thread
From: Thomas Frössman @ 2016-04-08 17:56 UTC (permalink / raw)
  To: 23245

[-- Attachment #1: Type: text/plain, Size: 375 bytes --]

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.


-- 
Thomas Frössman
http://t.jossystem.se

[-- Attachment #2: Type: text/html, Size: 622 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#23245: Status: 25.0.92; cua-mode inhibits deactivate-region-hook
  2016-04-08 16:50 bug#23245: 25.0.92; cua-mode inhibits deactivate-region-hook Thomas Frössman
  2016-04-08 16:52 ` Thomas Frössman
  2016-04-08 17:56 ` bug#23245: Thomas Frössman
@ 2016-04-10 18:08 ` Thomas Frössman
  2 siblings, 0 replies; 6+ messages in thread
From: Thomas Frössman @ 2016-04-10 18:08 UTC (permalink / raw)
  To: bug#23245



quoted from my e-mail in emacs-devel which I was told not to post to:

>> ...
>> Anyway, I think that it's an actual bug with cua-mode or something because the deactivate-mark-hook isn't
>> fired when the region is removed, repeated pressing of C-g doesn't fire it either.
>> 
>> It's also a consistent behavior, when cua-mode is active the deactivate-mark hook is not fired
>> 
>> (by using git blame) I noticed that there was a change in September last year or something which modifies
>> some bits about how cua-mode handles the mark.
>> 
>> Please tell me if I'm wrong or if there is some additional digging I should do to further diagnose this issue.. 
>
>Could you perhaps include in your bug report the details about how it
>worked in previous versions of Emacs?  If it worked correctly in some
>older version, could you please tell in which one, and what was the
>behavior?
>
>Thanks.

I switched from running emacs compiled from the emacs-24 branch to the
emacs-25 branch a few days ago.

I just ran my previously mentioned test.el init file in the emacs-24
compile now and hitting C-g twice after selecting some text deactives
the mark and runs the deactivate-mark-hook (DM is printed in the
messages buffer) which does not happen with my emacs-25 binary.


-- 
Thomas Frössman
http://t.jossystem.se





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#23245:
  2016-04-08 17:56 ` bug#23245: Thomas Frössman
@ 2020-08-12  2:52   ` Stefan Kangas
  2020-10-01 12:13     ` bug#23245: Stefan Kangas
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Kangas @ 2020-08-12  2:52 UTC (permalink / raw)
  To: Thomas Frössman; +Cc: 23245

Thomas Frössman <thomasf@jossystem.se> 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.

Best regards,
Stefan Kangas





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#23245:
  2020-08-12  2:52   ` bug#23245: Stefan Kangas
@ 2020-10-01 12:13     ` Stefan Kangas
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Kangas @ 2020-10-01 12:13 UTC (permalink / raw)
  To: Thomas Frössman; +Cc: 23245-done

Stefan Kangas <stefan@marxist.se> writes:

> Thomas Frössman <thomasf@jossystem.se> 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





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-10-01 12:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-08 16:50 bug#23245: 25.0.92; cua-mode inhibits deactivate-region-hook Thomas Frössman
2016-04-08 16:52 ` Thomas Frössman
2016-04-08 17:56 ` bug#23245: Thomas Frössman
2020-08-12  2:52   ` bug#23245: Stefan Kangas
2020-10-01 12:13     ` bug#23245: Stefan Kangas
2016-04-10 18:08 ` bug#23245: Status: 25.0.92; cua-mode inhibits deactivate-region-hook Thomas Frössman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).