From: Oleh Krehel <o.krehel@tue.nl>
To: 19493@debbugs.gnu.org
Subject: bug#19493: [PATCH] Fix trailing ... for outline-toggle-children
Date: Sat, 3 Jan 2015 01:04:01 +0100 [thread overview]
Message-ID: <CAJ1SQWBy5+mTYPJfH__mzO9-1PkFD82HFY8WC4BZpUZj=Z2Djg@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 184 bytes --]
Hello,
Calling `outline-toggle-children' twice for a test.org with these
contents:
* foo
bar
results in:
* foo
bar...
I attach a patch to fix this.
regards,
Oleh
[-- Attachment #2: 0001-Fix-trailing-.-in-outline.patch --]
[-- Type: text/x-patch, Size: 1153 bytes --]
From a70f169e5f5d224d46b421cb800f24ea75f3709f Mon Sep 17 00:00:00 2001
From: Oleh Krehel <ohwoeowho@gmail.com>
Date: Sat, 3 Jan 2015 00:55:59 +0100
Subject: [PATCH] Fix trailing ... in outline
* lisp/outline.el (outline-next-preface): Don't go backward char when
at end of buffer.
This will fix the problem of calling `outline-toggle-children' twice
in a row for the file's last heading.
---
lisp/outline.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lisp/outline.el b/lisp/outline.el
index 11d71fb..260073d 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -420,9 +420,10 @@ or else the number of characters matched by `outline-regexp'."
If there's no following heading line, stop before the newline
at the end of the buffer."
(if (re-search-forward (concat "\n\\(?:" outline-regexp "\\)")
- nil 'move)
+ nil 'move)
(goto-char (match-beginning 0)))
- (if (and (bolp) (or outline-blank-line (eobp)) (not (bobp)))
+ (if (and (bolp) (or outline-blank-line (eobp))
+ (not (bobp)) (not (eobp)))
(forward-char -1)))
(defun outline-next-heading ()
--
1.9.1
next reply other threads:[~2015-01-03 0:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-03 0:04 Oleh Krehel [this message]
[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
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJ1SQWBy5+mTYPJfH__mzO9-1PkFD82HFY8WC4BZpUZj=Z2Djg@mail.gmail.com' \
--to=o.krehel@tue.nl \
--cc=19493@debbugs.gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).