unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alp Aker <alptekin.aker@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 18417@debbugs.gnu.org, Dmitry <dgutov@yandex.ru>
Subject: bug#18417: 24.3.93; posn-at-point confused by fill-column-indicator
Date: Sun, 7 Sep 2014 23:11:35 -0400	[thread overview]
Message-ID: <CACxch4rNSrMXZAm9h_AB+p0k+hpAE3+p_RWHV=zyXxM_GEOVKQ@mail.gmail.com> (raw)
In-Reply-To: <837g1fcpm9.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1038 bytes --]

> 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))))

[-- Attachment #2: Type: text/html, Size: 1323 bytes --]

  parent reply	other threads:[~2014-09-08  3:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-06  9:43 bug#18417: 24.3.93; posn-at-point confused by fill-column-indicator Dmitry
2014-09-07 17:22 ` Eli Zaretskii
2014-09-07 18:55   ` Dmitry Gutov
2014-09-07 19:43     ` Eli Zaretskii
2014-09-07 19:52       ` Alp Aker
2014-09-07 19:56         ` Eli Zaretskii
2014-09-08  3:11   ` Alp Aker [this message]
2014-09-09 14:38     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACxch4rNSrMXZAm9h_AB+p0k+hpAE3+p_RWHV=zyXxM_GEOVKQ@mail.gmail.com' \
    --to=alptekin.aker@gmail.com \
    --cc=18417@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).