From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: move_it_vertically_backward question Date: Wed, 15 Dec 2021 10:13:39 +0800 Message-ID: <87ilvqty24.fsf@yahoo.com> References: <87lf0pw78r.fsf.ref@yahoo.com> <87lf0pw78r.fsf@yahoo.com> <837dc8mue3.fsf@gnu.org> <874k7cuhv4.fsf@yahoo.com> <83lf0nl56t.fsf@gnu.org> <875yrrtiwj.fsf@yahoo.com> <837dc7l2pa.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33282"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 15 03:15:21 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 1mxJpA-0008Vc-2V for ged-emacs-devel@m.gmane-mx.org; Wed, 15 Dec 2021 03:15:20 +0100 Original-Received: from localhost ([::1]:51254 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxJp8-00082J-Vr for ged-emacs-devel@m.gmane-mx.org; Tue, 14 Dec 2021 21:15:19 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46938) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxJnm-0007L6-PX for emacs-devel@gnu.org; Tue, 14 Dec 2021 21:13:54 -0500 Original-Received: from sonic306-22.consmr.mail.ne1.yahoo.com ([66.163.189.84]:41805) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxJnk-0006w1-LG for emacs-devel@gnu.org; Tue, 14 Dec 2021 21:13:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1639534430; bh=MJnGpJlKA/xZoGqqH4KGZ3U/CBaAuOHVxtyjmzyS0O8=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=asJwSnGKINFSHW2tqKdOYgxsR9goeuJb1Bby4lI8Tum8PaHKSAxRKyIvNlWX0sb24wki0lhfgZq4B0Y1XF20WWba1QoMHntEWb67fUIb5orRtsciqU1ilxO5/Ml7OxrZ6CObkz/teYBva/fVyY4FphtxvYCZCRR65nkWX25rjy23oEWpOcBaRtYqzdGpcEkKyucTjV/SIsiDW6jcI4gxvm6jf4s+qT8W89z7OPDIA4nG7sm220q0Owhw9BOoK+9NIPQu+crGB/20qQHileGPtx4Oacbb9akul2KJyH9ujvyJlkU+lq0l9il3VCVE9Y5QwdapMein8Tlh1U6yKkHrBQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1639534430; bh=nB3OytLpUIXdGJT7C+N/isESNBDckMI6sbmlQ01XfFR=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=bf62OSyEIOdX8XYQEXEoMHJWr6sUoUd0p/KE1fepMC34NGxZJjY3ziTjKe3OASWedxV/BUSi0sWngsDIHjVnHYSrEhOBJy9nhJcXkjQgImzdVZflsVg/XMzv5Wa7WRFKGcq2v7IPG9TZrF25zCzBOdXG0jIPpR11KNEgzlNfWRzAEjbaS1OsJhwl80rjkQaGuou80TSyAbOqgKueXnAMtJFUvHM/LIf6gkuHo6V1oaw+G4o3AnsrAuTbuJkLcpRvVodZyRpMkNoLjlzDottZf+NQEYtDcKJkIZCtsT3cz3i52VR1dNcWEYJ0txGtjqVsOKGV2hmoO7LUmO203Nmq8A== X-YMail-OSG: 0E547csVM1neLl77Sog68MiVTlAYYBZE8PdEunLVzGX8r4KkO1aH48xGKKHlpj0 4WDZGEnvAFiIBW2EKt_vLgVvlRox9EylODW1BXzYIplHfQH8ncFQu5z8W7GxZ_Ak5vTmCNnd8X_O irwYKwxYUGM0H8utn3HJLRCSYV6P6nEMGwbROA8hp.nifiv_tfeWb0CH.2qOfKwr3RaS_YX6FpsM w0qo.fBx1fT0ZYFVfzEooHFE4ZKQTK.GBi4GMxJeqhvg456YAuiBo4OFzVukdOd9Sh1zINM_1zZw Q00CssaF8DzlPVjaw6fOomhDoCRua_KRqgLPf9erV6ntIm0gg4a9BbSMBzez5pLbdL4H5D6a7iYg 21ayNehsX1INEWyPkFqqZgDotF7voR4w9spr0rZsm33Q7NF.2.Nk5nN262CuIT11tFLI5uUDuWJI 6qb7o.fl8_in8sCr2z465ZlLheHBlgS3NGL9M7BL7BeQslLiz54Sq4hBMR.0gvhSiOhc88oPMqZ_ SCRzYjDCSfg8g_lvoFqImFtFeOwFBrd3GsDIjY1gVXdyY2zyw7HsLXgY_zT9M5F99Tb5JBYlDzh3 5aCjYSPqE4VcXlNk3QkHr7.n5RYOBlFH23NTKPO16mCLBMJA9W0Ju0QNIbbU.Mq.CayM_WhC3fwG gyf7jCsutjHGS5EE3UZYXt9DPQONeYSq0TLJfvjA3r5a9e1XEY_pCkOmrC0i4j_lrL0WCoFtLVS. KmeDLaYYpAs18jVu2kNIW.G0jKjHK77aSL.MKHeMIk_5nfN.3FbzOy_0z9emBmp11niVCzlKkhAh pf6PHiFCsa72gbvjhBgfPid1grr2DiOaa9tzenfII5 X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ne1.yahoo.com with HTTP; Wed, 15 Dec 2021 02:13:50 +0000 Original-Received: by kubenode501.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 9747bd56be488648f0d939691ba3dfd3; Wed, 15 Dec 2021 02:13:43 +0000 (UTC) In-Reply-To: <837dc7l2pa.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 14 Dec 2021 15:45:53 +0200") X-Mailer: WebService/1.1.19415 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.189.84; envelope-from=luangruo@yahoo.com; helo=sonic306-22.consmr.mail.ne1.yahoo.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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:281965 Archived-At: Eli Zaretskii writes: > No, I meant to ask window-text-pixel-size to do that, by passing it a > specially-formatted value of FROM (and possibly also TO). > > So let's teach window-text-pixel-size to be able to accept the FROM > argument which says "N pixels above position POS". I still don't believe that would be better than a separate primitive (since it doesn't make sense to supply the width information to the pixel scrolling code), and unfortunately I don't quite understand how `window_text_pixel_size' works either: for instance, it seems to disable the bidirectional reordering of text? I also don't see why `it' is saved into `it2' only to be restored before anything interesting is done with `it'. Correctly pixel-scrolling over bidirectional text will probably be a very important feature for people working with RTL languages, but I'm not sure how many of them are likely to use such a feature. > That's not very efficient if PIX can be a large value. Yes. Maybe calling `move_it_vertically_backward' itself until a suitable position is reached will be better, as I really don't want to reinvent "move_it_vertically_backwards but slightly different". Something like this: move_it_vertically_backward (&it, pix); while (-it.current_y < pix) { last_y = it.current_y; move_it_vertically_backward (&it, pix + it.current_y); if (it.current_y == last_y) break; } Thanks.