GNU bug report logs -
#18417
24.3.93; posn-at-point confused by fill-column-indicator
Previous Next
Full log
Message #23 received at 18417 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> The recipe in effect invokes undefined behavior in posn-at-point,
> because fci-mode uses a zero-length (a.k.a. "empty") overlay to
> place, in a very convoluted way, a stretch of whitespace followed
> by an image, before the newline.
[snip]
> Since the buffer position of the newline is not "covered" by the
> empty overlay, Emacs happily stops when it reaches the newline,
> oblivious to the fact that on the way it produced the stretch
> glyph of a very large width.
I'm not sure it's due to the overlay having zero length. Here's a minimal
recipe that provokes the same behavior using a overlay of length 1
(covering the newline):
(progn
(delete-all-overlays)
(goto-char (point-min))
(insert "\n")
(setq o (make-overlay 1 2)
s (propertize " "
'display '(space :align-to 10)
'cursor t))
(overlay-put o 'before-string s)
(goto-char (point-min))
(setq col (car (posn-col-row (posn-at-point (point)))))
(message (concat "Current column: " (number-to-string col))))
[Message part 2 (text/html, inline)]
This bug report was last modified 10 years and 343 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.