From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.bugs Subject: bug#19267: 25.0.50; Enhance cycle-spacing with a state where only whitespace after point is deleted Date: Thu, 12 May 2022 16:45:44 +0200 Message-ID: <8735hessum.fsf@gnu.org> References: <87bkw3yma1.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21318"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.7.19; emacs 29.0.50 Cc: Robert Pluim , 19267@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 12 16:57:00 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1npAFP-0005NV-Im for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 12 May 2022 16:56:59 +0200 Original-Received: from localhost ([::1]:37160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1npAFO-0003nY-Fo for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 12 May 2022 10:56:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58090) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1npAEV-00034f-4q for bug-gnu-emacs@gnu.org; Thu, 12 May 2022 10:56:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48057) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1npAEU-0005e0-7Y for bug-gnu-emacs@gnu.org; Thu, 12 May 2022 10:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1npAEU-0005Lt-5g for bug-gnu-emacs@gnu.org; Thu, 12 May 2022 10:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tassilo Horn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 May 2022 14:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19267 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 19267-submit@debbugs.gnu.org id=B19267.165236735820562 (code B ref 19267); Thu, 12 May 2022 14:56:02 +0000 Original-Received: (at 19267) by debbugs.gnu.org; 12 May 2022 14:55:58 +0000 Original-Received: from localhost ([127.0.0.1]:41954 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1npAEP-0005LZ-OJ for submit@debbugs.gnu.org; Thu, 12 May 2022 10:55:57 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1npAEO-0005LL-3h for 19267@debbugs.gnu.org; Thu, 12 May 2022 10:55:56 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37378) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1npAEI-0005cm-NP; Thu, 12 May 2022 10:55:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-reply-to:Date:Subject:To:From: References; bh=u4Aspg2qwwB8mYkpwfGpDs4DR/t/lSw5RNWizaKPHy4=; b=Gugc4jKXIImrsL bte/ciutQr5NMHgKFLKfmDkS8lzv/BhL6hlxaH4nWusByw4YfCjbULB51Mhz4pwNsChkBC+vAkhRl DMs/5FgvP79H9TgKccaRBy5N2oUU+ZAlngtOebqfRq3fk7YHWwdCIUiy3hsnK7fn6McbeaTbnH6SH lKRgHikxsvcel6+urW+EBMqkJe2SUfuuCEHBaTea1M9JZKlxKVrGmnIhxKoe7FY64G0i1Y5zoTdni 0d2BkJg5IqQuinMdKd+x2Sj6NJ5N9Lf9DMp3ozLglDg8Hg8H/4jAoC1+faVNkS6RFG2Sfpg1wupfe XGwYJNWHFwIoud3AkuOQ==; Original-Received: from auth1-smtp.messagingengine.com ([66.111.4.227]:35101) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1npAEG-0000CH-SY; Thu, 12 May 2022 10:55:50 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id 63FEF27C005A; Thu, 12 May 2022 10:55:48 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 12 May 2022 10:55:48 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrgeejgdejlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpehffgfhvfevufffjgfkgggtgfesthhqredttderjeenucfhrhhomhepvfgrshhs ihhlohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenucggtffrrghtthgvrhhnpe fgtedtudeivdfhfffhfefhvefhuedvheejjeefleffheekffeutdfhgfejiefhgeenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhorhhnod hmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdekieejfeekjeekgedqieefhedv leekqdhtshguhheppehgnhhurdhorhhgsehfrghsthhmrghilhdrfhhm X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 12 May 2022 10:55:47 -0400 (EDT) In-reply-to: <87bkw3yma1.fsf@gnus.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:232052 Archived-At: Lars Ingebrigtsen writes: Hi Lars, >> Which is why we should change the default binding of M-SPC to >> cycle-spacing. I know some people will complain, but all they have to >> do is not type M-SPC twice. In short: I=CA=BCm with Tassilo, let=CA=BCs = be >> disruptive. > > Thinking about it a bit more, I agree with you two. I'll print that statement and put it in a frame in my living room. ;-) > It'd be minimally disruptive, anyway -- nobody is likely to have a > work flow that depends on hitting `M-SPC' many times in a row, because > a second invocation of `just-one-space' does nothing. Oh, indeed! > So I think we should rebind `M-SPC' to `cycle-spacing', and allow > customizations of the cycles. Perfect. If you are not already implementing that, I'd give it a shot when I find some spare time. BTW, do we already have a function which given an element and a (conceptually cyclic) list returns the element after that. E.g., such as this one: --8<---------------cut here---------------start------------->8--- (defun th/seq-element-after (elt list) (let ((l list)) (catch 'found (while l (cond ((null (cdr l)) (throw 'found (when (eq elt (car l)) (car list)))) ((and (eq elt (car l)) (cdr l)) (throw 'found (cadr l))) (t (setq l (cdr l)))))))) (setq th/test-list '(a b c)) (th/seq-element-after 'a th/test-list) ;=3D> b (th/seq-element-after 'b th/test-list) ;=3D> c (th/seq-element-after 'c th/test-list) ;=3D> a (th/seq-element-after 'x th/test-list) ;=3D> nil --8<---------------cut here---------------end--------------->8--- We need such a helper for the functionality. The question is just if it's generally useful in which case I'd ask for a good name and place (accessible from simple.el). Otherwise, I'd just keep it as an anonymous helper... Bye, Tassilo