GNU bug report logs - #9936
kill-line problem

Previous Next

Package: emacs;

Reported by: Andrew Kurn <kurn <at> sfu.ca>

Date: Tue, 1 Nov 2011 20:50:02 UTC

Severity: normal

Fixed in version 22.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 9936 in the body.
You can then email your comments to 9936 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#9936; Package emacs. (Tue, 01 Nov 2011 20:50:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andrew Kurn <kurn <at> sfu.ca>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 01 Nov 2011 20:50:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andrew Kurn <kurn <at> sfu.ca>
To: bug-gnu-emacs <at> gnu.org
Subject: kill-line problem
Date: Tue, 1 Nov 2011 13:46:42 -0700
I'm getting a problem using kill-line in a buffer with much invisible text.
Instead of killing one line, it kills on and on til the end of the buffer.

Version is 21.2.1.
kill-whole-line = t
emacs -nw   (I have found other bugs persisting in this less popular use
      	    of emacs.)

I know you will ask me to reproduce the bug in the latest version of
emacs, but I don't want to get side-tracked right now, and I figure
that a preliminary bug-report is better than none at all.

Has anyone seen this one before?  Worked on it?

Thanks and keep up the good work.
Andrew






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9936; Package emacs. (Wed, 02 Nov 2011 01:23:02 GMT) Full text and rfc822 format available.

Message #8 received at 9936 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Andrew Kurn <kurn <at> sfu.ca>
Cc: 9936 <at> debbugs.gnu.org
Subject: Re: bug#9936: kill-line problem
Date: Tue, 01 Nov 2011 21:19:40 -0400
Andrew Kurn wrote:

> I'm getting a problem using kill-line in a buffer with much invisible text.
> Instead of killing one line, it kills on and on til the end of the buffer.
>
> Version is 21.2.1.
> kill-whole-line = t

It sounds like the intended behaviour. With kill-whole-line non-nil,
kill-line kills up to wherever forward-visible-line ends up. Ie,
invisible newlines are ignored.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9936; Package emacs. (Wed, 02 Nov 2011 17:38:02 GMT) Full text and rfc822 format available.

Message #11 received at 9936 <at> debbugs.gnu.org (full text, mbox):

From: Andrew Kurn <kurn <at> sfu.ca>
To: Glenn Morris <rgm <at> gnu.org>
Subject: Re: bug#9936: kill-line problem
Date: Wed, 2 Nov 2011 09:50:24 -0700
On Tue  1 Nov 2011 21:19 -0400, Glenn Morris wrote:


> Andrew Kurn wrote:
> 
> > I'm getting a problem using kill-line in a buffer with much invisible text.
> > Instead of killing one line, it kills on and on til the end of the buffer.
> >
> > Version is 21.2.1.
> > kill-whole-line = t
> 
> It sounds like the intended behaviour. With kill-whole-line non-nil,
> kill-line kills up to wherever forward-visible-line ends up. Ie,
> invisible newlines are ignored.


No, sorry, but there are several visible newlines in the way.  It eats
them all up.

A

PS.  Thanks for writing.  It's always a surprise to hear from a human.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9936; Package emacs. (Wed, 02 Nov 2011 20:14:02 GMT) Full text and rfc822 format available.

Message #14 received at 9936 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Andrew Kurn <kurn <at> sfu.ca>
Cc: 9936 <at> debbugs.gnu.org
Subject: Re: bug#9936: kill-line problem
Date: Wed, 2 Nov 2011 16:11:30 -0400
(Please keep 9936 <at> debbugs cc'd)

Andrew Kurn wrote (on Wed, 2 Nov 2011 at 09:50 -0700):

> > It sounds like the intended behaviour. With kill-whole-line non-nil,
> > kill-line kills up to wherever forward-visible-line ends up. Ie,
> > invisible newlines are ignored.
> 
> No, sorry, but there are several visible newlines in the way.  It eats
> them all up.

Can you give a recipe showing how to reproduce the problem, starting
from emacs -q --no-site-file?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9936; Package emacs. (Wed, 02 Nov 2011 22:16:02 GMT) Full text and rfc822 format available.

Message #17 received at 9936 <at> debbugs.gnu.org (full text, mbox):

From: Andrew Kurn <kurn <at> sfu.ca>
To: Glenn Morris <rgm <at> gnu.org>
Cc: kurn <at> sfu.ca, 9936 <at> debbugs.gnu.org
Subject: Re: bug#9936: kill-line problem
Date: Wed, 2 Nov 2011 15:12:50 -0700
On Wed  2 Nov 2011 16:11 -0400, Glenn Morris wrote:
> 
> 
> (Please keep 9936 <at> debbugs cc'd)
> 
> Andrew Kurn wrote (on Wed, 2 Nov 2011 at 09:50 -0700):
> 
> > > It sounds like the intended behaviour. With kill-whole-line non-nil,
> > > kill-line kills up to wherever forward-visible-line ends up. Ie,
> > > invisible newlines are ignored.
> > 
> > No, sorry, but there are several visible newlines in the way.  It eats
> > them all up.
> 
> Can you give a recipe showing how to reproduce the problem, starting
> from emacs -q --no-site-file?


This seems to work:

emacs -nw -q --no-site-file

(setq ss (concat (make-string 10 ?X) "," ))


(put-text-property 0 10 'invisible t ss)


(insert ss ss ss "\n" ss ss ss "\n" ss ss ss "\n" ss ss ss "\n" )


(setq kill-whole-line t)

---

Then use ^K to kill the first line.  They all disappear.


(let ((kill-whole-line t))
  (kill-line))


This seems to have the value "kill-region" . . . if that makes any
sense.

Andrew




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9936; Package emacs. (Fri, 04 Nov 2011 00:08:02 GMT) Full text and rfc822 format available.

Message #20 received at 9936 <at> debbugs.gnu.org (full text, mbox):

From: Johan Bockgård <bojohan <at> gnu.org>
To: Andrew Kurn <kurn <at> sfu.ca>
Cc: Glenn Morris <rgm <at> gnu.org>, 9936 <at> debbugs.gnu.org
Subject: Re: bug#9936: kill-line problem
Date: Fri, 04 Nov 2011 01:05:21 +0100
Andrew Kurn <kurn <at> sfu.ca> writes:

> On Wed  2 Nov 2011 16:11 -0400, Glenn Morris wrote:
>> 
>> 
>> (Please keep 9936 <at> debbugs cc'd)
>> 
>> Andrew Kurn wrote (on Wed, 2 Nov 2011 at 09:50 -0700):
>> 
>> > > It sounds like the intended behaviour. With kill-whole-line non-nil,
>> > > kill-line kills up to wherever forward-visible-line ends up. Ie,
>> > > invisible newlines are ignored.
>> > 
>> > No, sorry, but there are several visible newlines in the way.  It eats
>> > them all up.
>> 
>> Can you give a recipe showing how to reproduce the problem, starting
>> from emacs -q --no-site-file?
>
>
> This seems to work:
>
> emacs -nw -q --no-site-file
>
> (setq ss (concat (make-string 10 ?X) "," ))
>
>
> (put-text-property 0 10 'invisible t ss)
>
>
> (insert ss ss ss "\n" ss ss ss "\n" ss ss ss "\n" ss ss ss "\n" )
>
>
> (setq kill-whole-line t)

I can reproduce this bug in Emacs 21, but it appears to be fixed in
Emacs 22 and later. (The problem was in forward-visible-line.)




Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Fri, 04 Nov 2011 00:59:02 GMT) Full text and rfc822 format available.

Notification sent to Andrew Kurn <kurn <at> sfu.ca>:
bug acknowledged by developer. (Fri, 04 Nov 2011 00:59:02 GMT) Full text and rfc822 format available.

Message #25 received at 9936-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 9936-done <at> debbugs.gnu.org
Subject: Re: bug#9936: kill-line problem
Date: Thu, 03 Nov 2011 20:55:59 -0400
Version: 22.1

>> emacs -nw -q --no-site-file
>>
>> (setq ss (concat (make-string 10 ?X) "," ))
>>
>>
>> (put-text-property 0 10 'invisible t ss)
>>
>>
>> (insert ss ss ss "\n" ss ss ss "\n" ss ss ss "\n" ss ss ss "\n" )
>>
>>
>> (setq kill-whole-line t)
>
> I can reproduce this bug in Emacs 21, but it appears to be fixed in
> Emacs 22 and later. (The problem was in forward-visible-line.)

Yes, I also see it in 21.4, but not in 22.1 or 23.3, so I'm closing
this as fixed in 22.1.

Thanks for the bug recipe. You are encouraged to upgrade to a more
recent Emacs! :)




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 02 Dec 2011 12:24:02 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 203 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.