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
Stephen Berman <stephen.berman <at> gmx.net> writes:
> On Wed, 19 Nov 2014 22:32:06 +0200 Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>>> From: Stephen Berman <stephen.berman <at> gmx.net>
>>> Cc: paul <at> tilk.co, 19102 <at> debbugs.gnu.org
>>> Date: Wed, 19 Nov 2014 21:14:42 +0100
>>>
>>> > Wouldn't using eolp instead of the comparison solve that problem more
>>> > easily?
>>>
>>> Well, that eliminates the wrong-type-argument error in the current code,
>>> but it instead signals "End of buffer"
>>
>> From forward-char? If so, you could avoid the call if eobp. Or wrap
>> the call in condition-case and ignore errors.
>
> Those solutions work only if there's an empty line after the last
> subtree. If there isn't, I can't see any way other than my patch.
>
>>> Do you see any other problems with the patch or more room for
>>> improvement?
>>
>> I was worried by the complexity of maybe-forward-char, but maybe now
>> it is much simpler.
>
> I simplified it just a bit more, but that's all I can think of. I also
> had overlooked a side-effect of the error signaled when trying to move
> the last subtree down: it leaves a dangling newline; this is avoided
> using with-demoted-errors. The revised patch is appended.
>
> Steve Berman
Sorry if there is some very obvious reason I'm missing, but can't we
just change
(= (char-after) ?\n)
to
(eq (char-after) ?\n)
...?
--
Paul W. Rankin
http://www.paulwrankin.com
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.