GNU bug report logs -
#7946
Referring to a marker changes Emacs' behaviour.
Previous Next
Reported by: Le Wang <l26wang <at> gmail.com>
Date: Mon, 31 Jan 2011 07:20:03 UTC
Severity: normal
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
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 7946 in the body.
You can then email your comments to 7946 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7946
; Package
emacs
.
(Mon, 31 Jan 2011 07:20:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Le Wang <l26wang <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 31 Jan 2011 07:20:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
I found an issue where evaluating this line or not causes Emacs behaviour
change:
(format "%s" marked-point)
"marked-point" is a marker. The bug was found on NTEmacs 23.2.1, reproed on
CVS NTEmacs 20110111, and Stephen Berman confirmed it on GNU Emacs 24.0.50.1
(i686-pc-linux-gnu, GTK+ Version 2.20.1) of 2011-01-13 on escher
"rebox2_bug.el" is attached to this message.
Repro-steps:
1. emacs -Q rebox2_bug.el
2. M-x eval-current-buffer
3. C-x b<enter> ;; switch to "*scratch*"
4. M-x rebox-mode
5. M-<
6. SPC,SPC ;; space twice
7. C-aC-aC-aC-a ;; notice that the point is stuck at 6
8. C-xb<enter> ;; switch to "rebox2_bug.el
9. M-g g 1714
10. C-d ;; uncomment the hack workaround the bug
11. C-M-x ;; reevaluated the function
12. C-x b<enter> ;; switch to "*scratch*"
13. C-aC-aC-aC-a ;; notice that the cursor switches between 1 and 6
--
Le
[Message part 2 (text/html, inline)]
[rebox2_bug.el (application/octet-stream, attachment)]
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7946
; Package
emacs
.
(Wed, 02 Feb 2011 04:37:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 7946 <at> debbugs.gnu.org (full text, mbox):
2011/1/31 Le Wang <l26wang <at> gmail.com>:
> Hi,
> I found an issue where evaluating this line or not causes Emacs behaviour
> change:
>
> (format "%s" marked-point)
>
> "marked-point" is a marker. The bug was found on NTEmacs 23.2.1, reproed on
> CVS NTEmacs 20110111, and Stephen Berman confirmed it on GNU Emacs 24.0.50.1
> (i686-pc-linux-gnu, GTK+ Version 2.20.1) of 2011-01-13 on escher
> "rebox2_bug.el" is attached to this message.
> Repro-steps:
>
> emacs -Q rebox2_bug.el
> M-x eval-current-buffer
> C-x b<enter> ;; switch to "*scratch*"
> M-x rebox-mode
> M-<
> SPC,SPC ;; space twice
> C-aC-aC-aC-a ;; notice that the point is stuck at 6
> C-xb<enter> ;; switch to "rebox2_bug.el
> M-g g 1714
> C-d ;; uncomment the hack workaround the bug
> C-M-x ;; reevaluated the function
> C-x b<enter> ;; switch to "*scratch*"
> C-aC-aC-aC-a ;; notice that the cursor switches between 1 and 6
>
> --
> Le
>
I was unable to reproduce this. At both of the "C-a C-a C-a" steps, it
switches between 1 and 4 (or 0 and 3 rather).
--
Deniz Dogan
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7946
; Package
emacs
.
(Wed, 02 Feb 2011 05:01:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 7946 <at> debbugs.gnu.org (full text, mbox):
2011/2/2 Le Wang <l26wang <at> gmail.com>:
> Thanks for trying, it should switch between columns 1 and 6 (I should have
> been more specific). the "space twice" step should move the whole comment
> section over by 2 spaces, did this work for you?
Sorry, I read it as C-SPC twice, so I did it wrong.
I can reproduce the behavior that you described.
--
Deniz Dogan
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7946
; Package
emacs
.
(Wed, 02 Feb 2011 08:39:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 7946 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
---------- Forwarded message ----------
From: Deniz Dogan <deniz.a.m.dogan <at> gmail.com>
Date: Wed, Feb 2, 2011 at 1:08 PM
Subject: Re: bug#7946: Referring to a marker changes Emacs' behaviour.
To: Le Wang <l26wang <at> gmail.com>
Cc: 7946 <at> debbugs.gnu.org
2011/2/2 Le Wang <l26wang <at> gmail.com>:
> Thanks for trying, it should switch between columns 1 and 6 (I should have
> been more specific). the "space twice" step should move the whole comment
> section over by 2 spaces, did this work for you?
Sorry, I read it as C-SPC twice, so I did it wrong.
I can reproduce the behavior that you described.
--
Deniz Dogan
--
Le
[Message part 2 (text/html, inline)]
Reply sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
You have taken responsibility.
(Wed, 02 Feb 2011 15:47:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Le Wang <l26wang <at> gmail.com>
:
bug acknowledged by developer.
(Wed, 02 Feb 2011 15:47:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 7946-done <at> debbugs.gnu.org (full text, mbox):
> I found an issue where evaluating this line or not causes Emacs behaviour
> change:
> (format "%s" marked-point)
The patch below appears to fix the problem for me. I've installed it in
the emacs-23 branch.
The problem was that current-column uses a cache to try and speed up
some cases, and the cache was not flushed when exiting
a save-restriction. The workaround you used works because `set-buffer'
flushes the cache and `format' uses set-buffer internally.
Stefan
=== modified file 'src/editfns.c'
--- src/editfns.c 2011-01-02 23:50:46 +0000
+++ src/editfns.c 2011-02-02 15:45:27 +0000
@@ -3347,6 +3347,9 @@
}
}
+ /* Changing the buffer bounds invalidates any recorded current column. */
+ invalidate_current_column ();
+
if (cur)
set_buffer_internal (cur);
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 03 Mar 2011 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 14 years and 112 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.