emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-bug-tracker] bug#7946: closed (Referring to a marker changes Emac


From: GNU bug Tracking System
Subject: [Emacs-bug-tracker] bug#7946: closed (Referring to a marker changes Emacs' behaviour.)
Date: Wed, 02 Feb 2011 15:47:01 +0000

Your message dated Wed, 02 Feb 2011 10:54:56 -0500
with message-id <address@hidden>
and subject line Re: bug#7946: Referring to a marker changes Emacs' behaviour.
has caused the GNU bug report #7946,
regarding Referring to a marker changes Emacs' behaviour.
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
7946: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7946
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: Referring to a marker changes Emacs' behaviour. Date: Mon, 31 Jan 2011 14:45:43 +0800 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

Attachment: rebox2_bug.el
Description: Binary data


--- End Message ---
--- Begin Message --- Subject: Re: bug#7946: Referring to a marker changes Emacs' behaviour. Date: Wed, 02 Feb 2011 10:54:56 -0500 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
> 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);
 



--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]