[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
`hide-leaves' in outline.el leaves point in wrong place
From: |
Matt Swift |
Subject: |
`hide-leaves' in outline.el leaves point in wrong place |
Date: |
Sat, 17 Mar 2001 18:28:38 -0500 |
This bug report will be sent to the Free Software Foundation,
not to your local site managers!!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.
In GNU Emacs 20.7.2 (i386-debian-linux-gnu, X toolkit)
of Tue Jul 25 2000 on raven
configured using `configure i386-debian-linux-gnu --prefix=/usr
--sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib
--infodir=/usr/share/info --with-pop=yes --with-x=yes --with-x-toolkit=yes'
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
Following is the definition of `hide-leaves'.
(defun hide-leaves ()
"Hide all body after this heading at deeper levels."
(interactive)
(outline-back-to-heading)
(outline-end-of-heading)
(hide-region-body (point) (progn (outline-end-of-subtree) (point))))
It will leave point at the end of the subtree. `hide-region-body' does not
change point, and before entering `hide-region-body', point is where
`outline-end-of-subtree' leaves it. This is not a convenient place. A
reasonable place to leave point would be where `outline-end-of-heading' leaves
it. If you're hiding the leaves of something, it's reasonable to leave point
on that something when you finish. Probably that's where you stated in any
case.
My guess is that the original author intended this. One simple way to get
that result is to replace the `progn' with `save-excursion'.
Recent input:
h i d - e l backspace backspace backspace e - l e a
v e s return switch-frame C-a C-p C-p C-p C-p C-p C-c
C-s C-c C-l d c d c C-x o C-x o C-x o C-x o d c C-x
o C-x o C-x o C-x o d c C-x o C-x o q switch-frame
C-SPC C-n C-n C-n C-n C-n C-n C-n M-w M-x s u b m i
t - e m tab backspace backspace tab backspace backspace
backspace backspace backspace backspace backspace r
e p o r t - e m tab return
Recent messages:
Proceeding, will debug on next eval or call.
Entering debugger...
[2 times]
Continuing.
Entering debugger...
[2 times]
Back to top level.
Mark set
Loading emacsbug...
Loading emacsbug...done
None
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- `hide-leaves' in outline.el leaves point in wrong place,
Matt Swift <=