GNU bug report logs -
#14464
24.3; require sets deactivate-mark causing problems with some plugins
Previous Next
Reported by: Donald Curtis <dcurtis <at> milkbox.net>
Date: Fri, 24 May 2013 18:09:02 UTC
Severity: normal
Tags: moreinfo
Found in version 24.3
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14464 in the body.
You can then email your comments to 14464 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14464
; Package
emacs
.
(Fri, 24 May 2013 18:09:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Donald Curtis <dcurtis <at> milkbox.net>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 24 May 2013 18:09:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
This bug report will be sent to the Bug-GNU-Emacs mailing list
and the GNU bug tracker at debbugs.gnu.org. Please check that
the From: line contains a valid email address. After a delay of up
to one day, you should receive an acknowledgment at that address.
Please write in English if possible, as the Emacs maintainers
usually do not have translators for other languages.
Please describe exactly what actions triggered the bug, and
the precise symptoms of the bug. If you can, give a recipe
starting from `emacs -Q':
I am using the `multiple-cursors` package through `package.el` which
sets up some autoloads that rely on the currently selected region. When
I call the function---through a keybinding---the current region
deactivates. The problem is that subsequent calls to the function
require that the region stay active.
It appears that somewhere during the call to `require`,
`deactivate-mark` is being set to `t` and thus the mark gets deactivated.
The only solution that I have been able to come up with is to advise
around `require` and create a local instance of `deactivate-mark` while
saving the excursion.
(defadvice require (around require-advice (feature &optional filename noerror) activate)
(save-excursion
(let (deactivate-mark)
ad-do-it)))
It seems like there should be a way to avoid this behavior more elegantly.
If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
`bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/usr/local/Cellar/emacs/24.3/share/emacs/24.3/etc/DEBUG.
In GNU Emacs 24.3.1 (x86_64-apple-darwin12.3.0, NS apple-appkit-1187.37)
of 2013-05-24 on charlie.local
Windowing system distributor `Apple', version 10.3.1187
Configured using:
`configure '--prefix=/usr/local/Cellar/emacs/24.3' '--without-dbus'
'--enable-locallisppath=/usr/local/share/emacs/site-lisp'
'--infodir=/usr/local/Cellar/emacs/24.3/share/info/emacs' '--with-ns'
'--disable-ns-self-contained' 'CC=cc''
Important settings:
locale-coding-system: utf-8
default enable-multibyte-characters: t
Major mode: Emacs-Lisp
Minor modes in effect:
paredit-mode: t
yas-minor-mode: t
rainbow-delimiters-mode: t
whitespace-mode: t
global-undo-tree-mode: t
undo-tree-mode: t
ido-ubiquitous-mode: t
ido-everywhere: t
which-function-mode: t
delete-selection-mode: t
global-subword-mode: t
subword-mode: t
winner-mode: t
show-paren-mode: t
savehist-mode: t
shell-dirtrack-mode: t
global-auto-revert-mode: t
recentf-mode: t
checkdoc-minor-mode: t
tooltip-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
C-x b t e s t <return> C-= C-> C-g C-n C-n C-n C-n
C-n C-n C-n C-n C-p C-p C-p C-p C-p C-p C-p C-p C-p
C-p C-p C-= C-> C-> C-g C-g C-x b i n i C-g C-n C-n
C-n C-n C-n C-n C-n C-n C-n C-p C-SPC C-n C-n C-n C-n
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
C-n C-n M-w C-x RET e m a c s b u <return> M-p M-p
M-p M-p <return> C-y C-c C-c y C-x C-g C-x RET <return>
M-p M-p <return> C-y C-c C-c y C-x RET <return>
Recent messages:
Checking 87 files in /usr/local/Cellar/emacs/24.3/share/emacs/24.3/lisp/calc...
Checking 77 files in /usr/local/Cellar/emacs/24.3/share/emacs/24.3/lisp/obsolete...
Checking 1 files in /usr/local/Cellar/emacs/24.3/share/emacs/24.3/leim...
Checking for load-path shadows...done
Mark set [2 times]
Send this bug report to the Emacs maintainers? (y or n) y
Sending...
Mark set [2 times]
Sending via mail...
Sending...done
Load-path shadows:
/Users/dcurtis/.emacs.d/elpa/multiple-cursors-20130518.816/rectangular-region-mode hides ~/src/multiple-cursors.el/rectangular-region-mode
/Users/dcurtis/.emacs.d/elpa/multiple-cursors-20130518.816/multiple-cursors hides ~/src/multiple-cursors.el/multiple-cursors
/Users/dcurtis/.emacs.d/elpa/multiple-cursors-20130518.816/multiple-cursors-pkg hides ~/src/multiple-cursors.el/multiple-cursors-pkg
/Users/dcurtis/.emacs.d/elpa/multiple-cursors-20130518.816/multiple-cursors-core hides ~/src/multiple-cursors.el/multiple-cursors-core
/Users/dcurtis/.emacs.d/elpa/multiple-cursors-20130518.816/mc-separate-operations hides ~/src/multiple-cursors.el/mc-separate-operations
/Users/dcurtis/.emacs.d/elpa/multiple-cursors-20130518.816/mc-mark-more hides ~/src/multiple-cursors.el/mc-mark-more
/Users/dcurtis/.emacs.d/elpa/multiple-cursors-20130518.816/mc-edit-lines hides ~/src/multiple-cursors.el/mc-edit-lines
/Users/dcurtis/.emacs.d/elpa/multiple-cursors-20130518.816/mc-cycle-cursors hides ~/src/multiple-cursors.el/mc-cycle-cursors
/Users/dcurtis/.emacs.d/elpa/magit-20130523.125/.dir-locals hides /usr/local/Cellar/emacs/24.3/share/emacs/24.3/lisp/gnus/.dir-locals
Features:
(mailalias mailclient browse-url shadow sort mail-extr emacsbug message
cl-macs gv rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mail-utils mc-mark-more multiple-cursors-core rect
expand-region text-mode-expansions er-basic-expansions
expand-region-custom expand-region-core add-log paredit yasnippet cl
rainbow-delimiters whitespace rx undo-tree diff smex ido-ubiquitous ido
diminish which-func imenu delsel subword winner paren savehist
tramp-cache tramp-sh tramp tramp-compat auth-source gnus-util mm-util
mail-prsvr password-cache tramp-loaddefs shell pcomplete comint
ansi-color ring format-spec autorevert edmacro kmacro server uniquify
warnings advice help-fns cl-lib advice-preload saveplace recentf
tree-widget wid-edit misc midnight checkdoc thingatpt help-mode easymenu
ace-jump-mode-autoloads ag-autoloads browse-kill-ring-autoloads
clojure-mode-autoloads deft-autoloads diminish-autoloads
dired+-autoloads dropdown-list-autoloads expand-region-autoloads
gist-autoloads gh-autoloads eieio byte-opt bytecomp byte-compile cconv
git-commit-mode-autoloads ido-ubiquitous-autoloads
iy-go-to-char-autoloads logito-autoloads magit-autoloads
markdown-mode+-autoloads markdown-mode-autoloads
multiple-cursors-autoloads naquadah-theme-autoloads paredit-autoloads
pcache-autoloads rainbow-delimiters-autoloads smex-autoloads
soothe-theme-autoloads finder-inf undo-tree-autoloads
yasnippet-autoloads package time-date tooltip ediff-hook vc-hooks
lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
make-network-process ns multi-tty emacs)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14464
; Package
emacs
.
(Fri, 24 May 2013 21:04:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 14464 <at> debbugs.gnu.org (full text, mbox):
Donald Curtis wrote:
> I am using the `multiple-cursors` package through `package.el` which
> sets up some autoloads that rely on the currently selected region. When
> I call the function---through a keybinding---the current region
> deactivates. The problem is that subsequent calls to the function
> require that the region stay active.
>
> It appears that somewhere during the call to `require`,
> `deactivate-mark` is being set to `t` and thus the mark gets deactivated.
>
> The only solution that I have been able to come up with is to advise
> around `require` and create a local instance of `deactivate-mark` while
> saving the excursion.
I think it's unlikely that require itself messes with the mark.
The thing that you are requiring can of course do anything at all.
Sounds like this could be a problem in "multiple-cursors", which isn't
part of Emacs.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14464
; Package
emacs
.
(Sat, 25 May 2013 18:08:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 14464 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Please keep the debbugs address cc'd.
I am resending your comments so that they are visible to others.
Date: Fri, 24 May 2013 17:47:31 -0500
From: Donald Curtis <dcurtis <at> milkbox.net>
Subject: Re: bug#14464: 24.3; require sets deactivate-mark causing problems
with some plugins
Yes, this is what my initial intuition was. I have traced this error down
to something much more obscure. I don't understand why it's happening. But
let me give you some code to reproduce the odd behavior without concern for
`multiple-cursors`.
Make sure both files are in the same directory.
# Working Correctly
1. open `sample.el` with: emacs -Q sample.el
2. eval just the `progn` portion of the provided code.
3. transient mark something
4. hit C-.
the active-mark is still there. now exit emacs and start again,
# Odd Behavior
1. open `sample.el` with: emacs -Q sample.el
2. eval the `defadvice`
3. eval the `progn` portion of the provided code.
4. transient mark something
5. hit C-.
now the active-mark disappears.
AND what is even weirder is that if you remove the `compile` option from
the `defadvice` then there is no issue. but there is something weird here!
[sample.el (application/octet-stream, attachment)]
[autoloadme.el (application/octet-stream, attachment)]
[Message part 4 (text/plain, inline)]
On Fri, May 24, 2013 at 4:02 PM, Glenn Morris <rgm <at> gnu.org> wrote:
> I think it's unlikely that require itself messes with the mark.
> The thing that you are requiring can of course do anything at all.
> Sounds like this could be a problem in "multiple-cursors", which isn't
> part of Emacs.
Removed tag(s) moreinfo.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 06 Feb 2014 00:10:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14464
; Package
emacs
.
(Mon, 06 Sep 2021 10:26:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 14464 <at> debbugs.gnu.org (full text, mbox):
Donald Curtis <dcurtis <at> milkbox.net> writes:
> # Odd Behavior
>
> 1. open `sample.el` with: emacs -Q sample.el
> 2. eval the `defadvice`
> 3. eval the `progn` portion of the provided code.
> 4. transient mark something
> 5. hit C-.
>
> now the active-mark disappears.
>
> AND what is even weirder is that if you remove the `compile` option from
> the `defadvice` then there is no issue. but there is something weird here!
(I'm going through old bug reports that unfortunately weren't resolved
at the time.)
I tried reproducing this problem with Emacs 25.1 (and Emacs 28), but I
was unable to -- the active region didn't disappear.
Are you still seeing this issue in recent Emacs versions?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) moreinfo.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Mon, 06 Sep 2021 10:26:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14464
; Package
emacs
.
(Tue, 21 Sep 2021 00:39:01 GMT)
Full text and
rfc822 format available.
Message #21 received at 14464 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I am not able to reproduce either. Given that this was submitted 4 years ago, I cannot recall exactly what I saw before but things seems fine based on my repro steps. Thanks!
On Mon, Sep 6, 2021, at 05:25, Lars Ingebrigtsen wrote:
> Donald Curtis <dcurtis <at> milkbox.net> writes:
>
> > # Odd Behavior
> >
> > 1. open `sample.el` with: emacs -Q sample.el
> > 2. eval the `defadvice`
> > 3. eval the `progn` portion of the provided code.
> > 4. transient mark something
> > 5. hit C-.
> >
> > now the active-mark disappears.
> >
> > AND what is even weirder is that if you remove the `compile` option from
> > the `defadvice` then there is no issue. but there is something weird here!
>
> (I'm going through old bug reports that unfortunately weren't resolved
> at the time.)
>
> I tried reproducing this problem with Emacs 25.1 (and Emacs 28), but I
> was unable to -- the active region didn't disappear.
>
> Are you still seeing this issue in recent Emacs versions?
>
> --
> (domestic pets only, the antidote for overdose, milk.)
> bloggy blog: http://lars.ingebrigtsen.no
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14464
; Package
emacs
.
(Tue, 21 Sep 2021 04:02:02 GMT)
Full text and
rfc822 format available.
Message #24 received at 14464 <at> debbugs.gnu.org (full text, mbox):
"Donald Curtis" <dcurtis <at> milkbox.net> writes:
> I am not able to reproduce either. Given that this was submitted 4 years ago,
> I cannot recall exactly what I saw before but things seems fine based on my
> repro steps. Thanks!
Thanks for checking. I'm closing this bug report, then.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug closed, send any further explanations to
14464 <at> debbugs.gnu.org and Donald Curtis <dcurtis <at> milkbox.net>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 21 Sep 2021 04:03:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 19 Oct 2021 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 300 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.