unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* paste when cursor is in the fringe
@ 2006-08-11  7:03 Klaus Zeitler
  2006-08-11  7:11 ` Nick Roberts
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Klaus Zeitler @ 2006-08-11  7:03 UTC (permalink / raw)


I noticed that I can't paste into a line when the cursor is in the fringe,
i.e. when the line is filled up to the last column.

-- 
 ------------------------------------------
|  Klaus Zeitler      Lucent Technologies  |
|  Email:             kzeitler@lucent.com  |
 ------------------------------------------
---
Early to rise, and early to bed
makes a man healthy but socially dead

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

* Re: paste when cursor is in the fringe
  2006-08-11  7:03 paste when cursor is in the fringe Klaus Zeitler
@ 2006-08-11  7:11 ` Nick Roberts
  2006-08-11  8:12   ` Klaus Zeitler
  2006-08-11 14:25 ` monnier
  2006-08-11 19:23 ` Richard Stallman
  2 siblings, 1 reply; 17+ messages in thread
From: Nick Roberts @ 2006-08-11  7:11 UTC (permalink / raw)
  Cc: emacs-devel

 > I noticed that I can't paste into a line when the cursor is in the fringe,
 > i.e. when the line is filled up to the last column.

What does that mean?  C-y (yank), menubar->edit->paste (x-clipboard-yank),
mouse-2 (mouse-yank-at-click)...?  I can do the first two but not the last
(because mouse-2 isn't defined in the fringe) and it would be odd to click
on it anyway.

-- 
Nick                                           http://www.inet.net.nz/~nickrob

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

* Re: paste when cursor is in the fringe
  2006-08-11  7:11 ` Nick Roberts
@ 2006-08-11  8:12   ` Klaus Zeitler
  2006-08-11  8:16     ` Mathias Dahl
  0 siblings, 1 reply; 17+ messages in thread
From: Klaus Zeitler @ 2006-08-11  8:12 UTC (permalink / raw)
  Cc: emacs-devel

>>>>> "Nick" == Nick Roberts <nickrob@snap.net.nz> writes:
    Nick> 
    Nick> What does that mean?  C-y (yank), menubar->edit->paste
    Nick> (x-clipboard-yank), mouse-2 (mouse-yank-at-click)...?

Sorry, I meant mouse-2. I noticed that when I tried a copy and paste from
another application. When I already use the mouse for cut or copy, I also
use it to paste.

    Nick> I can do the first two but not the last (because mouse-2 isn't
    Nick> defined in the fringe) and it would be odd to click on it anyway.

Why is that odd. I think it'd be nice, if one could use mouse-2 iff the cursor
is in the fringe (though I don't know if it's easy to implement).



-- 
 ------------------------------------------
|  Klaus Zeitler      Lucent Technologies  |
|  Email:             kzeitler@lucent.com  |
 ------------------------------------------
---
God is real, unless declared integer.

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

* Re: paste when cursor is in the fringe
  2006-08-11  8:12   ` Klaus Zeitler
@ 2006-08-11  8:16     ` Mathias Dahl
  2006-08-11  8:53       ` Nick Roberts
  2006-08-12 14:27       ` Richard Stallman
  0 siblings, 2 replies; 17+ messages in thread
From: Mathias Dahl @ 2006-08-11  8:16 UTC (permalink / raw)
  Cc: Nick Roberts, emacs-devel

>     Nick> I can do the first two but not the last (because mouse-2 isn't
>     Nick> defined in the fringe) and it would be odd to click on it anyway.
>
> Why is that odd. I think it'd be nice, if one could use mouse-2 iff the cursor
> is in the fringe (though I don't know if it's easy to implement).

FYI I just bound mouse-2 on the fringe (using M-x local-set-key) to
mouse-yank-at-click, and it seemed to work OK.

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

* Re: paste when cursor is in the fringe
  2006-08-11  8:16     ` Mathias Dahl
@ 2006-08-11  8:53       ` Nick Roberts
  2006-08-11 10:05         ` Klaus Zeitler
  2006-08-12 14:27       ` Richard Stallman
  1 sibling, 1 reply; 17+ messages in thread
From: Nick Roberts @ 2006-08-11  8:53 UTC (permalink / raw)
  Cc: Klaus Zeitler, emacs-devel

Mathias Dahl writes:
 > >     Nick> I can do the first two but not the last (because mouse-2 isn't
 > >     Nick> defined in the fringe) and it would be odd to click on it anyway.
 > >
 > > Why is that odd. I think it'd be nice, if one could use mouse-2 iff the cursor
 > > is in the fringe (though I don't know if it's easy to implement).

I think this feature would rarely be needed and it seems a bit unintuitive as
the fringe isn't part of the text area.  A different possibility is to bind
mouse-1 to toggle-truncate-lines when a truncation/continuation fringe
indicator is present.

 > FYI I just bound mouse-2 on the fringe (using M-x local-set-key) to
 > mouse-yank-at-click, and it seemed to work OK.

I imagine in this case it would work even if the cursor wasn't in the
margin.


-- 
Nick                                           http://www.inet.net.nz/~nickrob

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

* Re: paste when cursor is in the fringe
  2006-08-11  8:53       ` Nick Roberts
@ 2006-08-11 10:05         ` Klaus Zeitler
  0 siblings, 0 replies; 17+ messages in thread
From: Klaus Zeitler @ 2006-08-11 10:05 UTC (permalink / raw)
  Cc: emacs-devel, Mathias Dahl

>>>>> "Nick" == Nick Roberts <nickrob@snap.net.nz> writes:
    Nick> 
    Nick> I think this feature would rarely be needed and it seems a bit

Agreed for people who rarely use the mouse for cut and paste (I've been using
emacs with fringes for quite some time and so far hadn't noticed it).
But I've seen quite a few users who do almost everything with the mouse.

    Nick> unintuitive as the fringe isn't part of the text area.  A different
    Nick> possibility is to bind mouse-1 to toggle-truncate-lines when a
    Nick> truncation/continuation fringe indicator is present.

Interesting idea, but I don't think mouse-1 would be a good choice.

    >> FYI I just bound mouse-2 on the fringe (using M-x local-set-key) to
    >> mouse-yank-at-click, and it seemed to work OK.

Nice, hadn't known that it was so easy. In emacs you learn something new
every day. Thanks for the hint. I've now defined in my .emacs.el:
(global-set-key [right-fringe mouse-2] 'mouse-yank-at-click)

    Nick> I imagine in this case it would work even if the cursor wasn't in the
    Nick> margin.

Yes, but this is consistent with mouse-1 (mouse-set-point), i.e. mouse-1
moves point to the end of the current line and mouse-2 pastes there.

-- 
 ------------------------------------------
|  Klaus Zeitler      Lucent Technologies  |
|  Email:             kzeitler@lucent.com  |
 ------------------------------------------
---
Rap music is our punishment for neglecting music education.

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

* Re: paste when cursor is in the fringe
  2006-08-11  7:03 paste when cursor is in the fringe Klaus Zeitler
  2006-08-11  7:11 ` Nick Roberts
@ 2006-08-11 14:25 ` monnier
  2006-08-11 16:01   ` Drew Adams
  2006-08-11 19:23 ` Richard Stallman
  2 siblings, 1 reply; 17+ messages in thread
From: monnier @ 2006-08-11 14:25 UTC (permalink / raw)
  Cc: emacs-devel

> I noticed that I can't paste into a line when the cursor is in the fringe,
> i.e. when the line is filled up to the last column.

Set mouse-yank-at-point to t and be happy ever after.

I don't like mouse-yank-at-point to be nil, mostly because I'm never
completely sure exactly where my mouse is pointing, so I often get
off-by-one errors.  Maybe down-mouse-2 should be bound to a function that
highlights the point at which the mouse-yank-at-click will insert the text.


        Stefan

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

* RE: paste when cursor is in the fringe
  2006-08-11 14:25 ` monnier
@ 2006-08-11 16:01   ` Drew Adams
  2006-08-11 19:23     ` Richard Stallman
  0 siblings, 1 reply; 17+ messages in thread
From: Drew Adams @ 2006-08-11 16:01 UTC (permalink / raw)


    Maybe down-mouse-2 should be bound to a function that
    highlights the point at which the mouse-yank-at-click will 
    insert the text.
    
Good idea. I do that now.

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

* Re: paste when cursor is in the fringe
  2006-08-11  7:03 paste when cursor is in the fringe Klaus Zeitler
  2006-08-11  7:11 ` Nick Roberts
  2006-08-11 14:25 ` monnier
@ 2006-08-11 19:23 ` Richard Stallman
  2 siblings, 0 replies; 17+ messages in thread
From: Richard Stallman @ 2006-08-11 19:23 UTC (permalink / raw)
  Cc: emacs-devel

    I noticed that I can't paste into a line when the cursor is in the fringe,
    i.e. when the line is filled up to the last column.

Please send a _precise_ test case so people can try to reproduce this.

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

* Re: paste when cursor is in the fringe
  2006-08-11 16:01   ` Drew Adams
@ 2006-08-11 19:23     ` Richard Stallman
  2006-08-11 19:42       ` Drew Adams
  0 siblings, 1 reply; 17+ messages in thread
From: Richard Stallman @ 2006-08-11 19:23 UTC (permalink / raw)
  Cc: emacs-devel

	Maybe down-mouse-2 should be bound to a function that
	highlights the point at which the mouse-yank-at-click will 
	insert the text.

    Good idea. I do that now.

Would someone who can contribute code like to try implementing this?

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

* RE: paste when cursor is in the fringe
  2006-08-11 19:23     ` Richard Stallman
@ 2006-08-11 19:42       ` Drew Adams
  0 siblings, 0 replies; 17+ messages in thread
From: Drew Adams @ 2006-08-11 19:42 UTC (permalink / raw)


    	Maybe down-mouse-2 should be bound to a function that
    	highlights the point at which the mouse-yank-at-click will
    	insert the text.

    Would someone who can contribute code like to try implementing this?

Can I suggest that it would be good if the highlight followed the mouse, in
the case where you:

1. Press and hold mouse-2.
2. Move (drag) the mouse.
3. Release mouse-2, to yank at the release point.

That is, it would be good for the highlit position to follow the mouse, so
you can always see the actual yank position highlighted.

One of the reasons to highlight is, as Stefan suggested, to be sure you're
pasting to the right position. Tracking the mouse with a highlight helps in
this regard. Otherwise, you see only the initial (press) position
highlighted, and the same difficulty in getting the position right arises
when you then try to correct the position.

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

* Re: paste when cursor is in the fringe
  2006-08-11  8:16     ` Mathias Dahl
  2006-08-11  8:53       ` Nick Roberts
@ 2006-08-12 14:27       ` Richard Stallman
  2006-08-13 16:10         ` Stefan Monnier
  1 sibling, 1 reply; 17+ messages in thread
From: Richard Stallman @ 2006-08-12 14:27 UTC (permalink / raw)
  Cc: kzeitler, nickrob, emacs-devel

    FYI I just bound mouse-2 on the fringe (using M-x local-set-key) to
    mouse-yank-at-click, and it seemed to work OK.

If that simple fix solves the problem reliably, let's install it.

Does anyone see a reason NOT to install it?

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

* Re: paste when cursor is in the fringe
  2006-08-12 14:27       ` Richard Stallman
@ 2006-08-13 16:10         ` Stefan Monnier
  2006-08-13 16:23           ` Drew Adams
                             ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Stefan Monnier @ 2006-08-13 16:10 UTC (permalink / raw)
  Cc: kzeitler, nickrob, emacs-devel, Mathias Dahl

>     FYI I just bound mouse-2 on the fringe (using M-x local-set-key) to
>     mouse-yank-at-click, and it seemed to work OK.

> If that simple fix solves the problem reliably, let's install it.
> Does anyone see a reason NOT to install it?

I don't see a reason not to do it, but if we do install it, I think we
should not use

    (global-set-key [fringe mouse-2] 'mouse-yank-at-click)
but
    (global-set-key [fringe mouse-2] [mouse-2])

instead.


        Stefan

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

* RE: paste when cursor is in the fringe
  2006-08-13 16:10         ` Stefan Monnier
@ 2006-08-13 16:23           ` Drew Adams
  2006-08-13 17:03           ` Mathias Dahl
  2006-08-14 19:20           ` Richard Stallman
  2 siblings, 0 replies; 17+ messages in thread
From: Drew Adams @ 2006-08-13 16:23 UTC (permalink / raw)


    >     FYI I just bound mouse-2 on the fringe (using M-x 
    >     local-set-key) to
    >     mouse-yank-at-click, and it seemed to work OK.
        
    I don't see a reason not to do it, but if we do install it,
    I think we should not use
    (global-set-key [fringe mouse-2] 'mouse-yank-at-click)
    but (global-set-key [fringe mouse-2] [mouse-2]) instead.

Seconded.

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

* Re: paste when cursor is in the fringe
  2006-08-13 16:10         ` Stefan Monnier
  2006-08-13 16:23           ` Drew Adams
@ 2006-08-13 17:03           ` Mathias Dahl
  2006-08-14 19:20           ` Richard Stallman
  2 siblings, 0 replies; 17+ messages in thread
From: Mathias Dahl @ 2006-08-13 17:03 UTC (permalink / raw)
  Cc: kzeitler, nickrob, rms, emacs-devel

> I don't see a reason not to do it, but if we do install it, I think we
> should not use
>
>     (global-set-key [fringe mouse-2] 'mouse-yank-at-click)
> but
>     (global-set-key [fringe mouse-2] [mouse-2])
>
> instead.

Just out of curiosity, what is the difference between the two?

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

* Re: paste when cursor is in the fringe
  2006-08-13 16:10         ` Stefan Monnier
  2006-08-13 16:23           ` Drew Adams
  2006-08-13 17:03           ` Mathias Dahl
@ 2006-08-14 19:20           ` Richard Stallman
  2006-08-17  3:46             ` Stefan Monnier
  2 siblings, 1 reply; 17+ messages in thread
From: Richard Stallman @ 2006-08-14 19:20 UTC (permalink / raw)
  Cc: kzeitler, nickrob, emacs-devel, mathias.dahl

    I don't see a reason not to do it, but if we do install it, I think we
    should not use

	(global-set-key [fringe mouse-2] 'mouse-yank-at-click)
    but
	(global-set-key [fringe mouse-2] [mouse-2])

    instead.

Good idea.  Would you please install it?

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

* Re: paste when cursor is in the fringe
  2006-08-14 19:20           ` Richard Stallman
@ 2006-08-17  3:46             ` Stefan Monnier
  0 siblings, 0 replies; 17+ messages in thread
From: Stefan Monnier @ 2006-08-17  3:46 UTC (permalink / raw)
  Cc: kzeitler, nickrob, emacs-devel, mathias.dahl

>     I don't see a reason not to do it, but if we do install it, I think we
>     should not use

> 	(global-set-key [fringe mouse-2] 'mouse-yank-at-click)
>     but
> 	(global-set-key [fringe mouse-2] [mouse-2])

>     instead.

> Good idea.  Would you please install it?

Done,


        Stefan

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

end of thread, other threads:[~2006-08-17  3:46 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-11  7:03 paste when cursor is in the fringe Klaus Zeitler
2006-08-11  7:11 ` Nick Roberts
2006-08-11  8:12   ` Klaus Zeitler
2006-08-11  8:16     ` Mathias Dahl
2006-08-11  8:53       ` Nick Roberts
2006-08-11 10:05         ` Klaus Zeitler
2006-08-12 14:27       ` Richard Stallman
2006-08-13 16:10         ` Stefan Monnier
2006-08-13 16:23           ` Drew Adams
2006-08-13 17:03           ` Mathias Dahl
2006-08-14 19:20           ` Richard Stallman
2006-08-17  3:46             ` Stefan Monnier
2006-08-11 14:25 ` monnier
2006-08-11 16:01   ` Drew Adams
2006-08-11 19:23     ` Richard Stallman
2006-08-11 19:42       ` Drew Adams
2006-08-11 19:23 ` Richard Stallman

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).