* basic navigation @ 2023-07-05 3:55 Samuel Wales 2023-07-05 4:16 ` Platon Pronko ` (2 more replies) 0 siblings, 3 replies; 9+ messages in thread From: Samuel Wales @ 2023-07-05 3:55 UTC (permalink / raw) To: help-gnu-emacs ***** 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. -- The Kafka Pandemic A blog about science, health, human rights, and misopathy: https://thekafkapandemic.blogspot.com ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: basic navigation 2023-07-05 3:55 basic navigation Samuel Wales @ 2023-07-05 4:16 ` Platon Pronko 2023-07-05 4:24 ` Samuel Wales 2023-07-05 4:17 ` Samuel Wales 2023-07-05 5:51 ` Emanuel Berg 2 siblings, 1 reply; 9+ messages in thread From: Platon Pronko @ 2023-07-05 4:16 UTC (permalink / raw) To: Samuel Wales, help-gnu-emacs 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: basic navigation 2023-07-05 4:16 ` Platon Pronko @ 2023-07-05 4:24 ` Samuel Wales 2023-07-05 4:33 ` Platon Pronko 0 siblings, 1 reply; 9+ messages in thread From: Samuel Wales @ 2023-07-05 4:24 UTC (permalink / raw) To: Platon Pronko; +Cc: help-gnu-emacs 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 <platon7pronko@gmail.com> 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: basic navigation 2023-07-05 4:24 ` Samuel Wales @ 2023-07-05 4:33 ` Platon Pronko 2023-07-05 4:41 ` Samuel Wales 0 siblings, 1 reply; 9+ messages in thread From: Platon Pronko @ 2023-07-05 4:33 UTC (permalink / raw) To: Samuel Wales; +Cc: help-gnu-emacs On 2023-07-05 08:24, Samuel Wales wrote: > 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. forward-word docs mention that you can tweak how word boundaries are determined: > The word boundaries are normally determined by the buffer's syntax > table and character script (according to `char-script-table'), but > `find-word-boundary-function-table', such as set up by `subword-mode', > can change that. If a Lisp program needs to move by words determined > strictly by the syntax table, it should use `forward-word-strictly' > instead. See Info node `(elisp) Word Motion' for details. -- Best regards, Platon Pronko PGP 2A62D77A7A2CB94E ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: basic navigation 2023-07-05 4:33 ` Platon Pronko @ 2023-07-05 4:41 ` Samuel Wales 0 siblings, 0 replies; 9+ messages in thread From: Samuel Wales @ 2023-07-05 4:41 UTC (permalink / raw) To: Platon Pronko; +Cc: help-gnu-emacs for purposes of this discussion, please assume utf-8 and english if necessary. i've found syntax tables to be usually wrong for what i want in most modes, and i don't think i could fix them to be right. On 7/4/23, Platon Pronko <platon7pronko@gmail.com> wrote: > On 2023-07-05 08:24, Samuel Wales wrote: >> 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. > > forward-word docs mention that you can tweak how word boundaries are > determined: > >> The word boundaries are normally determined by the buffer's syntax >> table and character script (according to `char-script-table'), but >> `find-word-boundary-function-table', such as set up by `subword-mode', >> can change that. If a Lisp program needs to move by words determined >> strictly by the syntax table, it should use `forward-word-strictly' >> instead. See Info node `(elisp) Word Motion' for details. > -- > Best regards, > Platon Pronko > PGP 2A62D77A7A2CB94E > > -- The Kafka Pandemic A blog about science, health, human rights, and misopathy: https://thekafkapandemic.blogspot.com ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: basic navigation 2023-07-05 3:55 basic navigation Samuel Wales 2023-07-05 4:16 ` Platon Pronko @ 2023-07-05 4:17 ` Samuel Wales 2023-07-05 5:51 ` Emanuel Berg 2 siblings, 0 replies; 9+ messages in thread From: Samuel Wales @ 2023-07-05 4:17 UTC (permalink / raw) To: help-gnu-emacs there are a few issues here actually. first is that non-words get gobbled up along with words. this is too much for my taste. i'd be ok with each chunk of non-word syntax being kind of like a word, for example. the other thing i did not illustrate. going left means going to bow. but going right means going to, not eow, but the space. similar with paragraphs and so on. suppose i am at bow. this is ^a word. and i want to kill-word that. i end up with 2 spaces. so sometimes i do gyrations to kill the right thing. it's too much for me. the adage that emacs is a superb os but it lacks a decent editor is, for me, almost true, with these little [intentional, but not quite working well for me] glitches. maybe a package? On 7/4/23, Samuel Wales <samologist@gmail.com> 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. > > -- > The Kafka Pandemic > > A blog about science, health, human rights, and misopathy: > https://thekafkapandemic.blogspot.com > -- The Kafka Pandemic A blog about science, health, human rights, and misopathy: https://thekafkapandemic.blogspot.com ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: basic navigation 2023-07-05 3:55 basic navigation Samuel Wales 2023-07-05 4:16 ` Platon Pronko 2023-07-05 4:17 ` Samuel Wales @ 2023-07-05 5:51 ` Emanuel Berg 2023-07-13 0:18 ` Samuel Wales 2 siblings, 1 reply; 9+ messages in thread From: Emanuel Berg @ 2023-07-05 5:51 UTC (permalink / raw) To: help-gnu-emacs Samuel Wales wrote: > 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 ? Transform what into what? As for editing commands, don't think, just use them ... -- underground experts united https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: basic navigation 2023-07-05 5:51 ` Emanuel Berg @ 2023-07-13 0:18 ` Samuel Wales 2023-07-13 0:34 ` Emanuel Berg 0 siblings, 1 reply; 9+ messages in thread From: Samuel Wales @ 2023-07-13 0:18 UTC (permalink / raw) To: help-gnu-emacs i have forgotten other editors. in emacs, in english, c-right will take you to after a word, but asymmetrically c-left to first letter. i wonder if all editors do that. On 7/4/23, Emanuel Berg <incal@dataswamp.org> wrote: > Samuel Wales wrote: > >> 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 > > ? > > Transform what into what? > > As for editing commands, don't think, just use them ... > > -- > underground experts united > https://dataswamp.org/~incal > > > -- The Kafka Pandemic A blog about science, health, human rights, and misopathy: https://thekafkapandemic.blogspot.com ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: basic navigation 2023-07-13 0:18 ` Samuel Wales @ 2023-07-13 0:34 ` Emanuel Berg 0 siblings, 0 replies; 9+ messages in thread From: Emanuel Berg @ 2023-07-13 0:34 UTC (permalink / raw) To: help-gnu-emacs Samuel Wales wrote: > i have forgotten other editors. in emacs, in english, > c-right will take you to after a word, but asymmetrically > c-left to first letter. Seemingly, if you look at the cursor, but type a letter and you will see it is symmetric. `backward-word', M-b, move point to immediately before the word `forward-word' M-f, same but immediately after. -- underground experts united https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-07-13 0:34 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-07-05 3:55 basic navigation Samuel Wales 2023-07-05 4:16 ` Platon Pronko 2023-07-05 4:24 ` Samuel Wales 2023-07-05 4:33 ` Platon Pronko 2023-07-05 4:41 ` Samuel Wales 2023-07-05 4:17 ` Samuel Wales 2023-07-05 5:51 ` Emanuel Berg 2023-07-13 0:18 ` Samuel Wales 2023-07-13 0:34 ` Emanuel Berg
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).