From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: ynyaaa@gmail.com Newsgroups: gmane.emacs.bugs Subject: bug#46316: 27.1; wrong horizontal scroll with truncate-lines value t Date: Mon, 08 Feb 2021 00:28:57 +0900 Message-ID: <868s7zew1y.fsf@gmail.com> References: <86wnvnm79l.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31245"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46316@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 07 16:30:21 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l8m0z-0007xu-6K for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Feb 2021 16:30:21 +0100 Original-Received: from localhost ([::1]:43208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l8m0y-00063q-9k for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Feb 2021 10:30:20 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l8m0g-00063g-AX for bug-gnu-emacs@gnu.org; Sun, 07 Feb 2021 10:30:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36952) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l8m0g-0004Af-3I for bug-gnu-emacs@gnu.org; Sun, 07 Feb 2021 10:30:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l8m0f-0003gb-VJ for bug-gnu-emacs@gnu.org; Sun, 07 Feb 2021 10:30:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: ynyaaa@gmail.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Feb 2021 15:30:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46316 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 46316-submit@debbugs.gnu.org id=B46316.161271175214084 (code B ref 46316); Sun, 07 Feb 2021 15:30:01 +0000 Original-Received: (at 46316) by debbugs.gnu.org; 7 Feb 2021 15:29:12 +0000 Original-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 Original-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 Original-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) Original-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) In-Reply-To: <83mtwhnydo.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 06 Feb 2021 15:01:39 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:199504 Archived-At: 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.