From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: Alternative to current-column that counts from visual line beginning Date: Tue, 29 Dec 2020 00:01:16 -0500 Message-ID: References: <87F0777E-F283-4315-B9E5-D104B145EF89@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.40.0.2.32\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7254"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "emacs-devel@gnu.org" To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 29 06:02:34 2020 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 1ku79W-0001oF-Me for ged-emacs-devel@m.gmane-mx.org; Tue, 29 Dec 2020 06:02:34 +0100 Original-Received: from localhost ([::1]:54182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ku79V-0008Oh-Na for ged-emacs-devel@m.gmane-mx.org; Tue, 29 Dec 2020 00:02:33 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42240) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ku78K-0007rk-DM for emacs-devel@gnu.org; Tue, 29 Dec 2020 00:01:20 -0500 Original-Received: from mail-qv1-xf30.google.com ([2607:f8b0:4864:20::f30]:43922) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ku78I-0005Ds-S5 for emacs-devel@gnu.org; Tue, 29 Dec 2020 00:01:20 -0500 Original-Received: by mail-qv1-xf30.google.com with SMTP id et9so5918185qvb.10 for ; Mon, 28 Dec 2020 21:01:18 -0800 (PST) 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=JDUyKuMGctYeAtKyatihPQywPJdJsXpos4lxSmKozqs=; b=eiNh2omlT1XAICx7cyg8ihlkcV1yApyiKvFI0Ze1Uc+8R6ODg/zEFmqSyHNflJjtua 7gjyYOQY/20qtFm7kLVcws7BmgbUl6fFG4ij6SK9XKoFbuIn7T/bBDAnUt7fOAw0rdxZ WwgYq00DSlGI0G6CTR11Sjy9AO2HwU36+sFKDtAKVKLejtWR3mF11Mksy6YqO2oE4MoZ WIqzcjDDYzVa1VV9oiPRx+mWWrEyx3NT2bETd5Vb6rhIf4UfU5CeK35qN7Ktz4OQMR9E ttEJ1lTFhyn4FHZAsc+ePMauPtm7tlPIsKVws8MZGIyPG/YnnHqNdmweZW/5szvU8vF8 kxqg== 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=JDUyKuMGctYeAtKyatihPQywPJdJsXpos4lxSmKozqs=; b=NUQ6E2+TYaBzIqJx5wGjILYxvuAj6MHCuyBbuKpD/G5Q26YJjzODTrlshKUjv+NmwU 5GDrX9yiw7O/BVolDx5QHzoQHuqoubJCUO1DXRsonCT1YGjNi9U0JRvllo1UUvMNlsfX JG42H55v2pvpbWSS7tjs8Pu1SBODsO0NfcAAgGhEeY7wBywYpX0YlnL5PInYHWkbT4Au OughgXrReWDLnlamNA8XJo7f7o7f8BkiIZawWCF0mJV/CjkDhR295JmqedA8x/uDFlPV hzKsDHw/Ji/limaUFw3h6JW7x1wJ8WB4rN5DmFKQR8rzka1oBnrbL/UPe5Tqfgpqi93b U/rQ== X-Gm-Message-State: AOAM533XbcHeRyJdFKiv52ERj0VmAlbUaLwAg03cFPF/TQ7Rl6ilePLv V4kH+GhSrg24HiI3vSzq1gk= X-Google-Smtp-Source: ABdhPJwz1kDMBF2fjBkB0WZUn1jOP8oPlWlgHbqkXMUJVDkDWC5CaHf6Jp5kXElr5qMV6y9gLLZZjw== X-Received: by 2002:a0c:bd2b:: with SMTP id m43mr50653024qvg.32.1609218077567; Mon, 28 Dec 2020 21:01:17 -0800 (PST) Original-Received: from ?IPv6:2601:98a:4200:9210:a4d8:20a3:82c7:acd? ([2601:98a:4200:9210:a4d8:20a3:82c7:acd]) by smtp.gmail.com with ESMTPSA id 9sm25790920qtr.64.2020.12.28.21.01.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Dec 2020 21:01:17 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3654.40.0.2.32) Received-SPF: pass client-ip=2607:f8b0:4864:20::f30; envelope-from=casouri@gmail.com; helo=mail-qv1-xf30.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:262046 Archived-At: > On Dec 28, 2020, at 9:40 PM, Stefan Monnier = wrote: >=20 >> to get the column number counting from the visual line beginning. Is >> there a function that does what I want? If not, maybe we should add >> one, or add an argument to current-column. >=20 > `posn-at-point`? >=20 That works, albeit a bit convoluted comparing to current-column and only = works when point is visible. Another less legit point is that = posn-at-point is a bit far-fetched semantically: for me it is more about = GUI pixel positions than text-based column and line positions. All = things considered, I still prefer a dedicated function or an additional = argument to current-column. Yuan=