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: Suggestion: two new commands: beginning-of-list and end-of-list Date: Tue, 10 Sep 2024 14:30:11 +0300 Message-ID: <86jzfjvj98.fsf@gnu.org> References: <86le00ve01.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24851"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: arthur miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 10 13:30:53 2024 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 1snz5A-0006EL-7X for ged-emacs-devel@m.gmane-mx.org; Tue, 10 Sep 2024 13:30:52 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1snz4c-0006AG-Gt; Tue, 10 Sep 2024 07:30:18 -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 1snz4a-000652-V5 for emacs-devel@gnu.org; Tue, 10 Sep 2024 07:30:17 -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 1snz4a-0003Z1-GF; Tue, 10 Sep 2024 07:30:16 -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=9u7uh/54dxIYfMwhRcQcRtrYWznjs/MvlAI4BF2j/VY=; b=G1eoSINwY9Na MgbU2TqrSEAQQbZ7EDZHtDEOOv2HMp9/Ztx5RUcN9Et3pop1wXlZTFex5S8euauEGWUL4sun9psdE n+PhqGHt6DCSfTXij5DgoxSQ+b/ghzE6TjoylFsUjipl03NB6zGsK8Pg+eWFHL6b72eG5JMABL1qh 2Rk7jwuVY2KUueHPB+2nL7/t9s90Q2WqKTMYSaeltaQ+r+JPQzLEhkzHbMJfIKrr+5+eFXFcN7499 rPlcv+u9bh4J2ZM302lJh0TtBdiP2gEf336NmjqI5k9ij3nywC5p4/VST0V/+jGS+f16zimtSFV9d 3o+oVeYgLc9dS1r0RA9MiQ==; In-Reply-To: (message from arthur miller on Mon, 9 Sep 2024 19:41:12 +0000) 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:323525 Archived-At: > From: arthur miller > CC: "emacs-devel@gnu.org" > Date: Mon, 9 Sep 2024 19:41:12 +0000 > msip_labels: > > >I think we do have it: C-M-u, backward-up-list. What's more, it works > >not only in Lisp. I use it all the time. > > Yes you have. It works slightly differently when you are in a string, and it > places cursor before the opening parenthesis, not after. Right. But I think what it does is very useful, since it can be invoked repeatedly, each time moving up one level. > >So I wonder why we need another function that does basically the same. > > I think it makes sense to keep backward-up-list as it is, since it handles > literal strings as it does. But the behaviour is controlled via special vars > esape-strings and no-syntax-crossing. If we want similar command as > beginning-of-string, we have to wrap it and let-bind those variables to > change how it works. Yes, but is that a problem? > I am not sure, what is a symmetric function to move cursor to the end of list? The converse of C-M-u is C-M-d, but it doesn't move to the end of a list, it moves _inside_ one level. > But as said in the previous mail: this function is *already* in Emacs, so it is > already taking the memory in the process. It is just not used more than > once, and have *potential* to be used more. In other words, I suggest these > two functions as a convenience, not because it is impossible to do something > similar via some combination of other commands and variables. It is IME confusing to have two similar functions that do _almost_ the same job. What do others think about this? > By the way, why did all occasions of the word "expression" ended up surroneded > with underscores in the online archive? No idea.