GNU bug report logs - #46316
27.1; wrong horizontal scroll with truncate-lines value t

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: ynyaaa@HIDDEN; Keywords: notabug; dated Fri, 5 Feb 2021 05:09:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 46316 <at> debbugs.gnu.org:


Received: (at 46316) by debbugs.gnu.org; 7 Feb 2021 19:10:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 07 14:10:13 2021
Received: from localhost ([127.0.0.1]:48836 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l8pRl-000758-9A
	for submit <at> 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 <eliz@HIDDEN>) id 1l8pRk-00074s-E3
 for 46316 <at> 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 <eliz@HIDDEN>)
 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 <eliz@HIDDEN>)
 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@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: ynyaaa@HIDDEN
In-Reply-To: <86tuqn3dzr.fsf@HIDDEN> (ynyaaa@HIDDEN)
Subject: Re: bug#46316: 27.1; wrong horizontal scroll with truncate-lines
 value t
References: <86tuqn3dzr.fsf@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 46316
Cc: 46316 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Cc: 46316 <at> debbugs.gnu.org
> From: ynyaaa@HIDDEN
> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46316; Package emacs. Full text available.

Message received at 46316 <at> debbugs.gnu.org:


Received: (at 46316) by debbugs.gnu.org; 7 Feb 2021 18:54:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 07 13:54:45 2021
Received: from localhost ([127.0.0.1]:48795 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l8pCm-0006fP-Sw
	for submit <at> 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 <ynyaaa@HIDDEN>) id 1l8pCk-0006fB-Ll
 for 46316 <at> 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 <at> 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 <eliz@HIDDEN>
Subject: Re: bug#46316: 27.1; wrong horizontal scroll with truncate-lines
 value t
In-Reply-To: <83mtwfnb6l.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 07 Feb
 2021 17:34:58 +0200")
From: ynyaaa@HIDDEN
Date: Mon, 08 Feb 2021 03:54:32 +0900
Message-ID: <86tuqn3dzr.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 46316
Cc: 46316 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

>> Cc: 46316 <at> debbugs.gnu.org
>> From: ynyaaa@HIDDEN
>> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46316; Package emacs. Full text available.

Message received at 46316 <at> debbugs.gnu.org:


Received: (at 46316) by debbugs.gnu.org; 7 Feb 2021 15:35:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 07 10:35:00 2021
Received: from localhost ([127.0.0.1]:48512 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l8m5U-0003p6-G9
	for submit <at> 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 <eliz@HIDDEN>) id 1l8m5S-0003or-EQ
 for 46316 <at> 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 <eliz@HIDDEN>)
 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 <eliz@HIDDEN>)
 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@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: ynyaaa@HIDDEN
In-Reply-To: <868s7zew1y.fsf@HIDDEN> (ynyaaa@HIDDEN)
Subject: Re: bug#46316: 27.1; wrong horizontal scroll with truncate-lines
 value t
References: <868s7zew1y.fsf@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 46316
Cc: 46316 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Cc: 46316 <at> debbugs.gnu.org
> From: ynyaaa@HIDDEN
> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46316; Package emacs. Full text available.

Message received at 46316 <at> debbugs.gnu.org:


Received: (at 46316) by debbugs.gnu.org; 7 Feb 2021 15:29:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 07 10:29:12 2021
Received: from localhost ([127.0.0.1]:48498 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l8lzr-0003f6-UC
	for submit <at> 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 <ynyaaa@HIDDEN>) id 1l8lzq-0003es-Ez
 for 46316 <at> 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 <at> 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 <eliz@HIDDEN>
Subject: Re: bug#46316: 27.1; wrong horizontal scroll with truncate-lines
 value t
In-Reply-To: <83mtwhnydo.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 06 Feb
 2021 15:01:39 +0200")
From: ynyaaa@HIDDEN
Date: Mon, 08 Feb 2021 00:28:57 +0900
Message-ID: <868s7zew1y.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 46316
Cc: 46316 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

> tags 46316 notabug
> thanks
>
>> From: ynyaaa@HIDDEN
>> 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 "<svg width=\"80\" height=\"80\" version=\"1.1\"\
>>    xmlns=\"http://www.w3.org/2000/svg\"\
>>    xmlns:xlink=\"http://www.w3.org/1999/xlink\">\
>>    <rect width=\"80\" height=\"80\" x=\"0\" y=\"0\" fill=\"blue\"></rect>\
>>   </svg>"))
>>     (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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46316; Package emacs. Full text available.
Added tag(s) notabug. Request was from Eli Zaretskii <eliz@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 46316 <at> debbugs.gnu.org:


Received: (at 46316) by debbugs.gnu.org; 6 Feb 2021 13:01:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 06 08:01:46 2021
Received: from localhost ([127.0.0.1]:45425 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l8NDe-0002Es-5x
	for submit <at> 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 <eliz@HIDDEN>)
 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 <eliz@HIDDEN>)
 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 <eliz@HIDDEN>)
 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@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: ynyaaa@HIDDEN
In-Reply-To: <86wnvnm79l.fsf@HIDDEN> (ynyaaa@HIDDEN)
Subject: Re: bug#46316: 27.1;
 wrong horizontal scroll with truncate-lines value t
References: <86wnvnm79l.fsf@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 46316
Cc: 46316 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

tags 46316 notabug
thanks

> From: ynyaaa@HIDDEN
> 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 "<svg width=\"80\" height=\"80\" version=\"1.1\"\
>    xmlns=\"http://www.w3.org/2000/svg\"\
>    xmlns:xlink=\"http://www.w3.org/1999/xlink\">\
>    <rect width=\"80\" height=\"80\" x=\"0\" y=\"0\" fill=\"blue\"></rect>\
>   </svg>"))
>     (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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46316; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 5 Feb 2021 05:08:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 05 00:08:22 2021
Received: from localhost ([127.0.0.1]:42572 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l7tLx-0007pv-LB
	for submit <at> 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 <ynyaaa@HIDDEN>) id 1l7tLt-0007pk-2k
 for submit <at> 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 <ynyaaa@HIDDEN>) id 1l7tLs-0004vP-Sn
 for bug-gnu-emacs@HIDDEN; 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 <ynyaaa@HIDDEN>) id 1l7tLq-00080p-SP
 for bug-gnu-emacs@HIDDEN; Fri, 05 Feb 2021 00:08:16 -0500
Received: by mail-pg1-x52b.google.com with SMTP id r38so3685352pgk.13
 for <bug-gnu-emacs@HIDDEN>; 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 <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 04 Feb 2021 21:08:12 -0800 (PST)
From: ynyaaa@HIDDEN
To: bug-gnu-emacs@HIDDEN
Subject: 27.1; wrong horizontal scroll with truncate-lines value t
Date: Fri, 05 Feb 2021 14:08:06 +0900
Message-ID: <86wnvnm79l.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2607:f8b0:4864:20::52b;
 envelope-from=ynyaaa@HIDDEN; 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 <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
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 "<svg width=\"80\" height=\"80\" version=\"1.1\"\
   xmlns=\"http://www.w3.org/2000/svg\"\
   xmlns:xlink=\"http://www.w3.org/1999/xlink\">\
   <rect width=\"80\" height=\"80\" x=\"0\" y=\"0\" fill=\"blue\"></rect>\
  </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))




Acknowledgement sent to ynyaaa@HIDDEN:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#46316; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 7 Feb 2021 19:15:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.