From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: How to add pseudo vector types Date: Tue, 03 Aug 2021 14:42:29 +0300 Message-ID: <83fsvqn49m.fsf@gnu.org> References: <4F02FE4E-0B48-4A94-B1D4-8C4878F51493@gmail.com> <6D8FDE41-2795-465B-8958-900B7C3DEC02@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32230"; mail-complaints-to="usenet@ciao.gmane.io" Cc: cpitclaudel@gmail.com, stephen_leake@stephe-leake.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Fu Yuan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 03 13:44:09 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 1mAsq8-000834-Nn for ged-emacs-devel@m.gmane-mx.org; Tue, 03 Aug 2021 13:44:08 +0200 Original-Received: from localhost ([::1]:49848 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mAsq6-000073-Kx for ged-emacs-devel@m.gmane-mx.org; Tue, 03 Aug 2021 07:44:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mAsoh-0007gf-J5 for emacs-devel@gnu.org; Tue, 03 Aug 2021 07:42:39 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:46774) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mAsof-0004tf-Hi; Tue, 03 Aug 2021 07:42:37 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2528 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mAsof-0005UZ-2M; Tue, 03 Aug 2021 07:42:37 -0400 In-Reply-To: <6D8FDE41-2795-465B-8958-900B7C3DEC02@gmail.com> (message from Fu Yuan on Tue, 3 Aug 2021 06:24:34 -0400) 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:271960 Archived-At: > From: Fu Yuan > Date: Tue, 3 Aug 2021 06:24:34 -0400 > Cc: Stephen Leake , > Clément Pit-Claudel , > Stefan Monnier , emacs-devel@gnu.org > > I’m about to change all lisp-facing functions from using byte position to using point. I don't understand how can you do this. Point is set by Lisp, and generally cannot be changed from C, except for very short durations of time (or if the C code is the implementation of a Lisp command that just moved point). If you need to access some buffer position, you cannot in general use point, because you cannot control where point is. > Point is much easier to work with. In what way is it easier? I feel that I'm missing something here. > If lisp wants byte positions, they can just convert from point themselves. ??? What do you mean by that? Can you show an example?