[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Erc-discuss] bug in erc-stamp.el
From: |
John J Foerch |
Subject: |
[Erc-discuss] bug in erc-stamp.el |
Date: |
Sun, 01 Oct 2006 00:21:18 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Hello,
I found a bug concerning the width of the erc-timestamp fields in erc-stamp.
To see the bug:
1. Enable erc-timestamp-mode.
2. (setq erc-insert-timestamp-function 'erc-insert-timestamp-right).
3. Then place point in column 0 after a line that contains a timestamp.
Press up (previous-line), and point goes to the end of the text on the
previous line instead of staying in column 0.
I believe this is because the erc-timestamp field includes the newline
character at the end of the line. Thus, when point is in column 0 on the
following line, and a movement command is issued, point is already effectively
inside the erc-timestamp field, and it is inhibited from moving past the left
boundary of the field.
I attached a patch to exclude the newline from the erc-timestamp field. Note
that the newline must still be 'intangible in order to achieve the correct
effect with point movement. I wonder though at whether this is a wise use of
fields, given how they affect point movement. If you set
erc-timestamp-intangible to nil, the existence of a field affects the movement
of point strangely.
--John
Index: erc-stamp.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/erc/erc-stamp.el,v
retrieving revision 1.6
diff -r1.6 erc-stamp.el
269,270c269,270
< (erc-put-text-property from (1+ (point)) 'field 'erc-timestamp)
< (erc-put-text-property from (1+ (point)) 'rear-nonsticky t)
---
> (erc-put-text-property from (point) 'field 'erc-timestamp)
> (erc-put-text-property from (point) 'rear-nonsticky t)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Erc-discuss] bug in erc-stamp.el,
John J Foerch <=