Hallo Michael --
Ar an dara lá déag de mí Meitheamh, scríobh Michael Heinrich:
Suppose the following directory:
--8<---------------cut here---------------start------------->8---
heinrich@elektra ~/tmp/testemacs $ ls -al
total 8
drwxr-xr-x 2 heinrich s+c 4096 Jun 12 13:09 ./
drwxr-x--- 12 heinrich s+c 4096 Jun 12 11:02 ../
-rw-r--r-- 1 heinrich s+c 0 Jun 12 13:09 a
-rw-r--r-- 1 heinrich s+c 0 Jun 12 13:09 b
--8<---------------cut here---------------end--------------->8---
I open this directory in a dired-buffer with "xemacs -q
~/tmp/testemacs", go to file "a" and press return, make some changes,
save file a and switch back to buffer "testemacs". Then the cursors
position is at the end of ".." in dired-buffer "testemacs":
--8<---------------cut here---------------start------------->8---
/home/heinrich/tmp/testemacs:
total 8
drwxr-xr-x 2 heinrich s+c 4096 Jun 12 13:09 .
drwxr-x--- 12 heinrich s+c 4096 Jun 12 11:02 ..<--- cursor-pos
-rw-r--r-- 1 heinrich s+c 1 Jun 12 13:15 a
-rw-r--r-- 1 heinrich s+c 0 Jun 12 13:09 a~
-rw-r--r-- 1 heinrich s+c 0 Jun 12 13:09 b
--8<---------------cut here---------------end--------------->8---
I do expect that the cursors position would not have changed, i.e. would
be on file "a".
The behaviour seems to be independent of the locale. I tested with "C",
en_US.utf8 and de_DE.utf8.
Any hints?
This was introduced by Ben with his window.c change in
https://bitbucket.org/xemacs/xemacs/commits/047d37eb70d70f43803 , to add
window-specific caches for point.
The dired code updates the entry for the file correctly on saving, deleting
the old entry (and in passing moving the marker caching point to the
beginning of the deleted range), inserting the new entry, and moving point
to the file name. The window-specific cache entry marker remains at the
beginning of the deleted range, and when the buffer redisplays in the same
window, point is set from this window-specific cache entry marker.
There’s no obvious quick solution to the bug. A longer-term solution is to
implement a replacement primitive in insdel.c, as GNU have, and use it in
dired. This would have advantages for the coding-system code too.
--
‘Liston operated so fast that he once accidentally amputated an assistant’s
fingers along with a patient’s leg, […] The patient and the assistant both
died of sepsis, and a spectator reportedly died of shock, resulting in the
only known procedure with a 300% mortality.’ (Atul Gawande, NEJM, 2012)
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta