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:23:21 -0400 Message-ID: <43202BE2-E270-428D-A09E-BE6CBE49DBA3@gmail.com> References: <56F746A2-B842-421E-8FBF-EA5E93EA26CE@gmail.com> <83pmya8d49.fsf@gnu.org> <6168853E-E5B1-4247-A0D7-4D4191DCED0A@gmail.com> <2669656d-9ab8-5106-61c3-1c95b04c06cd@gmx.at> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.80.0.2.43\)) 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="6570"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 03 04:24:18 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 1ldOFt-0001bs-R3 for ged-emacs-devel@m.gmane-mx.org; Mon, 03 May 2021 04:24:17 +0200 Original-Received: from localhost ([::1]:34298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldOFr-0002Wf-Mp for ged-emacs-devel@m.gmane-mx.org; Sun, 02 May 2021 22:24:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34934) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldOF3-00026f-Mg for emacs-devel@gnu.org; Sun, 02 May 2021 22:23:25 -0400 Original-Received: from mail-qv1-xf2e.google.com ([2607:f8b0:4864:20::f2e]:36412) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ldOF1-0001m0-Ts for emacs-devel@gnu.org; Sun, 02 May 2021 22:23:25 -0400 Original-Received: by mail-qv1-xf2e.google.com with SMTP id dl3so1929027qvb.3 for ; Sun, 02 May 2021 19:23:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=jaa7jmicfDpGu9bx+WKgkkD0+Uej0Gge7y/eqs5FSS8=; b=Jj+sScBiiAXDNpjvziMsFICO8NAyjdoMJQcteScAki7ODklQZe8SEgeDBLijdqp8AC WNpEePPqW5aaRhJpg5dBiY8wKhbCTidqPud9suifPZLcFak6/5O++eHGYDp6YK3AY8h2 PFmDXRLsN8fAgMnblvyBnXB6Ai29wIaeI96OfDPMNXfAW0gQ0diNalDQ0tMnB+6/EIgc J4mS5P4nSkvuGfzH9gN5FwrIaJ+zCLFRefgL6uCBdmeQy/V72Rau+xaSiTw/4DqEZfEj 9L9ZJ3osSkFlowNakVWY/Zr+KiWg514SQRd7WgprK9AjGfKs6K2FyXnVrYwxKup8vHTM 0OGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=jaa7jmicfDpGu9bx+WKgkkD0+Uej0Gge7y/eqs5FSS8=; b=bcTS8nR4Ag2b9T9PLUwwsf/eb/7OdJ4JlSW/rve6io8p0/CDvNfb0u9dPd7F/uMYHL FJbvW8fysFdEoaSZyVGViAvlmrHFwdwQ/+GPeFhxtyC+9Fzi6ZJ3NN1LS14oPmAr8S4P g2TeGX073MCpvrshArjMrUkHRfhoBIN7KlBbL+DmwYXNlu3mn52VbkffqLGrEpSnQQvK qvha04EyIa83rDALQ2BY9fPGbgNxGqAEnfRHMcmG2bxyPFi4uHBiMqKOKE3CMnupyPgH Q7bPIKXCQpWAtsFmJadeNUUNbCwtrztcwzC4f6JUMXeaJsWJRy4+lgPUYZC/2pYPwQ9K etEA== X-Gm-Message-State: AOAM533kVP4hsfY+TYy/PuuvMRaRuagMgpLBstsvTNiEWVMD0vifyeXM 50UAvIy5X5asZ3eRgFDWBDk= X-Google-Smtp-Source: ABdhPJxp4YCDf5JlrcoL8HDrGuRZ9oVRc17qlb9dUJEijBM/QL3XgKpytrA4TITCWhoNCI2I/8TMXQ== X-Received: by 2002:a0c:e9c6:: with SMTP id q6mr17409481qvo.15.1620008602684; Sun, 02 May 2021 19:23:22 -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 67sm7855810qtf.54.2021.05.02.19.23.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 May 2021 19:23:22 -0700 (PDT) In-Reply-To: <2669656d-9ab8-5106-61c3-1c95b04c06cd@gmx.at> X-Mailer: Apple Mail (2.3654.80.0.2.43) Received-SPF: pass client-ip=2607:f8b0:4864:20::f2e; envelope-from=jdtsmith@gmail.com; helo=mail-qv1-xf2e.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-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:268792 Archived-At: I need line position, not points in a buffer, so I need to calculate = those. The set-window-point is really just so I can harvest the speed of = (format-mode-line =E2=80=9C%l=E2=80=9D), which works in windows. I = think without that need, I indeed could just use a with-current-buffer, = and do all my line position calculating there, as you suggest. Either = way I would still need final set-window-start to scroll a particular = window once I have a new location.=20 But perhaps there is a simpler approach; happy for more input.=20 > On May 2, 2021, at 3:40 AM, martin rudalics wrote: >=20 > > Sure, thanks. I compute line positions at a number of points > > (window-start, window-end, and point-max) inside a mode line :eval > > form. >=20 > But `window-start' and `window-end' already provide the buffer = positions > you need. So why do think you have to care about the window after all > and do things like `set-window-start' and `set-window-point' in your > following post? >=20 > martin