From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 05 00:08:22 2021 Received: (at submit) by debbugs.gnu.org; 5 Feb 2021 05:08:22 +0000 Received: from localhost ([127.0.0.1]:42572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l7tLx-0007pv-LB for submit@debbugs.gnu.org; Fri, 05 Feb 2021 00:08:21 -0500 Received: from lists.gnu.org ([209.51.188.17]:36314) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l7tLt-0007pk-2k for submit@debbugs.gnu.org; Fri, 05 Feb 2021 00:08:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7tLs-0004vP-Sn for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2021 00:08:16 -0500 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]:46701) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l7tLq-00080p-SP for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2021 00:08:16 -0500 Received: by mail-pg1-x52b.google.com with SMTP id r38so3685352pgk.13 for ; Thu, 04 Feb 2021 21:08:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=jQNII3pTiyiK48RyxuSWgGSIgn4ZAw+NF/FG0Ygcw2c=; b=OBnBJ3XebnS53BwbB/wVpMMO1UggTNIDz5GWv5K4ZDJVWr/i8ODV9gZJ9JidPhIJEc TkdgDDkpstbuSnGEmmCuhf9sTt4yUaWWgP1670nolPZPLcdGgbU6IN6CktDqHxP7+rdZ 1JRYElMe/FSr21iLqXFSF2HUi91JMbw0FP3YtKz+XKrrt4AozY6jd6iD/TOqhkmomn5x z+044BQA80wCq1ps/71nJnC8oqMl5JxMoelChHaAw3HprZ37V//mshRphnfBs3EUahNK u59ybjL9NYrVstDkj39M1RrGr1NMZXYvCfKFWJbXkSYuQpUV2mfYae1LTCrA1gZbMUCk 3cpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=jQNII3pTiyiK48RyxuSWgGSIgn4ZAw+NF/FG0Ygcw2c=; b=V85oCwrahcABWZWuv6pAEDCs7UQOyV3pkqhgIjHD5US4LWqFieyhV+miFR9z9RLDPi vH5L0QatNwRT1Hfsn+Huq/IVa/IUNP+r4/kCBKsJh6aAe9m1FTF4k6HeJ4ZeLdqAswsG fdN7P0C1ZVywS/gjstZ01y2B5n00kTHNmmazcPbeAAePFoSIdYyFxxcNqwV7aJj9OWdO yB7DGW0Q3cqyQwHmJ33waH+Wa508OgGGGq8K3DxUrC61WrkPcyjUogRnvZquTIC8eDZu ChMQmUnYjx1szsQNHfpFC8XgjkKdFNsi0xOatHXOicvSK5IKCy1aIrQCO040XUV4dSsS jCfQ== X-Gm-Message-State: AOAM532JqD800++yO41XxFXvtIJ7V0jW/pngF7OCh2hXRRTCiRW2LoxA TnyL8G8NnpH9gMkyQsAm7XMSk8/PeCg= X-Google-Smtp-Source: ABdhPJz4bYkHTrxaY9ufbP52m9JxL9UJPM86HI3aobMhq3Wiv2xifKBwBLUxONbn6Ii6aRBqgmrxHQ== X-Received: by 2002:a05:6a00:22d1:b029:1b4:9bb5:724c with SMTP id f17-20020a056a0022d1b02901b49bb5724cmr2687756pfj.63.1612501692794; Thu, 04 Feb 2021 21:08:12 -0800 (PST) Received: from HP (east42-p109.eaccess.hi-ho.ne.jp. [219.121.173.110]) by smtp.gmail.com with ESMTPSA id r14sm8801874pgi.27.2021.02.04.21.08.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 21:08:12 -0800 (PST) From: ynyaaa@gmail.com To: bug-gnu-emacs@gnu.org Subject: 27.1; wrong horizontal scroll with truncate-lines value t Date: Fri, 05 Feb 2021 14:08:06 +0900 Message-ID: <86wnvnm79l.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::52b; envelope-from=ynyaaa@gmail.com; helo=mail-pg1-x52b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) (1) When isearch fails after last match Evaluate the form below and type 'C-s a C-s', then emacs messages 'Failing I-search: a' and the buffer scrolls back left and the current point is out of the window. Type C-s again, and overwrapped search succeeds at the same point, but the matched point is still out of the window. (let ((buf (generate-new-buffer "tmp"))) (switch-to-buffer buf) (setq truncate-lines t) (dotimes (i 100) (insert (format "%d\n" i))) (insert-char ?x 200) (insert ?a) (goto-char (point-min))) (2) When image-toggle-display Evaluate the form below, then the SVG image is displayed. Type 'C-c C-c' to view the source text and type 'C-c C-c' again to view the image, then the buffer keeps scrolled right and the image is hidden out of the window. Type C-a and the image is shown, type 'C-c C-c' to view the source text again, then the buffer keeps scrolled left and the current point is out of the window. (let ((buf (generate-new-buffer "tmp")) (svg "\ \ ")) (switch-to-buffer buf) (setq truncate-lines t) (insert svg) (image-mode)) In GNU Emacs 27.1 (build 1, x86_64-w64-mingw32) of 2020-08-22 built on CIRROCUMULUS Repository revision: 86d8d76aa36037184db0b2897c434cdaab1a9ae8 Repository branch: HEAD Windowing system distributor 'Microsoft Corp.', version 10.0.18363 System Description: Microsoft Windows 10 Pro (v10.0.1909.18363.1316) Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Loading c:/home/yagi/.emacs.d/minimal-init.el (source)... Loading term/bobcat...done Loading c:/home/yagi/.emacs.d/minimal-init.el (source)...done Configured using: 'configure --without-dbus --host=x86_64-w64-mingw32 --without-compress-install 'CFLAGS=-O2 -static'' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY W32NOTIFY ACL GNUTLS LIBXML2 HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS JSON PDUMPER LCMS2 GMP Important settings: value of $LANG: JPN locale-coding-system: cp932 Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t 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 message rmc puny dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils term/bobcat japan-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer 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 composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray 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 threads w32notify w32 lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 49564 9493) (symbols 48 6091 1) (strings 32 16912 1998) (string-bytes 1 523773) (vectors 16 10730) (vector-slots 8 208731 12936) (floats 8 21 314) (intervals 56 225 0) (buffers 1000 11)) From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 06 08:01:46 2021 Received: (at 46316) by debbugs.gnu.org; 6 Feb 2021 13:01:46 +0000 Received: from localhost ([127.0.0.1]:45425 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8NDe-0002Es-5x for submit@debbugs.gnu.org; Sat, 06 Feb 2021 08:01:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8NDc-0002Ea-9v; Sat, 06 Feb 2021 08:01:44 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38736) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l8NDW-0005Wa-2A; Sat, 06 Feb 2021 08:01:38 -0500 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1889 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l8NDQ-0007kT-TJ; Sat, 06 Feb 2021 08:01:34 -0500 Date: Sat, 06 Feb 2021 15:01:39 +0200 Message-Id: <83mtwhnydo.fsf@gnu.org> From: Eli Zaretskii To: ynyaaa@gmail.com In-Reply-To: <86wnvnm79l.fsf@gmail.com> (ynyaaa@gmail.com) Subject: Re: bug#46316: 27.1; wrong horizontal scroll with truncate-lines value t References: <86wnvnm79l.fsf@gmail.com> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 46316 Cc: 46316@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) tags 46316 notabug thanks > From: ynyaaa@gmail.com > Date: Fri, 05 Feb 2021 14:08:06 +0900 > > > (1) When isearch fails after last match > Evaluate the form below and type 'C-s a C-s', then emacs messages > 'Failing I-search: a' and the buffer scrolls back left and the current > point is out of the window. > Type C-s again, and overwrapped search succeeds at the same point, > but the matched point is still out of the window. > > (let ((buf (generate-new-buffer "tmp"))) > (switch-to-buffer buf) > (setq truncate-lines t) > (dotimes (i 100) (insert (format "%d\n" i))) > (insert-char ?x 200) > (insert ?a) > (goto-char (point-min))) > > (2) When image-toggle-display > Evaluate the form below, then the SVG image is displayed. > Type 'C-c C-c' to view the source text and type 'C-c C-c' again to view > the image, then the buffer keeps scrolled right and the image is hidden > out of the window. > Type C-a and the image is shown, type 'C-c C-c' to view the source text > again, then the buffer keeps scrolled left and the current point is out > of the window. > > (let ((buf (generate-new-buffer "tmp")) > (svg " xmlns=\"http://www.w3.org/2000/svg\"\ > xmlns:xlink=\"http://www.w3.org/1999/xlink\">\ > \ > ")) > (switch-to-buffer buf) > (setq truncate-lines t) > (insert svg) > (image-mode)) I don't think this behavior is a bug. We only change the hscroll of a window when point moves, and in these two scenarios it doesn't move. I see no reason to assume that the user will necessarily want to have the window scroll, instead of keeping it at its current horizontal scroll. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 07 10:29:12 2021 Received: (at 46316) by debbugs.gnu.org; 7 Feb 2021 15:29:12 +0000 Received: from localhost ([127.0.0.1]:48498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8lzr-0003f6-UC for submit@debbugs.gnu.org; Sun, 07 Feb 2021 10:29:12 -0500 Received: from mail-pj1-f48.google.com ([209.85.216.48]:38359) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8lzq-0003es-Ez for 46316@debbugs.gnu.org; Sun, 07 Feb 2021 10:29:10 -0500 Received: by mail-pj1-f48.google.com with SMTP id l18so7345043pji.3 for <46316@debbugs.gnu.org>; Sun, 07 Feb 2021 07:29:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:subject:in-reply-to:from:date:message-id:mime-version; bh=FjoBFc2qCJ/0xU+cL0hMDmLaa4Lc8BHDOrAOmAOGlXY=; b=snxXYXXQdIMimsLGDP15TWBKTOhrcC+ZjYoeH6s+6ceUb0JYEp2MRoIeXW9GI5BIhO wYj8ESMjcrhRKrMC4glTgWOkW7nXU/rEXNw0HZV3JxSmh2vKBJeXAJN9Gg1ql9nCnL5t G2ttUUpwfTge7ARtkRQyF3WEiTCZ0mM6J/ff6hFWOIvPMZqiM4J9jaLW6ZMo7AO71TPk 0JCAhm/dByrxsOwaaUnb4nkuxjOPpQB2NUBnHw5RHzzbh9FLqvw3xgAjlUc1588H8FM+ rmjK3LUtt93ZIpecVTxY8JdiN8xrFCjF0/7HPCB9BhtIQ+fd0ZJNV61Wc81rprKD026e FXmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:subject:in-reply-to:from:date:message-id :mime-version; bh=FjoBFc2qCJ/0xU+cL0hMDmLaa4Lc8BHDOrAOmAOGlXY=; b=rBWbDulo8SZssw66jb9LRYvYA0py0FcrAccST5fzGMev02vUzOHuOSQRHn3ZG3sG5A fPJ+61uL7GAotgRb+GDwL+PRusoz/ifd/zchNdhLTMPZYt823lCHD9qpPslxmGklfp6q 9w/8Eat7Re72Zw2U7/5i5m21ym/ADt4QuBwdXziWJ/UA0/YqGS9eM8M7GVoLdPbdDs1r zaztUyrDPnCmi2UtLSlRNjliT3DsE19svWG/JDjGRKoGOfXzlAbpbYm94FObkZz+RuNa NDqzfYQmQVWA5J9bV9kR8JlPur7CnfG1oT6eao7xrt1Y+CAWr0M8951FkdAZCURDtUGA olcA== X-Gm-Message-State: AOAM530+RUHjJmExxDAwjNxL3u0GTmvq8eGMjzEjoRo4qdrXZK903mjF tdy1lmD4uRtWzXtxSFaz/k7m+klt69Y= X-Google-Smtp-Source: ABdhPJxhATe7QfrjUlMkhn9B2iIMrpSUXOC033R0YJW+Q9S5aSzUIoB+3gT6lA3XIyYv+HwU8pwtkg== X-Received: by 2002:a17:90a:9f94:: with SMTP id o20mr13257014pjp.209.1612711744272; Sun, 07 Feb 2021 07:29:04 -0800 (PST) Received: from HP (east42-p109.eaccess.hi-ho.ne.jp. [219.121.173.110]) by smtp.gmail.com with ESMTPSA id 9sm6001865pfw.48.2021.02.07.07.29.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Feb 2021 07:29:03 -0800 (PST) To: Eli Zaretskii Subject: Re: bug#46316: 27.1; wrong horizontal scroll with truncate-lines value t In-Reply-To: <83mtwhnydo.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 06 Feb 2021 15:01:39 +0200") From: ynyaaa@gmail.com Date: Mon, 08 Feb 2021 00:28:57 +0900 Message-ID: <868s7zew1y.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 46316 Cc: 46316@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > tags 46316 notabug > thanks > >> From: ynyaaa@gmail.com >> Date: Fri, 05 Feb 2021 14:08:06 +0900 >> >> >> (1) When isearch fails after last match >> Evaluate the form below and type 'C-s a C-s', then emacs messages >> 'Failing I-search: a' and the buffer scrolls back left and the current >> point is out of the window. >> Type C-s again, and overwrapped search succeeds at the same point, >> but the matched point is still out of the window. >> >> (let ((buf (generate-new-buffer "tmp"))) >> (switch-to-buffer buf) >> (setq truncate-lines t) >> (dotimes (i 100) (insert (format "%d\n" i))) >> (insert-char ?x 200) >> (insert ?a) >> (goto-char (point-min))) >> >> (2) When image-toggle-display >> Evaluate the form below, then the SVG image is displayed. >> Type 'C-c C-c' to view the source text and type 'C-c C-c' again to view >> the image, then the buffer keeps scrolled right and the image is hidden >> out of the window. >> Type C-a and the image is shown, type 'C-c C-c' to view the source text >> again, then the buffer keeps scrolled left and the current point is out >> of the window. >> >> (let ((buf (generate-new-buffer "tmp")) >> (svg "> xmlns=\"http://www.w3.org/2000/svg\"\ >> xmlns:xlink=\"http://www.w3.org/1999/xlink\">\ >> \ >> ")) >> (switch-to-buffer buf) >> (setq truncate-lines t) >> (insert svg) >> (image-mode)) > > I don't think this behavior is a bug. We only change the hscroll of a > window when point moves, and in these two scenarios it doesn't move. > I see no reason to assume that the user will necessarily want to have > the window scroll, instead of keeping it at its current horizontal > scroll. In the case of isearch, the hscroll is changed without point motion when isearch fails. In the case of image-toggle-display, the hscroll is changed without point motion when typing 'C-c C-c' for the first time. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 07 10:35:00 2021 Received: (at 46316) by debbugs.gnu.org; 7 Feb 2021 15:35:00 +0000 Received: from localhost ([127.0.0.1]:48512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8m5U-0003p6-G9 for submit@debbugs.gnu.org; Sun, 07 Feb 2021 10:35:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8m5S-0003or-EQ for 46316@debbugs.gnu.org; Sun, 07 Feb 2021 10:34:58 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59923) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l8m5M-0006OX-Gx; Sun, 07 Feb 2021 10:34:52 -0500 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4672 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l8m5G-0003l4-0B; Sun, 07 Feb 2021 10:34:51 -0500 Date: Sun, 07 Feb 2021 17:34:58 +0200 Message-Id: <83mtwfnb6l.fsf@gnu.org> From: Eli Zaretskii To: ynyaaa@gmail.com In-Reply-To: <868s7zew1y.fsf@gmail.com> (ynyaaa@gmail.com) Subject: Re: bug#46316: 27.1; wrong horizontal scroll with truncate-lines value t References: <868s7zew1y.fsf@gmail.com> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 46316 Cc: 46316@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Cc: 46316@debbugs.gnu.org > From: ynyaaa@gmail.com > Date: Mon, 08 Feb 2021 00:28:57 +0900 > > > I don't think this behavior is a bug. We only change the hscroll of a > > window when point moves, and in these two scenarios it doesn't move. > > I see no reason to assume that the user will necessarily want to have > > the window scroll, instead of keeping it at its current horizontal > > scroll. > > In the case of isearch, the hscroll is changed without point motion > when isearch fails. Yes, because the focus changes into the minibuffer, where we show the failure message. > In the case of image-toggle-display, the hscroll is changed without > point motion when typing 'C-c C-c' for the first time. Yes, and for a similar good reason. I don't really understand the insistence: you can easily cause the window to auto-scroll if you move point by one character. Emacs cannot possibly guess which part of the display is more important for the user in situations like this. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 07 13:54:45 2021 Received: (at 46316) by debbugs.gnu.org; 7 Feb 2021 18:54:45 +0000 Received: from localhost ([127.0.0.1]:48795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8pCm-0006fP-Sw for submit@debbugs.gnu.org; Sun, 07 Feb 2021 13:54:45 -0500 Received: from mail-pj1-f49.google.com ([209.85.216.49]:40654) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8pCk-0006fB-Ll for 46316@debbugs.gnu.org; Sun, 07 Feb 2021 13:54:43 -0500 Received: by mail-pj1-f49.google.com with SMTP id z9so7514525pjl.5 for <46316@debbugs.gnu.org>; Sun, 07 Feb 2021 10:54:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:subject:in-reply-to:from:date:message-id:mime-version; bh=sNigeWU16djA/Yc5GztHJWY2D788yX9wy4ck5fpv+oQ=; b=D3wuJRp9vcWMqRYOCXufCLPVyOFkaDe8o1chqTfOP+o1Keiz2Qsf4ooF/GeTnfoa19 B/DwGDP993bgsoobvuRloyVL6/Z8fzJEdcerU7cW3H0+MV0jRzwvr+3xz0C4rIROfo22 W48f0fYJg4eVkuoXx9llnTNVhuhIIsYrzQAaqtS6hXLol/lxcdhm7AWcPlDj5ry5Y/KP 0CauVRCDI8drVvg42mwhmqaF/V6coLuZff4qjQvonYJO6ilJOXX+IgC2VTKoWm2lKAPe h8yjaH8/pU1fNPdtlilHQcoYtbtHI0uia5aCs9H+bh1vmEm5DYYtQXWdr+STHuitDExe uqTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:subject:in-reply-to:from:date:message-id :mime-version; bh=sNigeWU16djA/Yc5GztHJWY2D788yX9wy4ck5fpv+oQ=; b=EdwnzIpNhLFnKKbocrinuvNwzrc8hLTZRQejoHg804zvJ6X4Ir4gh7SqKmAbcC+6V7 8YiYhzonzA582CHxk86zdLDgTQuCeGWExMpM+fZvwl4DYq0/aQFVeaIPHxdXApLbBCUD goxWiCAwkCigRWK9rBiheqq8kRQ4wOOWbx4VSC8ZwHdm0rXV5h/z2yrmhtTl/A05Qs9A KShsIZmDud/ob53tSGHoiZuTtqyaPkffjhLAqDYXOVnAsnYabwj/qXy4ShHsE1jtpDPw HqM6aIGm61iMvD8eitBQAmokvR1/FY0ZMkXrt+2AjCkhfMrhEmhfppoHxMC85TwB+Feu ODjw== X-Gm-Message-State: AOAM531s+KtEkSjItBrw26oft+4wzkB1F7y1Ha89UWzSVjxh7K2fCR0a wD03YeFU4jOnteHuCEULlkJhgq82TAM= X-Google-Smtp-Source: ABdhPJyMuJETiJjKaRQrbTe2iizfokLQT6GYT2FHHNNP9cYMUoR8Ug15nS2potizcDFBbIdrNpIJRA== X-Received: by 2002:a17:90a:7e8d:: with SMTP id j13mr13206050pjl.37.1612724076607; Sun, 07 Feb 2021 10:54:36 -0800 (PST) Received: from HP (east42-p109.eaccess.hi-ho.ne.jp. [219.121.173.110]) by smtp.gmail.com with ESMTPSA id j3sm6937403pgk.24.2021.02.07.10.54.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Feb 2021 10:54:36 -0800 (PST) To: Eli Zaretskii Subject: Re: bug#46316: 27.1; wrong horizontal scroll with truncate-lines value t In-Reply-To: <83mtwfnb6l.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 07 Feb 2021 17:34:58 +0200") From: ynyaaa@gmail.com Date: Mon, 08 Feb 2021 03:54:32 +0900 Message-ID: <86tuqn3dzr.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 46316 Cc: 46316@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> Cc: 46316@debbugs.gnu.org >> From: ynyaaa@gmail.com >> Date: Mon, 08 Feb 2021 00:28:57 +0900 >> >> > I don't think this behavior is a bug. We only change the hscroll of a >> > window when point moves, and in these two scenarios it doesn't move. >> > I see no reason to assume that the user will necessarily want to have >> > the window scroll, instead of keeping it at its current horizontal >> > scroll. >> >> In the case of isearch, the hscroll is changed without point motion >> when isearch fails. > > Yes, because the focus changes into the minibuffer, where we show the > failure message. > >> In the case of image-toggle-display, the hscroll is changed without >> point motion when typing 'C-c C-c' for the first time. > > Yes, and for a similar good reason. When emacs misses the appropriate hscroll, typing 'M-: t RET' changes the forcus into the minibuffer temporally, but does not change the hscroll of the original buffer. > I don't really understand the insistence: you can easily cause the > window to auto-scroll if you move point by one character. Emacs > cannot possibly guess which part of the display is more important for > the user in situations like this. I only want auto-hscroll-mode to scroll buffer automatically. Otherwise I will be very confused. If a searched string is not displayed in the window, I might think the searched string does not exist in the buffer. If an image is hidden, I might think the image is a solid color same as the emacs background color. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 07 14:10:13 2021 Received: (at 46316) by debbugs.gnu.org; 7 Feb 2021 19:10:13 +0000 Received: from localhost ([127.0.0.1]:48836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8pRl-000758-9A for submit@debbugs.gnu.org; Sun, 07 Feb 2021 14:10:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46108) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8pRk-00074s-E3 for 46316@debbugs.gnu.org; Sun, 07 Feb 2021 14:10:12 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35612) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l8pRc-0008Qo-He; Sun, 07 Feb 2021 14:10:06 -0500 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2503 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l8pRb-0000BZ-R8; Sun, 07 Feb 2021 14:10:04 -0500 Date: Sun, 07 Feb 2021 21:10:15 +0200 Message-Id: <835z33n17s.fsf@gnu.org> From: Eli Zaretskii To: ynyaaa@gmail.com In-Reply-To: <86tuqn3dzr.fsf@gmail.com> (ynyaaa@gmail.com) Subject: Re: bug#46316: 27.1; wrong horizontal scroll with truncate-lines value t References: <86tuqn3dzr.fsf@gmail.com> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 46316 Cc: 46316@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Cc: 46316@debbugs.gnu.org > From: ynyaaa@gmail.com > Date: Mon, 08 Feb 2021 03:54:32 +0900 > > I only want auto-hscroll-mode to scroll buffer automatically. It does, when you give it enough information that it should. When your input focus is in another window (the mini-window in the case of C-s), I think it would be strange for Emacs to auto-scroll some other window. > If a searched string is not displayed in the window, I might think the > searched string does not exist in the buffer. The searched string _is_ displayed, when you first find it. > If an image is hidden, I might think the image is a solid color same as > the emacs background color. Just move the cursor and you will see it. Sorry, I see no problem here, certainly not something that would justify complicated triggers for redisplaying a window. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 12 10:41:34 2021 Received: (at 46316) by debbugs.gnu.org; 12 Feb 2021 15:41:34 +0000 Received: from localhost ([127.0.0.1]:32829 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAaZa-0004Ax-3x for submit@debbugs.gnu.org; Fri, 12 Feb 2021 10:41:34 -0500 Received: from mail-pj1-f49.google.com ([209.85.216.49]:34715) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAaZV-0004Ah-KA for 46316@debbugs.gnu.org; Fri, 12 Feb 2021 10:41:32 -0500 Received: by mail-pj1-f49.google.com with SMTP id my11so503181pjb.1 for <46316@debbugs.gnu.org>; Fri, 12 Feb 2021 07:41:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:subject:in-reply-to:from:date:message-id:mime-version; bh=ahCdD4RfFQm5u9wEj2gUJRlPBquiXLy3nqEXalM+T/s=; b=vaOyJQR57Sbh+1TBrOC3DsN/1SolN3X2+XZ/rYeloq2Xe9Gn5x/p1XkVbgXQlbaWjF YPCdOqporGwqd49rBfEwkREfYumfG9zVKhTI+Kd+Up99FfMWZbrr5wYssJeI5M4IwwCG Oxmswu1oJ5OrMKzR071jj6yRfOyIWMDzMVjbHmlgbznZHU1XkGmdAAZAQVGtrkaD0a2N jM6gn4XWocsiahlHxVAFOMEpZDEwxSus9VswRsfFok9NnE3IFR8BpbKx3S1rC5wUQyGV O6zXJVDUIbq9FC/U5YFJ52JgR+iH8invyOWYGG8hGbM/4SliUNowxXukiKrFOsJofefN 4h+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:subject:in-reply-to:from:date:message-id :mime-version; bh=ahCdD4RfFQm5u9wEj2gUJRlPBquiXLy3nqEXalM+T/s=; b=RlJvvd4aLZDq/JCxZm3E85FKbX69NsjnWj2BgzkMyuGpCv4FJTxLoWxMdr2mPM97E5 l1EK9sy7nzqChuK6Zzg+uio8vd0MwDP7WarPtAUxbdD0btkocTneIzfKCKhB5/bRroCu UWXene6Zxf+fVX/+VV88rwt/yuBYV2aaBHF9LlBV3RPAwGqbG9pz6LNshpcsFVir4iWz j4tDoY/Gh2rez8Cjx1xLCx7IKc/tQ4+ih/vwyCiYkxeHrTpzaeqqWPCOylf+1U803ZHX p2EiQKRzCLSicoT0AcQ3rJKwSP4LD17Bh5v7hepi3XVCB8IxRxNOdph6C6WzqoyIXmx4 qWGQ== X-Gm-Message-State: AOAM532rGk80yCbp2tlPba1auFFRVnNEuiXgSnDz9yOtCbcrwvAd6t7J eG9z4Az3d8GwtMXKSPJwYKeIw0b2OVA= X-Google-Smtp-Source: ABdhPJyKjyBBU+eEcUDnzkmpXz0cCj+5uL2tx0/2oK2ajB2KkiuETp4DCt5GElxb2plJ7tAs+IdNLg== X-Received: by 2002:a17:902:cec3:b029:de:901b:d0be with SMTP id d3-20020a170902cec3b02900de901bd0bemr3397723plg.26.1613144483446; Fri, 12 Feb 2021 07:41:23 -0800 (PST) Received: from HP (east42-p109.eaccess.hi-ho.ne.jp. [219.121.173.110]) by smtp.gmail.com with ESMTPSA id s126sm10133135pfs.81.2021.02.12.07.41.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Feb 2021 07:41:23 -0800 (PST) To: Eli Zaretskii Subject: Re: bug#46316: 27.1; wrong horizontal scroll with truncate-lines value t In-Reply-To: <835z33n17s.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 07 Feb 2021 21:10:15 +0200") From: ynyaaa@gmail.com Date: Sat, 13 Feb 2021 00:41:18 +0900 Message-ID: <86wnvds38h.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 46316 Cc: 46316@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> Cc: 46316@debbugs.gnu.org >> From: ynyaaa@gmail.com >> Date: Mon, 08 Feb 2021 03:54:32 +0900 >> >> I only want auto-hscroll-mode to scroll buffer automatically. > > It does, when you give it enough information that it should. When > your input focus is in another window (the mini-window in the case of > C-s), I think it would be strange for Emacs to auto-scroll some other > window. > >> If a searched string is not displayed in the window, I might think the >> searched string does not exist in the buffer. > > The searched string _is_ displayed, when you first find it. > >> If an image is hidden, I might think the image is a solid color same as >> the emacs background color. > > Just move the cursor and you will see it. > > Sorry, I see no problem here, certainly not something that would > justify complicated triggers for redisplaying a window. I investigated some more. #'isearch-update tries to control the hsrcoll using #'pos-visible-in-window-group-p. Under the folloing conditions, it returns coordinates as if the point is at the beginning of a virtual next line. (1) the point is the end of the buffer. (2) the buffer does not end with a newline. (3) the last line is displayed in the window. (4) the last line is truncated. So the calculation is wrong and the hscroll becomes inappropriate. With a different reason, if isearch started with a large hscroll and the last match is near the beginning of a line, the hscroll becomes inapropriate. For example, evaluate the form below, and type 'C-s a C-s', then the current point is hidden to the left of the window. This is because #'isearch-update only checks whether the point is to the right of the window and does not check whether the point is to the left of the window. (let ((buf (generate-new-buffer "tmp"))) (switch-to-buffer buf) (setq truncate-lines t) (insert-char ?x 100) (save-excursion (insert-char ?\n 100) (insert ?a))) Regarding image-mode, a simpler example of the bug is written as below. The hscroll does not change when the buffer is changed. Image display, window focus or message is not related. (let ((buf (generate-new-buffer "tmp"))) (switch-to-buffer buf) (setq truncate-lines t) (dotimes (i 200) (insert (format ":%03d" i)) (when (= 0 (% (1+ i) 100)) (insert ?\n))) (forward-char -1) (sit-for 1) (set-window-hscroll nil (window-hscroll)) (save-excursion (forward-char -100) (insert-char ?\n 10) )) From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 13 10:30:51 2021 Received: (at 46316) by debbugs.gnu.org; 13 Feb 2021 15:30:51 +0000 Received: from localhost ([127.0.0.1]:34855 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAwsl-0005k8-Fh for submit@debbugs.gnu.org; Sat, 13 Feb 2021 10:30:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAwsk-0005jw-Hn for 46316@debbugs.gnu.org; Sat, 13 Feb 2021 10:30:50 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51400) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAwsf-0001NW-8u; Sat, 13 Feb 2021 10:30:45 -0500 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2225 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lAwsY-000159-G6; Sat, 13 Feb 2021 10:30:39 -0500 Date: Sat, 13 Feb 2021 17:30:38 +0200 Message-Id: <83czx4c7dt.fsf@gnu.org> From: Eli Zaretskii To: ynyaaa@gmail.com In-Reply-To: <86wnvds38h.fsf@gmail.com> (ynyaaa@gmail.com) Subject: Re: bug#46316: 27.1; wrong horizontal scroll with truncate-lines value t References: <86wnvds38h.fsf@gmail.com> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 46316 Cc: 46316@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Cc: 46316@debbugs.gnu.org > From: ynyaaa@gmail.com > Date: Sat, 13 Feb 2021 00:41:18 +0900 > > #'isearch-update tries to control the hsrcoll using > #'pos-visible-in-window-group-p. > Under the folloing conditions, it returns coordinates as if the point is > at the beginning of a virtual next line. > (1) the point is the end of the buffer. > (2) the buffer does not end with a newline. > (3) the last line is displayed in the window. > (4) the last line is truncated. > So the calculation is wrong and the hscroll becomes inappropriate. Thanks, I wasn't aware isearch called pos-visible-in-window-p. I fixed pos-visible-in-window-p on the master branch in this case, so this part of the report now works correctly. > With a different reason, if isearch started with a large hscroll and the > last match is near the beginning of a line, the hscroll becomes > inapropriate. > For example, evaluate the form below, and type 'C-s a C-s', then the > current point is hidden to the left of the window. > This is because #'isearch-update only checks whether the point is to the > right of the window and does not check whether the point is to the left > of the window. > > (let ((buf (generate-new-buffer "tmp"))) > (switch-to-buffer buf) > (setq truncate-lines t) > (insert-char ?x 100) > (save-excursion > (insert-char ?\n 100) > (insert ?a))) This now also works correctly. > Regarding image-mode, a simpler example of the bug is written as below. > The hscroll does not change when the buffer is changed. > Image display, window focus or message is not related. > > (let ((buf (generate-new-buffer "tmp"))) > (switch-to-buffer buf) > (setq truncate-lines t) > (dotimes (i 200) > (insert (format ":%03d" i)) > (when (= 0 (% (1+ i) 100)) (insert ?\n))) > (forward-char -1) > (sit-for 1) > (set-window-hscroll nil (window-hscroll)) > (save-excursion > (forward-char -100) > (insert-char ?\n 10) > )) Sorry, I don't think I follow: what exactly is the bug here? What did you expect to happen ,and what did actually happen? From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 14 10:43:46 2021 Received: (at 46316) by debbugs.gnu.org; 14 Feb 2021 15:43:46 +0000 Received: from localhost ([127.0.0.1]:36583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lBJYn-0005PD-QP for submit@debbugs.gnu.org; Sun, 14 Feb 2021 10:43:46 -0500 Received: from mail-pf1-f169.google.com ([209.85.210.169]:36844) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lBJYm-0005P0-77 for 46316@debbugs.gnu.org; Sun, 14 Feb 2021 10:43:44 -0500 Received: by mail-pf1-f169.google.com with SMTP id z15so2705125pfc.3 for <46316@debbugs.gnu.org>; Sun, 14 Feb 2021 07:43:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=G/QxXrKv54DhMnV28BNxj/Jj9M7xmu3FxkFf4FDIhVI=; b=YHQL4f2DllyxRet2gOSChsDxG/AG4ya6SzY4IRhI7Sxt/JqNQatYk4m2V4PtbaAmYu LWvm9HpEmsjFxmHCXRQ8tfLPS2cUzoMXvc46Cc4jH6Q0/IcYubJOhkZGuvyQq/3rl1ct H85etBeXwjAGFUh5G7mQz9GxMo6x1d8veUVVO25pE2sNpS2gMDWkTEjwH7kgxO19rDiX pD14Md6EPFchSBQ+1m/9dREzuyWUipYbyWMYQcaMzqyUdNdE/f6uXY/h9uzytSkRGMdw dEe2j25XsG0tiLO5Nof9YuZ0FnIA3utNFxoYWyM+RzDcjXmJKddSsHg7glwTNJ8n+xV6 ydAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=G/QxXrKv54DhMnV28BNxj/Jj9M7xmu3FxkFf4FDIhVI=; b=SlLIXay9113JVdob0KBXz1pET7GyRefPL9Hd29yl6ZaibkkoggM5f1iASbbUcXxOzD WIr6HLLoFj79XZ++4hATywAD6gabk5c24kxOP5BpW468qhE0QkAbdWGVOHZtHCqMPrx7 PMOrhF9xbkGVfSufm4731eug+NiWMKkpFzM19tM7TcER6bpKQC0TJPmnkaRXBmPB1vJ4 vIIxdTBqK7vJGHvWK+sQu62Gt+VdBHma1BwzJBokgDp+y0LyqE9wmbkeMGwKneoYNqHj ylEyIxwGEH0xBe3VnC6tQV9Vpf8qy9nLGdIc0Dij2PbYKyw6H3NGgQChd3D+82C8nM6Z +yHg== X-Gm-Message-State: AOAM5332u8liFseJGiEwICH1gUjIg+k5cie5k9sF+PK03TAs5Vs5wt4/ 7T9t+18k4sbvHzZprbkkU6YfjpQY5JY= X-Google-Smtp-Source: ABdhPJx/Gc49fpH1xFDS/r7Eyoc5zSwT7wYcbLRMLZ/iAPG9LFx1kfvBfkPcNV0ejRWThCwH3iCR3w== X-Received: by 2002:a63:fa51:: with SMTP id g17mr10869276pgk.166.1613317418002; Sun, 14 Feb 2021 07:43:38 -0800 (PST) Received: from HP (east42-p109.eaccess.hi-ho.ne.jp. [219.121.173.110]) by smtp.gmail.com with ESMTPSA id f18sm13783487pjq.53.2021.02.14.07.43.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Feb 2021 07:43:37 -0800 (PST) From: ynyaaa@gmail.com To: Eli Zaretskii Subject: Re: bug#46316: 27.1; wrong horizontal scroll with truncate-lines value t In-Reply-To: <83czx4c7dt.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 13 Feb 2021 17:30:38 +0200") References: <86wnvds38h.fsf@gmail.com> <83czx4c7dt.fsf@gnu.org> Date: Mon, 15 Feb 2021 00:43:32 +0900 Message-ID: <86tuqefye3.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 46316 Cc: 46316@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> Regarding image-mode, a simpler example of the bug is written as below. >> The hscroll does not change when the buffer is changed. >> Image display, window focus or message is not related. >> >> (let ((buf (generate-new-buffer "tmp"))) >> (switch-to-buffer buf) >> (setq truncate-lines t) >> (dotimes (i 200) >> (insert (format ":%03d" i)) >> (when (= 0 (% (1+ i) 100)) (insert ?\n))) >> (forward-char -1) >> (sit-for 1) >> (set-window-hscroll nil (window-hscroll)) >> (save-excursion >> (forward-char -100) >> (insert-char ?\n 10) >> )) > > Sorry, I don't think I follow: what exactly is the bug here? What did > you expect to happen ,and what did actually happen? The expression '(set-window-hscroll nil (window-hscroll))' should not have any effect, but if it is deleted from the form, auto-hscroll-mode works correctly. Not only point motion but also buffer modification should be checked for auto-hscroll-mode. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 14 13:50:28 2021 Received: (at 46316) by debbugs.gnu.org; 14 Feb 2021 18:50:28 +0000 Received: from localhost ([127.0.0.1]:36684 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lBMTU-0003i4-3t for submit@debbugs.gnu.org; Sun, 14 Feb 2021 13:50:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lBMTS-0003ht-D2 for 46316@debbugs.gnu.org; Sun, 14 Feb 2021 13:50:26 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42898) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lBMTN-0006NR-4Z; Sun, 14 Feb 2021 13:50:21 -0500 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4511 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lBMT8-0004pt-Kf; Sun, 14 Feb 2021 13:50:09 -0500 Date: Sun, 14 Feb 2021 20:50:08 +0200 Message-Id: <837dnabi1r.fsf@gnu.org> From: Eli Zaretskii To: ynyaaa@gmail.com In-Reply-To: <86tuqefye3.fsf@gmail.com> (ynyaaa@gmail.com) Subject: Re: bug#46316: 27.1; wrong horizontal scroll with truncate-lines value t References: <86wnvds38h.fsf@gmail.com> <83czx4c7dt.fsf@gnu.org> <86tuqefye3.fsf@gmail.com> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 46316 Cc: 46316@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > From: ynyaaa@gmail.com > Cc: 46316@debbugs.gnu.org > Date: Mon, 15 Feb 2021 00:43:32 +0900 > > >> (let ((buf (generate-new-buffer "tmp"))) > >> (switch-to-buffer buf) > >> (setq truncate-lines t) > >> (dotimes (i 200) > >> (insert (format ":%03d" i)) > >> (when (= 0 (% (1+ i) 100)) (insert ?\n))) > >> (forward-char -1) > >> (sit-for 1) > >> (set-window-hscroll nil (window-hscroll)) > >> (save-excursion > >> (forward-char -100) > >> (insert-char ?\n 10) > >> )) > > > > Sorry, I don't think I follow: what exactly is the bug here? What did > > you expect to happen ,and what did actually happen? > > The expression '(set-window-hscroll nil (window-hscroll))' should not > have any effect That's not true: calling set-window-hscroll inhibits automatic hscrolling, until point moves for some reason. > but if it is deleted from the form, auto-hscroll-mode works > correctly. I think this is expected: the text your recipe adds is not around point, so we don't re-enable auto-hscroll. > Not only point motion but also buffer modification should be checked for > auto-hscroll-mode. If you want this to happen, don't call set-window-hscroll. From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 09 12:59:33 2021 Received: (at 46316-done) by debbugs.gnu.org; 9 Apr 2021 16:59:33 +0000 Received: from localhost ([127.0.0.1]:50777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lUuTl-0001Sj-1y for submit@debbugs.gnu.org; Fri, 09 Apr 2021 12:59:33 -0400 Received: from mail-pf1-f170.google.com ([209.85.210.170]:42803) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lUuTk-0001SV-ET for 46316-done@debbugs.gnu.org; Fri, 09 Apr 2021 12:59:32 -0400 Received: by mail-pf1-f170.google.com with SMTP id w8so1154713pfn.9 for <46316-done@debbugs.gnu.org>; Fri, 09 Apr 2021 09:59:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=lSdvDjWKJe47xNpwLzbYmuZQ1Lcg6sNWjMLDbfjwPKQ=; b=V2CFwkPHARSrNPRtQM1avUiIow7ThtXuHIFaHeGx6AzoK+oS+DYjDXFFg4sO1vDeEO XN8jBS4+3RT0Vs3d2lItcVE5jmrvSywL7ifptmNRxMxZJn1fGGVagANryhZpH/HWgPm9 /FlxCAxTIvcQb5XXLurPhjCcL4sRK0n3LIC6CZiSoIhNYsPX1t3RlXAwUycmD05IWOzk 9egvHuSzDktHbI6nO2NnFRSyGE6ROYUxsjT2ebiB3Qz5MzyIWPymSdxPjo0LXzgQLqxL OkLkv716aRBEEvJ7WjfI687NruLNwm/w1HHFDM4vwWEfXLREvSqyHTpOij/t35XN099t 0LHg== X-Gm-Message-State: AOAM533qvZqQssB5qfg8LO9s0SBA5wbZ0JgjC1xlkGBDPwZQeECi7dzs kOzN0zW9iLECGrtCAjP7L5rGPWIDKIz/B7vr/w7dDePW X-Google-Smtp-Source: ABdhPJwlxWHGotJ2fj6LbJQ9AS4ACynY9CHJ9XrcKT4gOL7nnXCmEtwLi6Isn+3pIudkD/Jd0e3fDxRxDRNu4cnDlWY= X-Received: by 2002:aa7:828f:0:b029:200:6e27:8c8f with SMTP id s15-20020aa7828f0000b02902006e278c8fmr13253357pfm.44.1617987566784; Fri, 09 Apr 2021 09:59:26 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 9 Apr 2021 11:59:26 -0500 From: Stefan Kangas In-Reply-To: <837dnabi1r.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 14 Feb 2021 20:50:08 +0200") References: <86wnvds38h.fsf@gmail.com> <83czx4c7dt.fsf@gnu.org> <86tuqefye3.fsf@gmail.com> <837dnabi1r.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Date: Fri, 9 Apr 2021 11:59:26 -0500 Message-ID: Subject: Re: bug#46316: 27.1; wrong horizontal scroll with truncate-lines value t To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 46316-done Cc: ynyaaa@gmail.com, 46316-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Eli Zaretskii writes: >> From: ynyaaa@gmail.com >> Cc: 46316@debbugs.gnu.org >> Date: Mon, 15 Feb 2021 00:43:32 +0900 >> >> >> (let ((buf (generate-new-buffer "tmp"))) >> >> (switch-to-buffer buf) >> >> (setq truncate-lines t) >> >> (dotimes (i 200) >> >> (insert (format ":%03d" i)) >> >> (when (= 0 (% (1+ i) 100)) (insert ?\n))) >> >> (forward-char -1) >> >> (sit-for 1) >> >> (set-window-hscroll nil (window-hscroll)) >> >> (save-excursion >> >> (forward-char -100) >> >> (insert-char ?\n 10) >> >> )) >> > >> > Sorry, I don't think I follow: what exactly is the bug here? What did >> > you expect to happen ,and what did actually happen? >> >> The expression '(set-window-hscroll nil (window-hscroll))' should not >> have any effect > > That's not true: calling set-window-hscroll inhibits automatic > hscrolling, until point moves for some reason. > >> but if it is deleted from the form, auto-hscroll-mode works >> correctly. > > I think this is expected: the text your recipe adds is not around > point, so we don't re-enable auto-hscroll. > >> Not only point motion but also buffer modification should be checked for >> auto-hscroll-mode. > > If you want this to happen, don't call set-window-hscroll. This was tagged notabug and Eli explained that the behavior is expected. The bug that was here has been fixed. There also has been no further update within 7 weeks. I'm therefore closing this bug report. From unknown Mon Aug 18 18:01:21 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 08 May 2021 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator