0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-25 12:32:52 +00:00

Fix bug with showing empty lines before header

PT writes:

> I tried this new setting with 6.30 and it works well, thanks for
> this.
>
> The only strange case is when a header line doesn't have any
> content, only empty lines.
>
> So if there are 2 empty lines between headers
>
> * header1
>
>
> * header2
>
>
> Then the first empty line after header1 is folded regardless of
> the -1 setting.  If I understand the feature correctly no folding
> should occur in this case either.
This commit is contained in:
Carsten Dominik 2009-09-04 10:59:36 +02:00
parent 291a6db848
commit 0c646a1b57
2 changed files with 7 additions and 1 deletions

View file

@ -2,6 +2,8 @@
* org.el (org-offer-links-in-entry): New argument ZERO to
implement a link with index zero.
(org-cycle-show-empty-lines): Not keep empty line under header
hidden.
* org-agenda.el (org-agenda-open-link): Pass the prefix to
`org-offer-links-in-entry'.

View file

@ -5261,7 +5261,11 @@ are at least `org-cycle-separator-lines' empty lines before the headline."
(setq b (save-excursion
(goto-char (match-beginning 0))
(org-back-over-empty-lines)
(point)))
(if (save-excursion
(goto-char (max (point-min) (1- (point))))
(org-on-heading-p))
(1- (point))
(point))))
(setq b (match-beginning 1)))
(outline-flag-region b e nil)))))))
;; Never hide empty lines at the end of the file.