From: Oleh Krehel <o.krehel@tue.nl>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 19493@debbugs.gnu.org
Subject: bug#19493: [PATCH] Fix trailing ... for outline-toggle-children
Date: Fri, 16 Jan 2015 15:12:30 +0100 [thread overview]
Message-ID: <CAJ1SQWAhEnUEQGQ6rn0SfEjqyDeOWgYj2FVBBWBo1GRmAtOLVA@mail.gmail.com> (raw)
In-Reply-To: <54B912F2.8060607@yandex.ru>
> Hi! This piece of code doesn't make sense to me:
>
> On 01/03/2015 03:04 AM, Oleh Krehel wrote:
>
> - (if (and (bolp) (or outline-blank-line (eobp)) (not (bobp)))
> + (if (and (bolp) (or outline-blank-line (eobp))
> + (not (bobp)) (not (eobp)))
>
> The second condition already checks for `eobp', so apparently the function
> is supposed to handle the end-of-buffer case.
>
> If that was an error in someone's thinking, the patch should correct that as
> well. But maybe the fix should do something in the caller instead.
You're right, I hadn't noticed before.
Alternatively, `show-entry' can be patched like this:
(defun show-entry ()
"Show the body directly following this heading.
Show the heading too, if it is currently invisible."
(interactive)
(save-excursion
(outline-back-to-heading t)
(outline-flag-region
(1- (point))
(progn
(outline-next-preface)
(min (1+ (point))
(point-max))) nil)))
The point is just not to have a single trailing hidden char, which
results from passing different bounds to `outline-flag-region' when
hiding and unhiding.
Oleh
next prev parent reply other threads:[~2015-01-16 14:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-03 0:04 bug#19493: [PATCH] Fix trailing ... for outline-toggle-children Oleh Krehel
[not found] ` <handler.19493.B.142024344824250.ack@debbugs.gnu.org>
2015-01-16 10:07 ` bug#19493: Acknowledgement ([PATCH] Fix trailing ... for outline-toggle-children) Oleh Krehel
2015-01-16 13:32 ` bug#19493: [PATCH] Fix trailing ... for outline-toggle-children Dmitry Gutov
2015-01-16 14:12 ` Oleh Krehel [this message]
2015-01-19 4:14 ` Dmitry Gutov
2015-02-07 18:07 ` Oleh Krehel
2015-02-08 0:08 ` Dmitry Gutov
2016-02-23 11:27 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJ1SQWAhEnUEQGQ6rn0SfEjqyDeOWgYj2FVBBWBo1GRmAtOLVA@mail.gmail.com \
--to=o.krehel@tue.nl \
--cc=19493@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.