[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19267: 25.0.50; Enhance cycle-spacing with a state where only whites
From: |
Lars Ingebrigtsen |
Subject: |
bug#19267: 25.0.50; Enhance cycle-spacing with a state where only whitespace after point is deleted |
Date: |
Thu, 12 May 2022 13:45:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Tassilo Horn <tsdh@gnu.org> writes:
>> I think that sounds like a good feature -- we don't have any other
>> commands for "delete all whitespace after point", do we?
>
> No, just the opposite: delete-horizontal-space with prefix arg.
Huh, I'd forgotten about that one. It's pretty odd to have both `C-\'
and `M-SPC' bound when both commands are so similar.
I guess people have different usage patterns -- for instance, I only use
`M-- M-SPC' (`just-one-space' that also deletes newlines), because
that's what's usually useful in Lisp code.
>> We could implement this as a new third state for `cycle-spacing', and
>> move the "restore" to the fourth state. Does anybody think that will
>> be annoying for people?
>
> It makes the sequence longer in case you want to restore. Not a big
> thing IMHO. But maybe there could also be a new defcustom
> cycle-spacing-actions which lists the actions being cycled, e.g.,
>
> (just-one-space delete-all-space delete-space-after restore-original)
Hm, yes, that might be good. If the list of cycled actions gets to
long, it's no longer convenient. So for myself, I'd probably have
(just-one-space-including-newlines delete-after-space restore-original)
and then `M-SPC' would do what I wanted in 99% of the time (with my
usage patterns). (We could also add target actions like `no-space' and
`no-space-before-point' (i.e., the `M-\' actions).)
So perhaps we could change the `M-SPC' binding to a new
`cycle-spacing-command' that, by default, does exactly what
`just-one-space' does now (so that there will be no user visible
changes; i.e., it doesn't cycle because cycle-spacing-actions will be
just (just-one-space)). But then users can customize it and add the
actions they want in a convenient way.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- bug#19267: 25.0.50; Enhance cycle-spacing with a state where only whitespace after point is deleted, Lars Ingebrigtsen, 2022/05/11
- bug#19267: 25.0.50; Enhance cycle-spacing with a state where only whitespace after point is deleted, Tassilo Horn, 2022/05/12
- bug#19267: 25.0.50; Enhance cycle-spacing with a state where only whitespace after point is deleted,
Lars Ingebrigtsen <=
- bug#19267: 25.0.50; Enhance cycle-spacing with a state where only whitespace after point is deleted, Tassilo Horn, 2022/05/12
- bug#19267: 25.0.50; Enhance cycle-spacing with a state where only whitespace after point is deleted, Lars Ingebrigtsen, 2022/05/12
- bug#19267: 25.0.50; Enhance cycle-spacing with a state where only whitespace after point is deleted, Robert Pluim, 2022/05/12
- bug#19267: 25.0.50; Enhance cycle-spacing with a state where only whitespace after point is deleted, Lars Ingebrigtsen, 2022/05/12
- bug#19267: 25.0.50; Enhance cycle-spacing with a state where only whitespace after point is deleted, Tassilo Horn, 2022/05/12
- bug#19267: 25.0.50; Enhance cycle-spacing with a state where only whitespace after point is deleted, Tassilo Horn, 2022/05/13
- bug#19267: 25.0.50; Enhance cycle-spacing with a state where only whitespace after point is deleted, Robert Pluim, 2022/05/13
- bug#19267: 25.0.50; Enhance cycle-spacing with a state where only whitespace after point is deleted, Tassilo Horn, 2022/05/13
- bug#19267: 25.0.50; Enhance cycle-spacing with a state where only whitespace after point is deleted, Lars Ingebrigtsen, 2022/05/13
- bug#19267: 25.0.50; Enhance cycle-spacing with a state where only whitespace after point is deleted, Robert Pluim, 2022/05/13