From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: JD Smith Newsgroups: gmane.emacs.devel Subject: Re: Temporarily select-window, without updating mode-line face and cursor fill? Date: Sun, 2 May 2021 22:49:50 -0400 Message-ID: <870276C2-A1A7-4099-9D27-1795311BB660@gmail.com> References: <56F746A2-B842-421E-8FBF-EA5E93EA26CE@gmail.com> <83pmya8d49.fsf@gnu.org> <904A57C8-C268-412F-815F-782017F47D5D@gmail.com> <83eeep8w0m.fsf@gnu.org> <81F181EB-D3C1-4619-B42A-1F49321EC544@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.80.0.2.43\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_4BBB148F-A0C7-4EC9-9740-EAF58D2ED4FB" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33233"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 03 04:50:46 2021 Return-path: Envelope-to: ged-emacs-devel@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 1ldOfV-0008YY-UV for ged-emacs-devel@m.gmane-mx.org; Mon, 03 May 2021 04:50:46 +0200 Original-Received: from localhost ([::1]:43192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldOfU-0007RC-VM for ged-emacs-devel@m.gmane-mx.org; Sun, 02 May 2021 22:50:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldOeg-0006vh-Cg for emacs-devel@gnu.org; Sun, 02 May 2021 22:49:54 -0400 Original-Received: from mail-qv1-xf2f.google.com ([2607:f8b0:4864:20::f2f]:44942) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ldOee-0003fs-PJ; Sun, 02 May 2021 22:49:54 -0400 Original-Received: by mail-qv1-xf2f.google.com with SMTP id u1so1929610qvg.11; Sun, 02 May 2021 19:49:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=81BsW1lfDMMTtyT3/EBEyatT2it2Yw7gJ6w6soFA+Y4=; b=jsXskAZ0jUl7+uPmLuF0KB8oNPtp3gBXEYyqVE4h6B7B4FukA4H65qQLca4lrNIJc/ XFVR1PS97fQmr0ijo7JaU1mKic2fcLhHRlNH5274SvENflK6I+saX99NMbe9JkB8wL8r dhgNlDgQr8T9JEU4VAuDLE5tDk0V0LqX91cu0if3BEDZg0Eq35/4q5NDGhsozgs1/euA DXaGMYEbfhjc+lvHFVve077xe+wwb8P40yMu79LDCHhAZugCX1DKp3Xmxrws5xB4vxMU d6w/aDM3yBeRGRJzyFISMcZ1Tc2PW8FOnqU3ObdE41vx1/4x9PKLvkCQ8LZJmtHUWclI BRPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=81BsW1lfDMMTtyT3/EBEyatT2it2Yw7gJ6w6soFA+Y4=; b=HDRZB6nxTk69lAwUPMHLexDtqE/2J7WkUHDSjh9tPcWh5GUn8Rsaiv+u9uqJKCE4PN KRdUg4O++lSTyb9mI/2w5nPUnsitv/nERGGvv3Q3+6MMQcxC8jbtLOw/2LjCtPE9pus1 dCYFbTWeuicKBdwAdS+Xn/InY0iIabRRXtrreMBBDEz+fkHwDSUoS35RM2Ko0w+eAApW ZIkQYayHUctMq67GMHVs+tOSrlikprv0DC+mUGcGio2k0XzNQUe7qxK2PGNq9NsqMJMb VfdnENXl+9niOBUQyvakg/UVC4wiNAUSvND7WFqE6AwgmnyORGZvJAimOIu684eiGknm GlXw== X-Gm-Message-State: AOAM531M4/BzInIPpzW9h5kOWmdekkbG7Mm2uf5vGMzj8Q7IPj//eXoz tx5qDv8p9uLcYMGO4wLoTwo/uQS0/lQJvw== X-Google-Smtp-Source: ABdhPJx5YPD8jKAi/h7ma7I+QRAYMBk+OIpaB6riu5w6acs5GGq1iC+Bd5TE+yJLKNB0EFQUNfBG5w== X-Received: by 2002:ad4:4908:: with SMTP id bh8mr17654907qvb.55.1620010191548; Sun, 02 May 2021 19:49:51 -0700 (PDT) Original-Received: from smtpclient.apple (cm-134-228-25-135.buckeyecom.net. [134.228.25.135]) by smtp.gmail.com with ESMTPSA id o125sm7611574qkf.87.2021.05.02.19.49.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 May 2021 19:49:51 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3654.80.0.2.43) Received-SPF: pass client-ip=2607:f8b0:4864:20::f2f; envelope-from=jdtsmith@gmail.com; helo=mail-qv1-xf2f.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, HTML_MESSAGE=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-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:268794 Archived-At: --Apple-Mail=_4BBB148F-A0C7-4EC9-9740-EAF58D2ED4FB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On May 2, 2021, at 10:25 PM, Stefan Monnier = wrote: >=20 >=20 > We really should simply speed up `line-number-at-pos`. > It shouldn't be hard. See below what I do in nlinum.el. Thanks. I saw your interesting cached approach mentioned on S.E., but = didn=E2=80=99t test it. It may in fact be good enough for the actual = usage case I was having issues with (scrolling in large files). I = don=E2=80=99t love the after-change function, but using one would also = permit long-term caching of the =E2=80=9Cfinal=E2=80=9D line at = (point-max), assuming narrow/widen triggers it.= --Apple-Mail=_4BBB148F-A0C7-4EC9-9740-EAF58D2ED4FB Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On May 2, 2021, at 10:25 PM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:


We really should simply speed up = `line-number-at-pos`.
It shouldn't be hard.  See below what I do in = nlinum.el.

Thanks.  I saw your interesting cached = approach mentioned on S.E., but didn=E2=80=99t test it.  It may in = fact be good enough for the actual usage case I was having issues with = (scrolling in large files).  I don=E2=80=99t love the after-change = function, but using one would also permit long-term caching of the = =E2=80=9Cfinal=E2=80=9D line at (point-max), assuming narrow/widen = triggers it.
= --Apple-Mail=_4BBB148F-A0C7-4EC9-9740-EAF58D2ED4FB--