GNU bug report logs -
#19102
24.4; outline-move-subtree-up/down error at last and second-last subtree
Previous Next
Reported by: Paul Rankin <paul <at> tilk.co>
Date: Wed, 19 Nov 2014 08:34:01 UTC
Severity: normal
Found in version 24.4
Done: Stephen Berman <stephen.berman <at> gmx.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Wed, 19 Nov 2014 17:54:41 +0200 Eli Zaretskii <eliz <at> gnu.org> wrote:
>> From: Stephen Berman <stephen.berman <at> gmx.net>
>> Date: Wed, 19 Nov 2014 14:17:25 +0100
>> Cc: 19102 <at> debbugs.gnu.org
>>
>> The following patch (against master) seems to fix this, though it could
>> probably be done more elegantly.
>
> Thanks. Can you explain why the problem happened in the first place?
The error occurs when the sexp `(= (char-after) ?\n)' in
outline-move-subtree-down is evaluated at eob. This can happen either
when calling outline-move-subtree-down on either of the last two
subtrees, or when calling outline-move-subtree-up on the last subtree.
There are two triggers: (i) finding the end point of the subtree to be
moved up or down, and (ii) finding the insertion point to move the
selected subtree down to. The patch avoids the error by making sure
there is a line after the final subtree, adding it if necessary and then
deleting the added line after the move.
>> + ;; Make sure we can move forward when needed (bug#19102).
>
> Please only mention the bug number in comments if the code or the rest
> of the comment text do not speak for themselves, and there are some
> subtle issues here that can only be understood by reading the bug
> discussion. Otherwise, the bug number will appear in the commit log,
> so no need to put it in the code.
That occurred to me when I made the ChangeLog entry in my local tree; if
the patch is accepted, I'll remove the bug number from the comment.
Steve Berman
This bug report was last modified 10 years and 237 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.