From: Philip Kaludercic <philipk@posteo.net>
To: Juri Linkov <juri@linkov.net>
Cc: 50679@debbugs.gnu.org
Subject: bug#50679: 28.0.50; outline-minor-mode-cycle should be able to only cycle at the begining of a line
Date: Mon, 20 Sep 2021 15:35:04 +0000 [thread overview]
Message-ID: <87bl4nuuon.fsf@posteo.net> (raw)
In-Reply-To: <87y27rpi4q.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 20 Sep 2021 18:25:09 +0300")
Juri Linkov <juri@linkov.net> writes:
>>> I didn't necessarily propose anything, it might only be able to solve
>>> this using a option like
>>>
>>> (defcustom outline-minor-mode-cycle-predicate ...)
>>>
>>> as to allow for users to configure cycling as they see fit. Of course if
>>> some consistent behaviour could be found that respects other options and
>>> modes, then something automatic could also be used.
>>
>> Probably offloading the decision to the users with a customizable option
>> is all what we can do here, indeed.
>
> Maybe something like:
>
> (defvar outline-mode-cycle-map
> (let ((map (make-sparse-keymap)))
> (let ((tab-binding `(menu-item
> "" outline-cycle
> ;; Only takes effect if point is on a heading.
> :filter ,(lambda (cmd)
> - (when (outline-on-heading-p) cmd)))))
> + (when (and (outline-on-heading-p)
> + (or (not (functionp outline-mode-cycle-filter))
> + (funcall outline-mode-cycle-filter)))
> + cmd)))))
> (define-key map (kbd "TAB") tab-binding)
> (define-key map (kbd "<backtab>") #'outline-cycle-buffer))
> map)
>
> Then you can customize it to 'bolp'.
I just tried it out, and it looks good. The only thing I wonder is if
this should apply to both outline-minor-mode and outline-mode?
--
Philip Kaludercic
next prev parent reply other threads:[~2021-09-20 15:35 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-19 16:24 bug#50679: 28.0.50; outline-minor-mode-cycle should be able to only cycle at the begining of a line Philip Kaludercic
2021-09-19 16:53 ` Juri Linkov
2021-09-19 20:40 ` Philip Kaludercic
2021-09-20 7:02 ` Juri Linkov
2021-09-20 15:25 ` Juri Linkov
2021-09-20 15:35 ` Philip Kaludercic [this message]
2021-09-20 18:36 ` Augusto Stoffel
2021-09-21 11:27 ` Philip Kaludercic
2021-09-21 11:44 ` Augusto Stoffel
2021-09-21 11:58 ` Philip Kaludercic
2021-09-21 19:02 ` Augusto Stoffel
2021-09-21 17:58 ` Juri Linkov
2021-09-21 18:50 ` Augusto Stoffel
2021-09-22 16:09 ` Juri Linkov
2021-09-22 16:30 ` Augusto Stoffel
2021-09-23 16:15 ` Juri Linkov
2021-09-21 17:53 ` Juri Linkov
2021-09-23 16:17 ` Juri Linkov
2021-09-26 13:59 ` Philip Kaludercic
2021-09-27 15:35 ` Juri Linkov
2021-09-27 16:16 ` Augusto Stoffel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bl4nuuon.fsf@posteo.net \
--to=philipk@posteo.net \
--cc=50679@debbugs.gnu.org \
--cc=juri@linkov.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.