From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: line-pixel-height beyond eol Date: Mon, 09 Oct 2017 16:31:18 +0300 Message-ID: <83y3okqwgp.fsf@gnu.org> References: <83r2v7lva9.fsf@gnu.org> <20170923.215700.2084440979431338157.tkk@misasa.okayama-u.ac.jp> <83y3p5a71w.fsf@gnu.org> <20171005.185038.2275302121797407783.tkk@misasa.okayama-u.ac.jp> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1507555904 8096 195.159.176.226 (9 Oct 2017 13:31:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 9 Oct 2017 13:31:44 +0000 (UTC) Cc: emacs-devel@gnu.org To: Tak Kunihiro Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 09 15:31:37 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1Y9h-00014k-BM for ged-emacs-devel@m.gmane.org; Mon, 09 Oct 2017 15:31:37 +0200 Original-Received: from localhost ([::1]:57928 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1Y9o-0005Yp-Oz for ged-emacs-devel@m.gmane.org; Mon, 09 Oct 2017 09:31:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36618) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1Y9i-0005Yk-FG for emacs-devel@gnu.org; Mon, 09 Oct 2017 09:31:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1Y9d-00023v-AZ for emacs-devel@gnu.org; Mon, 09 Oct 2017 09:31:38 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58143) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1Y9d-00023r-6w; Mon, 09 Oct 2017 09:31:33 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4957 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e1Y9c-0000ik-J1; Mon, 09 Oct 2017 09:31:33 -0400 In-reply-to: <20171005.185038.2275302121797407783.tkk@misasa.okayama-u.ac.jp> (message from Tak Kunihiro on Thu, 05 Oct 2017 18:50:38 +0900 (JST)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:219300 Archived-At: > Date: Thu, 05 Oct 2017 18:50:38 +0900 (JST) > Cc: emacs-devel@gnu.org, tkk@misasa.okayama-u.ac.jp > From: Tak Kunihiro > > M-x about-emacs > M-<, C-e, C-b > (posn-at-point) => (# 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?