Article View: gnu.emacs.bug
Article #98431Re: outline-mode show-children
From: Todd Kaufmann
Date: Thu, 15 Aug 1991 05:00
Date: Thu, 15 Aug 1991 05:00
54 lines
2592 bytes
2592 bytes
I'm not sure what the problem is; maybe has to do with the value that outline-level returns--it's the length of the string-match for a match on the outline-regexp. So a match of "@\\(sub\\)*section" will be of length 8, 11, 14, etc. Outline mode doesn't know that something at level 8 doesn't have children of level 9. Try a modification based on the regexps below. This is for TeX, so change the initial \\ to @, or use [\\@] for both TeX/Texinfo. When you want something shorter to match at a lower level, you can pad it with `any char'. For example, below I could make \figure appear at the same level as \subsubse by adding a "figure.." disjunt to the regexp. Another example: if there are separator "higher" and "lower", and I want lower to be at a lower level, I would use "^\\(higher\\|lower..\\)". The "." won't match a new line, so if nothing might occur after a string such as lower, then the "." would need to be replaced with something like "\\(.\\|\n\\)", I think. Try it and see. I used to use outline-minor mode for all my lisp and tex files; I don't remember why I stopped. ; ;(defun tex-outline-mode () ; "Like outline mode, but sets the regexp for TeX." ; (interactive) ; (set-outline-minor tex-mode-map) ; ;;(setq mode-name "TeX Outline") ; (make-local-variable 'outline-regexp) ; (setq outline-regexp ; "^\\\\(part\\|chapt\\|appen\\|sectio\\|subsect\\|subsubse\\|paragraph\\|subparagra\\|table\\)") ; ) ;;;Matches these, in order ;;; part ;;; chapt ;;; appen ;;; sectio ;;; subsect ;;; subsubse ;;; paragraph ;;; subparagra ;;; ;;; table - contents- should go where? -todd ;; ATR Interpreting Telephony Research Laboratories ;; Sanpeidani Inuidani, Seika-cho Soraku-gun, Kyoto 619-02 Japan ;; email: todd@atr-la.atr.co.jp, toad@cs.cmu.edu ;; +81 - 7749 5 1340 fax: +81 - 7749 5 1308
Technical Details
Message-ID:
<TODD.91Aug15140059@as03.atr-la.atr.co.jp>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cis.ohio-state.edu!as03.ATr-la.ATr.co.JP!toddReferences:
<9108091312.AA21705@ecmwf.co.uk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,cd3bd217ebcd7aaa X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1991-08-14 22:00:59 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cis.ohio-state.edu!as03.ATr-la.ATr.co.JP!todd From: todd@as03.ATr-la.ATr.co.JP (Todd Kaufmann) Newsgroups: gnu.emacs.bug Subject: Re: outline-mode show-children Message-ID: <TODD.91Aug15140059@as03.atr-la.atr.co.jp> Date: 15 Aug 91 05:00:59 GMT References: <9108091312.AA21705@ecmwf.co.uk> Sender: gnulists@ai.mit.edu Reply-To: todd@atr-la.atr.co.jp Distribution: gnu Organization: ATR Interpreting Telephony Research Labs., Japan Lines: 54 Approved: bug-gnu-emacs@prep.ai.mit.edu