From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yasushi SHOJI Newsgroups: gmane.emacs.devel Subject: position of line moves depending on visible chars Date: Sun, 17 Jul 2016 22:31:10 +0900 Message-ID: <877fckl7c1.wl@dns1.atmark-techno.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=ISO-2022-JP X-Trace: ger.gmane.org 1468762344 13770 80.91.229.3 (17 Jul 2016 13:32:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 17 Jul 2016 13:32:24 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 17 15:32:06 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bOmAu-0000pd-3v for ged-emacs-devel@m.gmane.org; Sun, 17 Jul 2016 15:32:04 +0200 Original-Received: from localhost ([::1]:41634 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bOmAt-0005Nj-7Y for ged-emacs-devel@m.gmane.org; Sun, 17 Jul 2016 09:32:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bOmAI-0005MK-QK for emacs-devel@gnu.org; Sun, 17 Jul 2016 09:31:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bOmAC-0001yZ-Of for emacs-devel@gnu.org; Sun, 17 Jul 2016 09:31:25 -0400 Original-Received: from p654789.hkidff01.ap.so-net.ne.jp ([121.101.71.137]:42339 helo=gw.atmark-techno.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bOmAC-0001xz-8k for emacs-devel@gnu.org; Sun, 17 Jul 2016 09:31:20 -0400 Original-Received: from mail-pf0-f200.google.com (mail-pf0-f200.google.com [209.85.192.200]) by gw.atmark-techno.com (Postfix) with ESMTPS id 97BA9201E3 for ; Sun, 17 Jul 2016 22:31:14 +0900 (JST) Original-Received: by mail-pf0-f200.google.com with SMTP id e189so320606334pfa.2 for ; Sun, 17 Jul 2016 06:31:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:message-id:from:to:subject:user-agent :mime-version; bh=tOyRE+D1g3LT6ePgTkOwN7UFRys10+uWbJl6naPqUbg=; b=iycsqImIU1JpVpVvqdjbpBohltWR8T5vWmA7iVM57qZ1trFti18+G6oKAL08sDa9O4 UGtOUry/uyUXa79B878gLOWGq7JSlA1/O/76DbRFO8rvMzxJldWcWhihS0c11NJEJ5JZ x8GOAwcW7q5W5QsxiI5Wp3qJmUQ4mzW17fTb5gUY1q5Q+uyHerdFeXzemHkXJd0rkAka HG2Q/uIV6ub9Z/h0o4LhnmjOEkjvmO62ezzba0aGqdD9aCusWSOokYN43g14TjcuLuEN Lyix54Z1sV1j7oM0+i248gJbV43t4coALMao7pzDIeBMPgI0GEowarHNimpW97DOWjbQ iuGg== X-Gm-Message-State: ALyK8tKrb3YQxkYH3L2Q6DZiDI84DhahyeUqNiklp+1yimgWY9L4DkI5H4Tapd9wss6dfqx5M1VGOAea+ZsePqBt8uQqu8G5nPsRkygx8XvWnp2JYXItVIhDJTQBqzDj4n6rK6IW51c= X-Received: by 10.98.130.137 with SMTP id w131mr38054923pfd.5.1468762273305; Sun, 17 Jul 2016 06:31:13 -0700 (PDT) X-Received: by 10.98.130.137 with SMTP id w131mr38054896pfd.5.1468762273062; Sun, 17 Jul 2016 06:31:13 -0700 (PDT) Original-Received: from leno.local-network (ec2-176-32-85-91.ap-northeast-1.compute.amazonaws.com. [176.32.85.91]) by smtp.gmail.com with ESMTPSA id i137sm5490293pfe.64.2016.07.17.06.31.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Jul 2016 06:31:12 -0700 (PDT) User-Agent: Wanderlust/2.15.9 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 121.101.71.137 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:205773 Archived-At: Hi all, I'm sending this to ML instead of creating a bug report since I'm not sure a) I can describe what I'm seeing well enough, b) whether it's a feature or a bug. It's annoying enough to write a report, though. Git shows me that the commit ba5f83d is the tipping point. I'm seeing the position of a text line in an Emacs buffer moves up and down depending on chars in the visible area. Let's say I'm running my Emacs on a system with two different fonts, each of which has different height in the buffer. In my case they are Japanese chars and ASCII chars. To reproduce this, put the following contents in an Emacs buffer and make the width of the window narrow enough, so that the last long line does not fit in the window. あ ああ あああ ああああ あああああ ああああああaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa Enable truncate line (M-x toggle-truncate-lines) so the longest line does not fold at the end. Now, put your cursor at the last long line and do C-a / C-e to move back and forth. The position of the last line moves up and down a few pixels depending on how much "あ" is visible/hidden. You can put more "あ" vertically at the point-min and you see line moves more. If "あ" is not tall enough, pick one of chars from HELLO buffer and replace with it. I'm using Emacs-25 branch (80e2044a7f19719720d330e2796c9dfe5471e100) and this is not affect by -Q option, but rather height of fonts. The master branch behaves as 25. Emacs 24 works just fine. Git bisect points at: > ba5f83dfe5dea1b9dd3fca5d21384afc92cd2060 is the first bad commit > commit ba5f83dfe5dea1b9dd3fca5d21384afc92cd2060 > Author: Eli Zaretskii > Date: Sat May 30 12:33:08 2015 +0300 > > Fix display of cursor at end of empty lines > > * src/xdisp.c (normal_char_ascent_descent): Accept additional > argument: the character to use for metrics in case the font > declares too large ascent and descent values. Add 1 pixel to > ascent and descent values. > (normal_char_height): Accept additional argument: the character to > use for metrics in case the font declares too large height value. > Call normal_char_ascent_descent instead of doing calculations for > a different default character. > (estimate_mode_line_height, handle_single_display_spec) > (calc_pixel_width_or_height, produce_stretch_glyph) > (calc_line_height_property, produce_glyphless_glyph): All callers > changed. > (append_space_for_newline): Make sure the space glyph produced at > end of line has correct ascent and descent values, and the glyph > row has correct height, even when it's empty. > > :040000 040000 f16e7827c624deeeeac0a92497ed45c9088ca6a1 8bd29005315cbad4d465ae1f62a001f27acf4889 M src Here is my Emacs info: In GNU Emacs 25.0.95.1 (x86_64-pc-linux-gnu, GTK+ Version 3.20.6) of 2016-07-11 built on leno Repository revision: 658daf93e295dd00048d15001335f58f91e679f6 Windowing system distributor 'The X.Org Foundation', version 11.0.11803000 System Description: Debian GNU/Linux unstable (sid) Configured features: XPM JPEG TIFF GIF PNG SOUND DBUS GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 Important settings: value of $LC_COLLATE: C value of $LC_TIME: en_US.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: diff-auto-refine-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug thai-util thai-word lao-util vc-git diff-mode grep compile rx vc-dir ewoc vc vc-dispatcher view eieio-opt speedbar imenu sb-image ezimage org-element org-rmail org-mhe org-irc org-info org-gnus org-docview doc-view subr-x jka-compr image-mode org-bibtex bibtex org-bbdb org-w3m org org-macro org-footnote org-pcomplete pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint comint ansi-color ob-core ob-eval org-compat advice org-macs org-loaddefs find-func cal-menu calendar cal-loaddefs gnus-sum gnus-group mm-url gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source imap tls gnutls utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range gnus-win gnus message dired desktop frameset edmacro kmacro format-spec rfc822 mml url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse auth-source eieio byte-opt bytecomp byte-compile cconv eieio-core url-vars mm-view mml-smime smime dig mailcap mml-sec password-cache epg cl-extra epg-config mm-decode cl-seq mm-bodies mm-encode mail-parse rfc2231 mailabbrev easy-mmode sendmail mailheader gnus-ems ring nnheader gnus-util gmm-utils rmail dframe rfc2047 rfc2045 ietf-drums mail-utils mm-util help-fns help-mode derived easymenu mail-prsvr wid-edit cl cl-macs inline cl-loaddefs cl-lib gv time-date mule-util pcase tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 957739 124263) (symbols 48 50455 0) (miscs 40 705 517) (strings 32 78140 7017) (string-bytes 1 2789002) (vectors 16 14564) (vector-slots 8 683038 41376) (floats 8 475 331) (intervals 56 1749 375) (buffers 976 29) (heap 1024 67545 1888)) -- yashi