Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

seems to be a general bug with line hiding if lines not starting in column 0

6 views
Skip to first unread message

unfrostedpoptart

unread,
Feb 4, 2012, 8:26:10 PM2/4/12
to
This is way beyond me to figure out. I've been working with outline-minor-mode and orgstruct (org-mode's minor mode). Any time a headline line has whitespace at the beginning, when it's folded/hidden, the display is wrong. The following headline is on the same line.

For example:

* Headline1a
** H2a
*** H3a
*** H3b
** H2b
* H1b

If I fold headline H2a, I should get this:

* Headline1a
** H2a ...
** H2b
* H1b

But instead get this:

* Headline1a
** H2a ... ** H2b
* H1b

I just notice that the same thing happens in dired. If I include listings of several sub-directories and then hide the first one ($ / M-x dired-hide-subdir) the next subdir is listed on the same line instead of on the next line, which really messes things up.

I've only noticed all this recently, while using 23.3.1, so I don't know if older versions had this. However, I just tried 24.0.93.1 and it's doing the same thing.

Is this bug in one place? Are these different modes using totally different mechanisms for hiding parts of the buffer? It would be really helpful to my programming if this worked correctly, but again, this is way past my minimal (but growing) knowledge of emacs internals.

Thanks for any info on this, including how to at least get this fixed in 24 if it can't be fixed in 23.

David

Michael Heerdegen

unread,
Feb 15, 2012, 4:31:02 PM2/15/12
to help-gn...@gnu.org
unfrostedpoptart <da...@therogoffs.com> writes:

> This is way beyond me to figure out. I've been working with
> outline-minor-mode and orgstruct (org-mode's minor mode). Any time a
> headline line has whitespace at the beginning, when it's
> folded/hidden, the display is wrong. The following headline is on the
> same line.

Looking at the sources, outline seems not to allow headlines with
whitespace at the beginning per default.

I think you could get it work, but you would have to modify some
variables like `outline-regexp' and `outline-heading-alist'. Maybe it's
not worth the trouble if you are don't want to deal with internals.

> I just notice that the same thing happens in dired. If I include
> listings of several sub-directories and then hide the first one ($ /
> M-x dired-hide-subdir) the next subdir is listed on the same line
> instead of on the next line, which really messes things up.

I think that is a different issue.

I don't see this behavior here, neither with Emacs 23.3, nor with 24.
Does this happen with emacs -Q? Which operating system do you use?


Michael.

Michael Heerdegen

unread,
Feb 15, 2012, 6:55:51 PM2/15/12
to help-gn...@gnu.org
Michael Heerdegen <michael_...@web.de> writes:

> Looking at the sources, outline seems not to allow headlines with
> whitespace at the beginning per default.

I wonder why you could hide such lines at all with outline-minor-mode.
I can't do that with the default setup.

> I think you could get it work, but you would have to modify some
> variables like `outline-regexp' and `outline-heading-alist'. Maybe it's
> not worth the trouble if you are don't want to deal with internals.

Here is an example file with proper local variable settings that works
for me:


--8<---------------cut here---------------start------------->8---
* Headline1a
** H2a
*** H3a
*** H3b
** H2b

* H1b


Local variables:
outline-regexp: " *\\(\\*+\\)"
outline-level: (lambda () (- (match-end 1) (match-beginning 1)))
eval: (outline-minor-mode)
End:

--8<---------------cut here---------------end--------------->8---


Michael.

0 new messages