From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.devel Subject: Re: How to record the line number pixel width for each window. Date: Fri, 6 Dec 2019 11:29:04 -0800 Message-ID: <56C918B8-4F0A-4B7F-9AD6-B387EB76EAC4@lawlist.com> References: <83d0d1ho29.fsf@gnu.org> <7B62F071-E6BB-4768-BEBA-8ABFB3727D3C@lawlist.com> <83zhg5fg7n.fsf@gnu.org> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="260772"; mail-complaints-to="usenet@blaine.gmane.org" Cc: "emacs-devel@gnu.org" To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 06 20:31:43 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1idJKI-0015dq-Vz for ged-emacs-devel@m.gmane.org; Fri, 06 Dec 2019 20:31:43 +0100 Original-Received: from localhost ([::1]:44598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1idJKH-0005tA-6O for ged-emacs-devel@m.gmane.org; Fri, 06 Dec 2019 14:31:41 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45278) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1idJI0-0005pK-M2 for emacs-devel@gnu.org; Fri, 06 Dec 2019 14:29:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1idJHy-0000t7-P7 for emacs-devel@gnu.org; Fri, 06 Dec 2019 14:29:19 -0500 Original-Received: from gateway34.websitewelcome.com ([192.185.148.214]:48244) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1idJHy-00008y-4v for emacs-devel@gnu.org; Fri, 06 Dec 2019 14:29:18 -0500 Original-Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway34.websitewelcome.com (Postfix) with ESMTP id 3549A9B998 for ; Fri, 6 Dec 2019 13:29:06 -0600 (CST) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id dJHlikvz2OdBHdJHmivDhq; Fri, 06 Dec 2019 13:29:06 -0600 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com ; s=default; h=To:Date:Subject:From:Cc:Message-Id:Content-Type: Content-Transfer-Encoding:Mime-Version:In-Reply-To:References:Sender:Reply-To :Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=933N4eh+FQ/JHLHZHnCfdMzq4G7GuPgvhOKjxWaJDng=; b=GrZiopbil3TH1G8zsqCD96kO0n 96Q+rBgBEwM2WEQhqlWAMjQPocwU39h+8xwHNutH2Q92QQdU3Hg+7S1py/7ZERP4io9hfrRxzE60T JvqObNJii3k/swkawQOYjR+Hfp+R5sFH7m1Pij+h/P9uYa9wfag+VNMoawC8eDUx2coos/t4QLvP5 RTu+H5cJsr+bn0u/ZG6NGJFVJIXflpPbUY5MoUGf2ARP8y+xqkCHCjU3eD1vdDuXpsrvcQFZDlKc3 BNLlnIswi2dNfMl8FGYjiV1nwDcq3OxgNxG2hwPTHd6bgWz5wYps4QpUtEH+l+6H1l5nbb99fiSVL 70mHlnOw==; Original-Received: from mobile-166-170-50-216.mycingular.net ([166.170.50.216]:19150 helo=[10.24.135.74]) by gator3053.hostgator.com with esmtpsa (TLSv1:ECDHE-RSA-AES256-SHA:256) (Exim 4.92) (envelope-from ) id 1idJHl-000enF-6r; Fri, 06 Dec 2019 13:29:05 -0600 In-Reply-To: <83zhg5fg7n.fsf@gnu.org> X-Mailer: iPhone Mail (9A406) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3053.hostgator.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-BWhitelist: no X-Source-IP: 166.170.50.216 X-Source-L: No X-Exim-ID: 1idJHl-000enF-6r X-Source-Sender: mobile-166-170-50-216.mycingular.net ([10.24.135.74]) [166.170.50.216]:19150 X-Source-Auth: lawlist X-Email-Count: 2 X-Source-Cap: bGF3bGlzdDtsYXdsaXN0O2dhdG9yMzA1My5ob3N0Z2F0b3IuY29t X-Local-Domain: yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 192.185.148.214 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:243194 Archived-At: By "simulate", I had in mind actively using the move_it family of functions -= - where Emacs inhibits updating the glass and we can navigate the text to as= certain and/ or set certain values. For example, the sample snippet/diff in= the opening post of this thread occurs when Emacs is using IT to set the va= lue of the line number pixel width, and this is happening in the context of w= hat I think of as a redisplay simulation. The solution to my issue may be a= s simple as devising a condition limiting just when to set the window object= with the line number pixel width; e.g., when IT is on the first visible lin= e of text in the window (following the header line, if any). Right now, the= snippet sets the value when IT is on other lines besides the first line of t= ext in the window, perhaps even a hidden / invisible line due to folded text= . Perhaps that folded / invisible line would have a different line number p= ixel width, but it is not used because it is hidden and the value is erroneo= us. On Dec 6, 2019, at 10:42 AM, Eli Zaretskii wrote: >> Cc: "emacs-devel@gnu.org" >> From: Keith David Bershatsky >> Date: Fri, 6 Dec 2019 09:07:10 -0800 >>=20 >> Thank you, Eli, for reading and responding to this thread. Once the redi= splay cycle gets to the place where update_window is called, all simulations= performed by moving IT have already concluded, and update_window is the lau= nch-point for features 17684/22873. I would be comfortable using an existin= g instance of screen simulation and perform the essence of line_number_displ= ay_width without launching a new session with start_display. The goal is to= be as efficient as possible when storing the values so that they are reliab= ly accessible when update_window gets called. My general feeling is that up= date_window is not the place to do screen simulations (moving IT) and runnin= g a _new_ instance of start_display for each window is not efficient. >>=20 >> Is there an existing instance of a running simulation for each window som= ewhere in xdisp.c where I could add the guts of line_number_display_width wi= thout launching a new start_display; and, if so, some pointers on where that= might be located would be greatly appreciated? >=20 > I'm sorry, I don't understand the question. What do you call > "simulation" in this context?