From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Samuel Wales Newsgroups: gmane.emacs.help Subject: Re: basic navigation Date: Tue, 4 Jul 2023 21:24:54 -0700 Message-ID: References: <9d5a5a90-8c29-e781-fdea-59790894cadc@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13925"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Platon Pronko Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 05 06:25:53 2023 Return-path: Envelope-to: geh-help-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 1qGu5Q-0003PV-Se for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 05 Jul 2023 06:25:52 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qGu4b-0003c0-9B; Wed, 05 Jul 2023 00:25:01 -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 1qGu4Z-0003bg-K3 for help-gnu-emacs@gnu.org; Wed, 05 Jul 2023 00:24:59 -0400 Original-Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qGu4X-0005UP-PY for help-gnu-emacs@gnu.org; Wed, 05 Jul 2023 00:24:59 -0400 Original-Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2b588fa06d3so17830331fa.1 for ; Tue, 04 Jul 2023 21:24:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688531096; x=1691123096; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=/GUFb/LRqsEc8YI0/8mt7LtzPrbncikkWn017PS75iQ=; b=I6IPb9Y7ps/IMwRbOkH8i1sIgpLcC0zsSdUaLYiD3+5rE+Pxm6do7Qn9BT+BZ4F9bf AheKBwXuvlYw/SpCzQSX9VnHIXngrlwKxi4ulnzu/u3i5L3P4Mgro0IiFLJpgszlgceo oEiP46zrCkdXJBNIZWmOz2SwHJoxHkmNYWIRXAqTu4k5CKhf8z2df/vzHrZABYg+GOHT 30lYDQItcEB6tsIAI6kMonEmffsNdnSq5b4bHWaycB/s017Yw7C9cdJdVIeb/RQ5M4Sg ePLw/ag+JzGYeiftM03/7HcnGZUwsYG1aOkyASkEgISgIAx29YnIjoxCoulHGSqgWXDd Jaog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688531096; x=1691123096; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/GUFb/LRqsEc8YI0/8mt7LtzPrbncikkWn017PS75iQ=; b=VOfX2A8M58WDzsmmT3WI9uS1WkwcTa5V7lssQgA2AAngKcxxrv9YYG7X79rEWtEzaJ eOfGoF3Mxu9lRtJ/fQzNX62+CwrdqjrN0ylgU7DgFiDEDKSbgOZotQ0IHVC3RuhDea+n dtRXE6AHKr9wV7VfbWtB16RB+DkUOL2YpoiBV/vCxSK7nntEIleWL8QHTSx17DfB9K9g oBcSZzLOLwYg41p4l/w7DqNX19hRmdznRgBpsoj3jRTQ96W9YTF8O4keuu4FL0akUhwQ xfEkKISOKeVfPtkBXltXbTGojvL83AP3HQH3ZniqmLl/l9pV+vzjtBACLz0REixqLETU SBWA== X-Gm-Message-State: ABy/qLZENTosFm6nvicshUAExRE9tNKplrOfCS4BpEwOoIEYeEj4hoDi yz9yZGFz5UVWA3x2pZCZ7RqeUCs1wFo0Gm1yWxQ= X-Google-Smtp-Source: APBJJlGoWaLSHgZo8Ry+pGKoYo2X5mrr6eEnI+RzSgr+oUhcVk3HzR2qHWkSfndbDq9nc6tX3R7JL/xftNnvu+LdAgE= X-Received: by 2002:a2e:b8cd:0:b0:2b6:ef5f:51bd with SMTP id s13-20020a2eb8cd000000b002b6ef5f51bdmr4393584ljp.5.1688531095616; Tue, 04 Jul 2023 21:24:55 -0700 (PDT) Original-Received: by 2002:a05:6520:4c85:b0:268:94be:fdc7 with HTTP; Tue, 4 Jul 2023 21:24:54 -0700 (PDT) In-Reply-To: <9d5a5a90-8c29-e781-fdea-59790894cadc@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::235; envelope-from=samologist@gmail.com; helo=mail-lj1-x235.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:144117 Archived-At: true, true, but i am really focusing on actually changing fundamental navigation like backward-kill-word and similar commands to match intuition more frequently, rather than find a different thing to do, or specialize to a mode. i want to be able to be in any editing mode and just use word or paragraph or whatever commands with better results. if what i want is nonsensical or impossible, so be it. but i think maybe, idk, if point always went to beginning of thing, or non-word syntax were treated as word-like so that the / and then the / and then the --- would be killed, it might work? idk. spaces might be an issue. idk if there is a solution that makes them less of an issue. i am askiung for packages. On 7/4/23, Platon Pronko wrote: > On 2023-07-05 07:55, Samuel Wales wrote: >> ***** basic navigation and killing >> i am wondering if there are packages that can do this kind >> of thing better. >> >> this applies to any editing. here is an example. suppose i >> am on an org-mode heading, with point at ^. >> >> never mind the actual text. my goal is to transform it to >> this. >> >> *** ^gather and do physical >> >> so i do the first thing that comes to mind: c-backspace >> which runs backward-kill-word in my emacs 27.1. >> >> there are of course many other things i can do, instead, >> such as go to bol, use delete-char, etc., but i want to >> illustrate basic word killing with this example. what >> occurs is this, successively. >> >> *** --- /various to do/ and to ^gather and do physical >> *** --- /various to do/ and ^gather and do physical >> *** --- /various to do/ ^gather and do physical >> *** --- /various to ^gather and do physical >> >> i don't particularly mind the command's ignorance of org >> syntax here. >> >> *** --- /various ^gather and do physical >> *** --- /^gather and do physical >> >> and then once more to get rid of the --- syntax, which is a >> bit of an emacs editing disaster. what i wanted was to have >> it produce what i set out to do. maybe naive, but i wonder >> if there might be different killing/nav paradigms. >> >> i've been vexed by this since the 1980s with only sporadic >> attempts to see if i can improve on it. time to rely on >> others for some ideas and possible existing packages. >> please be gentle with me. am cognitively impaired. >> > > In this particular situation I'd do it like this: C-space, C-a, 4x C-f, C-w > (set mark, move to beginning of the line, move 4 characters forward, delete > selection). > Or alternatively C-space, C-a, M-4 C-f, C-w (same thing but automate > repetitive C-f). > > Actually, you can use (setq org-special-ctrl-a/e t), then you can drop 4x > C-f because C-a will take you to beginning of the heading automatically. > > If you need to do this particular thing often you can make a macro out of > it, or a small interactive function. > > By the way, there's also C-0 C-k (kill to the beginning of the line), but > that will also remove the heading asterisks, which is probably not > intended. > > -- > Best regards, > Platon Pronko > PGP 2A62D77A7A2CB94E > > -- The Kafka Pandemic A blog about science, health, human rights, and misopathy: https://thekafkapandemic.blogspot.com