unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
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: Sat, 7 Feb 2015 19:07:56 +0100	[thread overview]
Message-ID: <CAJ1SQWBBzRD0T=yvh9cuEdKKoqh2dpubTvKWQvSpe9m0SgAuhg@mail.gmail.com> (raw)
In-Reply-To: <54BC84A8.7030508@yandex.ru>

[-- Attachment #1: Type: text/plain, Size: 504 bytes --]

I attach the updated patch.

On 19 January 2015 at 05:14, Dmitry Gutov <dgutov@yandex.ru> wrote:

> That doesn't seem to be the full solution either. For instance, if the
> current heading has subheadings, with or without your patch "..." will
> remain at the end of the last of them.

If you're using `outline-toggle-children', it's supposed to leave the
children hidden.

The patch basically just fixes `outline-show-entry', which was is called by
`outline-toggle-children' in my original issue.

Oleh

[-- Attachment #2: 0001-lisp-outline.el-outline-show-entry-Fix-one-invisible.patch --]
[-- Type: text/x-patch, Size: 1183 bytes --]

From 78ada3f9fcbd6fa066038325174561bf6a95e493 Mon Sep 17 00:00:00 2001
From: Oleh Krehel <ohwoeowho@gmail.com>
Date: Sat, 7 Feb 2015 18:54:07 +0100
Subject: [PATCH] lisp/outline.el (outline-show-entry): Fix one invisible char

* lisp/outline.el (outline-show-entry): Previously, when called for
the last outline in a file, a single invisible char was left.
Add a check for this condition.
---
 lisp/outline.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lisp/outline.el b/lisp/outline.el
index ae31b80..059ca62 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -777,7 +777,12 @@ Show the heading too, if it is currently invisible."
   (save-excursion
     (outline-back-to-heading t)
     (outline-flag-region (1- (point))
-                         (progn (outline-next-preface) (point)) nil)))
+                         (progn
+                           (outline-next-preface)
+                           (if (= 1 (- (point-max) (point)))
+                               (point-max)
+                             (point)))
+                         nil)))
 
 (define-obsolete-function-alias
     'show-entry 'outline-show-entry "25.1")
-- 
1.8.4


  reply	other threads:[~2015-02-07 18:07 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
2015-01-19  4:14     ` Dmitry Gutov
2015-02-07 18:07       ` Oleh Krehel [this message]
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='CAJ1SQWBBzRD0T=yvh9cuEdKKoqh2dpubTvKWQvSpe9m0SgAuhg@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 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).