all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#9936: kill-line problem
@ 2011-11-01 20:46 Andrew Kurn
  2011-11-02  1:19 ` Glenn Morris
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Kurn @ 2011-11-01 20:46 UTC (permalink / raw)
  To: 9936

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







^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#9936: kill-line problem
  2011-11-01 20:46 bug#9936: kill-line problem Andrew Kurn
@ 2011-11-02  1:19 ` Glenn Morris
  2011-11-02 16:50   ` Andrew Kurn
  0 siblings, 1 reply; 7+ messages in thread
From: Glenn Morris @ 2011-11-02  1:19 UTC (permalink / raw)
  To: Andrew Kurn; +Cc: 9936

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.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#9936: kill-line problem
  2011-11-02  1:19 ` Glenn Morris
@ 2011-11-02 16:50   ` Andrew Kurn
  2011-11-02 20:11     ` Glenn Morris
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Kurn @ 2011-11-02 16:50 UTC (permalink / raw)
  To: Glenn Morris

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.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#9936: kill-line problem
  2011-11-02 16:50   ` Andrew Kurn
@ 2011-11-02 20:11     ` Glenn Morris
  2011-11-02 22:12       ` Andrew Kurn
  0 siblings, 1 reply; 7+ messages in thread
From: Glenn Morris @ 2011-11-02 20:11 UTC (permalink / raw)
  To: Andrew Kurn; +Cc: 9936


(Please keep 9936@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?





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#9936: kill-line problem
  2011-11-02 20:11     ` Glenn Morris
@ 2011-11-02 22:12       ` Andrew Kurn
  2011-11-04  0:05         ` Johan Bockgård
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Kurn @ 2011-11-02 22:12 UTC (permalink / raw)
  To: Glenn Morris; +Cc: kurn, 9936

On Wed  2 Nov 2011 16:11 -0400, Glenn Morris wrote:
> 
> 
> (Please keep 9936@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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#9936: kill-line problem
  2011-11-02 22:12       ` Andrew Kurn
@ 2011-11-04  0:05         ` Johan Bockgård
  2011-11-04  0:55           ` Glenn Morris
  0 siblings, 1 reply; 7+ messages in thread
From: Johan Bockgård @ 2011-11-04  0:05 UTC (permalink / raw)
  To: Andrew Kurn; +Cc: 9936

Andrew Kurn <kurn@sfu.ca> writes:

> On Wed  2 Nov 2011 16:11 -0400, Glenn Morris wrote:
>> 
>> 
>> (Please keep 9936@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.)





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#9936: kill-line problem
  2011-11-04  0:05         ` Johan Bockgård
@ 2011-11-04  0:55           ` Glenn Morris
  0 siblings, 0 replies; 7+ messages in thread
From: Glenn Morris @ 2011-11-04  0:55 UTC (permalink / raw)
  To: 9936-done

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! :)





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-11-04  0:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-01 20:46 bug#9936: kill-line problem Andrew Kurn
2011-11-02  1:19 ` Glenn Morris
2011-11-02 16:50   ` Andrew Kurn
2011-11-02 20:11     ` Glenn Morris
2011-11-02 22:12       ` Andrew Kurn
2011-11-04  0:05         ` Johan Bockgård
2011-11-04  0:55           ` Glenn Morris

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.