GNU bug report logs -
#53981
28.0.91; shortdoc: Add support for outline-minor-mode
Previous Next
Reported by: Daniel Mendler <mail <at> daniel-mendler.de>
Date: Sun, 13 Feb 2022 22:40:02 UTC
Severity: wishlist
Found in version 28.0.91
Fixed in version 29.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #32 received at 53981 <at> debbugs.gnu.org (full text, mbox):
Juri Linkov <juri <at> linkov.net> writes:
> Is this a promising direction?
[...]
> + (setq-local outline-level (lambda () (if (eq (char-after) ?\() 2 1)))
> + (setq-local outline-search-function
> + (lambda (&optional looking-at)
> + (save-excursion
> + (let* ((prop-at (if looking-at
> + (get-text-property (point) 'shortdoc-section)
> + t))
> + (prop-match (and prop-at (text-property-search-forward 'shortdoc-section))))
> + (when prop-match
> + (set-match-data (list (prop-match-beginning prop-match)
> + (prop-match-end prop-match)))
> + t))))))
No, I was thinking that modes like this would just put a text property
like `outline-heading' (or even just `heading') on the heading, and then
outline-minor-mode would use that.
I.e., we make modes that generate buffers provide semantics for the data
it's inserted, and then outline-minor-mode reacts to those semantics.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 2 years and 183 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.