From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Platon Pronko Newsgroups: gmane.emacs.help Subject: Re: basic navigation Date: Wed, 5 Jul 2023 08:16:35 +0400 Message-ID: <9d5a5a90-8c29-e781-fdea-59790894cadc@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13252"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 To: Samuel Wales , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 05 06:17:23 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 1qGtxD-0003I2-6Z for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 05 Jul 2023 06:17:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qGtwZ-0001we-66; Wed, 05 Jul 2023 00:16:43 -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 1qGtwY-0001wI-8Q for help-gnu-emacs@gnu.org; Wed, 05 Jul 2023 00:16:42 -0400 Original-Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qGtwW-0003Ng-GE for help-gnu-emacs@gnu.org; Wed, 05 Jul 2023 00:16:41 -0400 Original-Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-51e00695e21so3527744a12.1 for ; Tue, 04 Jul 2023 21:16:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688530598; x=1691122598; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=oxdcsSPP4CrCih01zClqy3Wi7CYPUvVE5vOu/HhFihE=; b=N3EQh99GYN7Sk1+BlyzLRnRp4IF6U/6sbip7XW5TubpNpAb6/GPx8ZUtlttBNKcs/B Zs1Guv19CfgZN0cURNK8tJvKB0cagJmVGDZbOq0xWPNA6MMjKS2grTt4jh4HYMDT8eyW aqPD7TlqLtYYWSZZVu5y9wHT28niOMX0QeFFNSuqvvxvsMKmpr0jkB+zpPRHOrSZ00oA LPUAojm+G9Pa3eIChk3QCjuX7+40Ss4reLtmNLkcvcaZ/K5hiofDjkPClinwP5PyR/5j eBqyKJui/tbVWI9giraMhzIOagWhxWVJIBWN8dFzkvhV83WPDG/EKuwmKXP/wvq0uoNE pCwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688530598; x=1691122598; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=oxdcsSPP4CrCih01zClqy3Wi7CYPUvVE5vOu/HhFihE=; b=YPaMssczJ14K5QTX7XY3MBgeDA1/Zh0GnI42z4wCeGqaxE/+LeUWQOE1O2XIsxUalg Y/EnASaxCN/59fILkWMWt9oWXLBtd5onOt9qlpYmurGe/DkEXnKAPP1lfXa8X/q0F6Z6 Jwpa2G5qum2NXyU1Gt9TLJxh82lJLkgU6jIz2hA1nD3W1vrVRi68LDTmvrs+4v/U4Xsm vMA5fHhzCuaCrLwgQ5bFtFUzcxs4ZtDMzEM/NStvXFEqc3slbutUTEEePriOztON03XY 3qn1P+vWAvfC/W4bRixBau1Xt5TmGh6tDgwhfbpQfIS4uzivNgtfqM7TtyN9i9adZ/gB +YgQ== X-Gm-Message-State: ABy/qLabGfgsoFc7hbyj5HMkkZwzppTPOEBqB0A6pmmTygst0FwH4PfS xSMZxzzh4GZV3x02+1jWxmA= X-Google-Smtp-Source: APBJJlG+6bXw53jOUZOrb6wU7Bn4U6ZQPoqFP7Ed1SjAqEr6oUKBZSC03RkabSjX1ahKoMNnTMwAHg== X-Received: by 2002:a05:6402:32c:b0:51d:af56:a1ea with SMTP id q12-20020a056402032c00b0051daf56a1eamr10956611edw.4.1688530598268; Tue, 04 Jul 2023 21:16:38 -0700 (PDT) Original-Received: from [10.16.46.223] ([5.195.212.22]) by smtp.gmail.com with ESMTPSA id r18-20020aa7cb92000000b0051bec856cb4sm12568398edt.50.2023.07.04.21.16.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Jul 2023 21:16:38 -0700 (PDT) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=platon7pronko@gmail.com; helo=mail-ed1-x52d.google.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 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, NICE_REPLY_A=-0.09, 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:144115 Archived-At: 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