From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Newsgroups: gmane.emacs.bugs Subject: bug#56393: Turn on narrowing in redisplay_window Date: Tue, 19 Jul 2022 11:25:53 +0200 Message-ID: References: <38c1a31040d2d2bc47ae@heytings.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9147"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin) Cc: 56393@debbugs.gnu.org To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 19 11:27:11 2022 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 1oDjVW-00029r-AB for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 19 Jul 2022 11:27:10 +0200 Original-Received: from localhost ([::1]:37950 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oDjVV-0006rT-3b for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 19 Jul 2022 05:27:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40158) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDjVO-0006rJ-Fd for bug-gnu-emacs@gnu.org; Tue, 19 Jul 2022 05:27:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55052) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oDjVO-0007ro-6p for bug-gnu-emacs@gnu.org; Tue, 19 Jul 2022 05:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oDjVO-00047f-29 for bug-gnu-emacs@gnu.org; Tue, 19 Jul 2022 05:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 Jul 2022 09:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56393 X-GNU-PR-Package: emacs Original-Received: via spool by 56393-submit@debbugs.gnu.org id=B56393.165822276315777 (code B ref 56393); Tue, 19 Jul 2022 09:27:02 +0000 Original-Received: (at 56393) by debbugs.gnu.org; 19 Jul 2022 09:26:03 +0000 Original-Received: from localhost ([127.0.0.1]:52811 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oDjUR-00046P-CR for submit@debbugs.gnu.org; Tue, 19 Jul 2022 05:26:03 -0400 Original-Received: from mail-ej1-f47.google.com ([209.85.218.47]:35832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oDjUP-00045r-Hd for 56393@debbugs.gnu.org; Tue, 19 Jul 2022 05:26:02 -0400 Original-Received: by mail-ej1-f47.google.com with SMTP id j22so26047746ejs.2 for <56393@debbugs.gnu.org>; Tue, 19 Jul 2022 02:26:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :user-agent:mime-version:content-transfer-encoding; bh=y7NZMgP7TJ5kCLh6zUsWTxfA3HV19jQQI6bmEKKydPk=; b=E9ZDnx0fKPd6QaqdFQlct1uHpjjFOx9X4b8ldZ8etdOY1AUWE4MPYENNwBqIz1uqfD OfQYLfaPRPG0Twy+bZJ2WYmpmr91Joah5pwJnR4JqFp7ypFHA1rG9XtqZHL7M2iVrWEl lcUGPzqL+3tZdtAaeUeo+Z5bLpyfpCwxaez7C4vvJ/Cq3P1wIxljaWM4SD9bJvB44w+L I3v6LBWBWrcWuhZz4BJgcEyLLlwwzNOxLQ4P+dTtWs/8xlZFsljSfwyj34g6RTLjRTux 1ywP6Vh/XtktfgIN/MRj5uvSZ4wSIJ+3OL5pzIIYD3uwYlBho0zxYrcBAczkW4ZCGgyK nbbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:user-agent:mime-version:content-transfer-encoding; bh=y7NZMgP7TJ5kCLh6zUsWTxfA3HV19jQQI6bmEKKydPk=; b=g9Xpkg7xAbmCBhzK6ZUZes9ahq2/JDGaYywUXSPze8FICszljLe2FKhALDJ81wrWx1 +84ZVtFzBCayg/Bq/42+WacuYjDq8yfuKa8k9cgE/C2b3pHDu1ycXEc4bS9NlQk5NLFQ GpPWWjWXdYhfF6+Y5yC6I4PeqAwzm6Idxmj7BnYopviBvb3H9xjHFS8G3JH/mxzLViaq Zm7ojMHKi7LI9yMrZrZR9MIEbmr6lf3uCwbXNe7kHNVNRv6sxFHDfU+A/K9n5wGH5QyR b18JKkdxVJrbwhdChY/U8tAn3iqrAwBVjRfl2h6oCfY8mQK+suAcvAgLF2nkxE5vJcqm ThUw== X-Gm-Message-State: AJIora+RLeNTHTEcRQaKdB7bOpWG8glUEtVJfi9sSEuaWyV1GXS8WyW/ a4D6a9Mk9iAlxsMm9DPxi4WkBY2eX3A= X-Google-Smtp-Source: AGRyM1ut+NTZXP+n7Y72mhFZL+JhRNQzqsHk/gPgEMC/UbMJAIAG9QIyHXYMxrpJU7yWdQ1jcNK71w== X-Received: by 2002:a17:907:6092:b0:72f:575:722d with SMTP id ht18-20020a170907609200b0072f0575722dmr18038444ejc.19.1658222755406; Tue, 19 Jul 2022 02:25:55 -0700 (PDT) Original-Received: from Mini.fritz.box (pd9e36437.dip0.t-ipconnect.de. [217.227.100.55]) by smtp.gmail.com with ESMTPSA id ku5-20020a170907788500b007262a5e2204sm6501802ejc.153.2022.07.19.02.25.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jul 2022 02:25:54 -0700 (PDT) In-Reply-To: (Gregory Heytings's message of "Tue, 19 Jul 2022 08:53:12 +0000") 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:237413 Archived-At: Gregory Heytings writes: >> - I don't understand this in redisplay_window: >> >> /* Check whether the buffer to be displayed contains long lines. */ >> if (!NILP (Vlong_line_threshold) >> && !current_buffer->long_line_optimizations_p >> && Z - BEG - BUF_UNCHANGED_SIZE (current_buffer) <=3D 1) >> >> Does the last line mean "buffer got smaller"? Sorry if I'm dense >> here, but I don't get it. >> > > It is (- (point-max) (point-min) (buffer-size-after-last-redisplay)), Sorry, maybe it's too hot here to think (36=C2=B0C currently), I still don't get it (- (point-max) (point-min)) =3D current buffer size so current-buffer-size - last-buffer-size <=3D 1 current-buffer-size <=3D 1 + last-buffer-size which is "the buffer got smaller"? > so it means "the buffer got larger by more than one character". (Note > that (buffer-size-after-last-redisplay) is a fictional function.) Goes without saying. > But after discussing this with Eli I'm not convinced that it's a good > enough heuristic. The previous heuristic was simply "the buffer > contents have changed", and I wanted to refine it a bit. Okay. Hm.