From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleh Krehel Newsgroups: gmane.emacs.bugs Subject: bug#19493: [PATCH] Fix trailing ... for outline-toggle-children Date: Fri, 16 Jan 2015 15:12:30 +0100 Message-ID: References: <54B912F2.8060607@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1421417596 24230 80.91.229.3 (16 Jan 2015 14:13:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 16 Jan 2015 14:13:16 +0000 (UTC) Cc: 19493@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 16 15:13:16 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YC7eF-0002q3-JF for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Jan 2015 15:13:15 +0100 Original-Received: from localhost ([::1]:55954 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YC7eE-0004cx-VR for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Jan 2015 09:13:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35233) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YC7e7-0004bE-HF for bug-gnu-emacs@gnu.org; Fri, 16 Jan 2015 09:13:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YC7e2-0002qU-9z for bug-gnu-emacs@gnu.org; Fri, 16 Jan 2015 09:13:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49765) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YC7e2-0002qN-6p for bug-gnu-emacs@gnu.org; Fri, 16 Jan 2015 09:13:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YC7e1-0004bc-S5 for bug-gnu-emacs@gnu.org; Fri, 16 Jan 2015 09:13:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Oleh Krehel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Jan 2015 14:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19493 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 19493-submit@debbugs.gnu.org id=B19493.142141755817668 (code B ref 19493); Fri, 16 Jan 2015 14:13:01 +0000 Original-Received: (at 19493) by debbugs.gnu.org; 16 Jan 2015 14:12:38 +0000 Original-Received: from localhost ([127.0.0.1]:58626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YC7de-0004au-73 for submit@debbugs.gnu.org; Fri, 16 Jan 2015 09:12:38 -0500 Original-Received: from mail-qg0-f49.google.com ([209.85.192.49]:34374) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YC7dc-0004ag-2W for 19493@debbugs.gnu.org; Fri, 16 Jan 2015 09:12:36 -0500 Original-Received: by mail-qg0-f49.google.com with SMTP id f51so16354625qge.8 for <19493@debbugs.gnu.org>; Fri, 16 Jan 2015 06:12:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=aFb33QFJtKdQ81dl2a+hX3yWKnBacSFzrbEKl3MllHY=; b=sODbG74Mi/to/hzLCmYxljPMApqOKB8Qgr/7kRzJNL1UcrsJf/gw8ed0jR6R0ZZYOd HfgYfRZPMOpXI+vTx9YUUgUO2Fz835xPXSgLR3YhYv5HLdewKZrbNr2gG37R3S7BNcfT AXe75vhZBXS+OzUDMH/o7SpKMs6SaLjVtG11fB4a7wNVeUTjyOLS50Xal63gtSYv6DB6 W2Db/cZhN7MOrtV8cfr9Q4vdAfJPKOpGfvNBcRsIrPoSHA0XCEoi9t9tcUEa8iT7cQ/C 8fGUMRXMxGmuGfC/pqh5cIn0fTKEwf6csRZgMjaEnTsSUBAXvQFXaTA1+rMXE3Pntr8/ MDJg== X-Received: by 10.224.162.203 with SMTP id w11mr24836727qax.21.1421417550567; Fri, 16 Jan 2015 06:12:30 -0800 (PST) Original-Received: by 10.140.18.132 with HTTP; Fri, 16 Jan 2015 06:12:30 -0800 (PST) In-Reply-To: <54B912F2.8060607@yandex.ru> X-Google-Sender-Auth: Hp5S2mX-JGZpiZhO5-Fni3grtHg X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:98421 Archived-At: > 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