[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: line-pixel-height beyond eol
From: |
Eli Zaretskii |
Subject: |
Re: line-pixel-height beyond eol |
Date: |
Mon, 09 Oct 2017 16:31:18 +0300 |
> Date: Thu, 05 Oct 2017 18:50:38 +0900 (JST)
> Cc: address@hidden, address@hidden
> From: Tak Kunihiro <address@hidden>
>
> M-x about-emacs
> M-<, C-e, C-b
> (posn-at-point) => (#<window 55 on *About GNU Emacs*> 2 (152 . 0) 0 nil 2
> (1 . 0) (image :type png :file "splash.png") (0 . 0) (333 . 233))
> (set-window-hscroll nil 28)
> (posn-at-point) => nil
>
> This case, I want to estimate height of a line as height of the image
> thus frame-char-height does not work.
>
> Please give me suggestion to get y location of a cursor on the
> situation!
You can go to end of line and call posn-at-point there, no? Here's a
snippet that works in your case:
M-: (global-set-key [f5] (lambda () (interactive) (save-excursion
(end-of-line) (message "%s" (posn-at-point))))) RET
Then press F5, and you will see what you need, no?