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: Moving point after character when clicking latter half of it Date: Thu, 13 Jul 2023 08:27:28 +0300 Message-ID: <83h6q85qkf.fsf@gnu.org> References: <2255158.iZASKD2KPV@silef> <21946289.EfDdHjke4D@anduin> <87mt02ar4e.fsf@yahoo.com> <3242369.aeNJFYEL58@anduin> <76D3E9B6-C3BE-4E41-B228-AA252AAD4A11@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6812"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mm@ucw.sh, luangruo@yahoo.com, emacs-devel@gnu.org To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jul 13 07:28:11 2023 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 1qJos7-0001YH-24 for ged-emacs-devel@m.gmane-mx.org; Thu, 13 Jul 2023 07:28:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qJorD-0004b2-4t; Thu, 13 Jul 2023 01:27:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qJorB-0004al-IN for emacs-devel@gnu.org; Thu, 13 Jul 2023 01:27:13 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qJorA-0002qf-Ka; Thu, 13 Jul 2023 01:27:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=i0p6ls6+AAgAkpf+iIsWaK1o4vLYlNYrMfhVqZs/E9c=; b=Pa8GVMt5fZ1z jt8hH/66c82a+MS9eoebL/lPAdYlGhpAt6b1ysqbMjFdEX0F/fePxG138i2Mz82PgXnNOX8tOz6kz MUPd+zOOmMsl+95iUgsRBTeg/e1sCGnjuH5I+olqaE5b5FqXy9flw6oIrWClDM53afQp2XSEDOdxc +PZlGn0y+Cie7UWA1nT7PF9YvO0o5E+dOaJRkY39j+MXl6oPRXUk4+NjAN1V4BmW6+Fn12tjAoM5X rW55/jRrB2mPDt8JrIonQAM4EDYSdRblRuyClCvRKDi8FiXHVo9fCbkRBsr72HkQYcdFGiHyMZpVV naTN8Vm2y//xjIFXdLpuFw==; Original-Received: from [87.69.77.57] (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 1qJorA-0007MN-42; Thu, 13 Jul 2023 01:27:12 -0400 In-Reply-To: <76D3E9B6-C3BE-4E41-B228-AA252AAD4A11@gmail.com> (message from Yuan Fu on Wed, 12 Jul 2023 14:17:41 -0700) 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:307809 Archived-At: > From: Yuan Fu > Date: Wed, 12 Jul 2023 14:17:41 -0700 > Cc: Po Lu , > Eli Zaretskii , > emacs-devel@gnu.org > > Sorry for joining late into the discussion. But I wonder if a Elisp solution would suffice? Someone had requested this feature to me in the past and this is my solution at the time. Thanks. I like this solution less, since it advises primitives, something that should be the last resort. Also, handling layout in Lisp is always tricky; for example, posn-* functions are not very reliable in some obscure/rare use cases. The solution in the display code is simple and very local, so I think it should be preferred.