unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Does gnu emacs have the equivalent of Xemacs mouse-track-insert
@ 2010-03-12 10:10 asac
  2010-03-12 10:31 ` José A. Romero L.
  0 siblings, 1 reply; 12+ messages in thread
From: asac @ 2010-03-12 10:10 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,
I am trying to migrate from Xemacs to GNU emacs because of instability
of Xemacs (many crashes).
So I am wondering if the equivalent of mouse-track-insert exists in
GNU Emacs?
I google for that but only get Xemcs references.
This function is very handy since you can copy/paste a word in 2
clicks.
step1: place the cursor when you want to paste/yank the text
step2: ctrl-double click on left button on the text you want to copy/
paste and you will get it where you initially placed the cursor.

This is very handy and I thing is one of the only mouse usage I have,
so I am badly missing it.
Thanks, Regards,
Alex


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

* Re: Does gnu emacs have the equivalent of Xemacs mouse-track-insert
  2010-03-12 10:10 Does gnu emacs have the equivalent of Xemacs mouse-track-insert asac
@ 2010-03-12 10:31 ` José A. Romero L.
  2010-03-12 10:51   ` Jianguang ZUO
  2010-03-12 12:59   ` asac
  0 siblings, 2 replies; 12+ messages in thread
From: José A. Romero L. @ 2010-03-12 10:31 UTC (permalink / raw)
  To: help-gnu-emacs

On 12 Mar, 11:10, asac <asafi...@gmail.com> wrote:
> Hi,
(...)
> step1: place the cursor when you want to paste/yank the text
> step2: ctrl-double click on left button on the text you want to copy/
> paste and you will get it where you initially placed the cursor.
(...)

This can be achieved in GNU Emacs using the secondary selection:
step0: do (setq mouse-yank-at-point t),
step1: place the cursor where you want to yank the test,
step2: M-leftclick on the beginning of the text want to copy, then
       M-rightclick on the end *OR* M-drag over that area,
step3: M-centerclick to paste.

Cheers,
--
José A. Romero L.
escherdragon at gmail
"We who cut mere stones must always be envisioning cathedrals."
(Quarry worker's creed)


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

* Re: Does gnu emacs have the equivalent of Xemacs mouse-track-insert
  2010-03-12 10:31 ` José A. Romero L.
@ 2010-03-12 10:51   ` Jianguang ZUO
  2010-03-12 12:59   ` asac
  1 sibling, 0 replies; 12+ messages in thread
From: Jianguang ZUO @ 2010-03-12 10:51 UTC (permalink / raw)
  To: help-gnu-emacs


Yes, It is a good method.
Thanks.

--------------------
José A. Romero L. <escherdragon@gmail.com> writes:

> On 12 Mar, 11:10, asac <asafi...@gmail.com> wrote:
>> Hi,
> (...)
>> step1: place the cursor when you want to paste/yank the text
>> step2: ctrl-double click on left button on the text you want to copy/
>> paste and you will get it where you initially placed the cursor.
> (...)
>
> This can be achieved in GNU Emacs using the secondary selection:
> step0: do (setq mouse-yank-at-point t),
> step1: place the cursor where you want to yank the test,
> step2: M-leftclick on the beginning of the text want to copy, then
>        M-rightclick on the end *OR* M-drag over that area,
> step3: M-centerclick to paste.
>
> Cheers,
> --
> José A. Romero L.
> escherdragon at gmail
> "We who cut mere stones must always be envisioning cathedrals."
> (Quarry worker's creed)


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

* Re: Does gnu emacs have the equivalent of Xemacs mouse-track-insert
  2010-03-12 10:31 ` José A. Romero L.
  2010-03-12 10:51   ` Jianguang ZUO
@ 2010-03-12 12:59   ` asac
  2010-03-12 14:25     ` José A. Romero L.
  1 sibling, 1 reply; 12+ messages in thread
From: asac @ 2010-03-12 12:59 UTC (permalink / raw)
  To: help-gnu-emacs

On Mar 12, 11:31 am, José A. Romero L. <escherdra...@gmail.com> wrote:
> On 12 Mar, 11:10, asac <asafi...@gmail.com> wrote:> Hi,
> (...)
> > step1: place the cursor when you want to paste/yank the text
> > step2: ctrl-double click on left button on the text you want to copy/
> > paste and you will get it where you initially placed the cursor.
>
> (...)
>
> This can be achieved in GNU Emacs using the secondary selection:
> step0: do (setq mouse-yank-at-point t),
> step1: place the cursor where you want to yank the test,
> step2: M-leftclick on the beginning of the text want to copy, then
>        M-rightclick on the end *OR* M-drag over that area,
> step3: M-centerclick to paste.
>
> Cheers,
> --
> José A. Romero L.
> escherdragon at gmail
> "We who cut mere stones must always be envisioning cathedrals."
> (Quarry worker's creed)

Jose, thanks for the reply ... but,

1. the  (setq mouse-yank-at-point t) effect remains permanent for the
buffer and then I can no more paste with middle-button at a pointed
location. This means I need to left click first to have the cursor
where I want to paste the text, then middle click.

2. On my linux host, somehow (keyboard shortcut settings?), so the M-
leftclick selects the window that I am working on, so when sliding,
the window is getting moved instead of selcting the text on which I
slide the mouse.

3. So I tested with ESC-leftclick and this partially works when emacs
is invoked with -nw, but it does not work in the window based.

So even if I solve the shortcut issue, the first setq required in your
procedure is changing the way copy/paste is done in the buffer, so it
is not a procedure I can follow ... but, Thanks a lot for your answer,
I now know I would probably need to look at the way secondary
selections work.

Regards, Alex.


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

* Re: Does gnu emacs have the equivalent of Xemacs mouse-track-insert
  2010-03-12 12:59   ` asac
@ 2010-03-12 14:25     ` José A. Romero L.
  2010-03-12 15:13       ` harven
  0 siblings, 1 reply; 12+ messages in thread
From: José A. Romero L. @ 2010-03-12 14:25 UTC (permalink / raw)
  To: help-gnu-emacs

On 12 Mar, 13:59, asac <asafi...@gmail.com> wrote:
(...)
> 1. the  (setq mouse-yank-at-point t) effect remains permanent for the
> buffer and then I can no more paste with middle-button at a pointed
> location. This means I need to left click first to have the cursor
> where I want to paste the text, then middle click.

I guess you could set it only for the secondary selection with some
elisp:

(defun asac/yank-secondary-at-point (click)
  (interactive "e")
  (let ((mouse-yank-at-point t))
    (mouse-yank-secondary click)))

(define-key global-map (kbd "<M-mouse-2>") 'asac/yank-secondary-at-
point)

> 2. On my linux host, somehow (keyboard shortcut settings?), so the M-
> leftclick selects the window that I am working on, so when sliding,
> the window is getting moved instead of selcting the text on which I
> slide the mouse.

It's working OK here (i.e.  M-click does not change the window). What
version of emacs are you using?

> 3. So I tested with ESC-leftclick and this partially works when emacs
> is invoked with -nw, but it does not work in the window based.
(...)

Strange. Sorry, no idea what's  wrong with your installment. At least
I can  tell you mine  seems to be  working correctly, so try  to play
around with your settings.

Cheers,
--
José A. Romero L.
escherdragon at gmail
"The opposite of war is not peace -- it's creation." (Jonathan Larson)


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

* Re: Does gnu emacs have the equivalent of Xemacs mouse-track-insert
  2010-03-12 14:25     ` José A. Romero L.
@ 2010-03-12 15:13       ` harven
  2010-03-12 23:21         ` Tim X
  0 siblings, 1 reply; 12+ messages in thread
From: harven @ 2010-03-12 15:13 UTC (permalink / raw)
  To: help-gnu-emacs


>> 2. On my linux host, somehow (keyboard shortcut settings?), so the M-
>> leftclick selects the window that I am working on, so when sliding,
>> the window is getting moved instead of selcting the text on which I
>> slide the mouse.
>
> It's working OK here (i.e.  M-click does not change the window). What
> version of emacs are you using?
>
>> 3. So I tested with ESC-leftclick and this partially works when emacs
>> is invoked with -nw, but it does not work in the window based.
> (...)
>
> Strange. Sorry, no idea what's  wrong with your installment. At least
> I can  tell you mine  seems to be  working correctly, so try  to play
> around with your settings.

There is nothing wrong with his installation. M-leftclick is intercepted
by his window manager. This is a standard shortcut in metacity for moving a 
window. This can be disabled with the gconf-editor, in apps>metacity>general 
item mouse_button_modifier.



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

* Re: Does gnu emacs have the equivalent of Xemacs mouse-track-insert
  2010-03-12 15:13       ` harven
@ 2010-03-12 23:21         ` Tim X
  2010-03-15  9:50           ` asac
  2010-04-12  5:17           ` David Combs
  0 siblings, 2 replies; 12+ messages in thread
From: Tim X @ 2010-03-12 23:21 UTC (permalink / raw)
  To: help-gnu-emacs

harven <harven@free.fr> writes:

>>> 2. On my linux host, somehow (keyboard shortcut settings?), so the M-
>>> leftclick selects the window that I am working on, so when sliding,
>>> the window is getting moved instead of selcting the text on which I
>>> slide the mouse.
>>
>> It's working OK here (i.e.  M-click does not change the window). What
>> version of emacs are you using?
>>
>>> 3. So I tested with ESC-leftclick and this partially works when emacs
>>> is invoked with -nw, but it does not work in the window based.
>> (...)
>>
>> Strange. Sorry, no idea what's  wrong with your installment. At least
>> I can  tell you mine  seems to be  working correctly, so try  to play
>> around with your settings.
>
> There is nothing wrong with his installation. M-leftclick is intercepted
> by his window manager. This is a standard shortcut in metacity for moving a 
> window. This can be disabled with the gconf-editor, in apps>metacity>general 
> item mouse_button_modifier.
>

Or just use system -> preferences -> keyboard shortcuts

There are a number of 'default' gnome keyboard shortcuts I get rid of
because they either interfere or use valuable mappings I like to use for
emacs, such as alt-tab, some of the function keys and a few others.
Using the GUI interface, its quite easy to replace any WM shortcuts you
want to keep with some of the rarely used keys that are less likely to
interfere with emacs, such as super/hyper (those 'extra' keys usually
between Ctl and Alt, often with a windows logo etc). 

Tim

-- 
tcross (at) rapttech dot com dot au


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

* Re: Does gnu emacs have the equivalent of Xemacs mouse-track-insert
  2010-03-12 23:21         ` Tim X
@ 2010-03-15  9:50           ` asac
  2010-04-12  5:17           ` David Combs
  1 sibling, 0 replies; 12+ messages in thread
From: asac @ 2010-03-15  9:50 UTC (permalink / raw)
  To: help-gnu-emacs

On Mar 13, 12:21 am, Tim X <t...@nospam.dev.null> wrote:
> harven <har...@free.fr> writes:
> >>> 2. On my linux host, somehow (keyboard shortcut settings?), so the M-
> >>> leftclick selects the window that I am working on, so when sliding,
> >>> the window is getting moved instead of selcting the text on which I
> >>> slide the mouse.
>
> >> It's working OK here (i.e.  M-click does not change the window). What
> >> version of emacs are you using?
>
> >>> 3. So I tested with ESC-leftclick and this partially works when emacs
> >>> is invoked with -nw, but it does not work in the window based.
> >> (...)
>
> >> Strange. Sorry, no idea what's  wrong with your installment. At least
> >> I can  tell you mine  seems to be  working correctly, so try  to play
> >> around with your settings.
>
> > There is nothing wrong with his installation. M-leftclick is intercepted
> > by his window manager. This is a standard shortcut in metacity for moving a
> > window. This can be disabled with the gconf-editor, in apps>metacity>general
> > item mouse_button_modifier.
>
> Or just use system -> preferences -> keyboard shortcuts
>
> There are a number of 'default' gnome keyboard shortcuts I get rid of
> because they either interfere or use valuable mappings I like to use for
> emacs, such as alt-tab, some of the function keys and a few others.
> Using the GUI interface, its quite easy to replace any WM shortcuts you
> want to keep with some of the rarely used keys that are less likely to
> interfere with emacs, such as super/hyper (those 'extra' keys usually
> between Ctl and Alt, often with a windows logo etc).
>
> Tim
>
> --
> tcross (at) rapttech dot com dot au

Many thanks to all for the suggestions.
Your answers are going faster than my tests.
I will try test and come back with results.


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

* Re: Does gnu emacs have the equivalent of Xemacs mouse-track-insert
  2010-03-12 23:21         ` Tim X
  2010-03-15  9:50           ` asac
@ 2010-04-12  5:17           ` David Combs
  2010-04-12 16:17             ` Stefan Monnier
  2010-04-14  1:00             ` Tim X
  1 sibling, 2 replies; 12+ messages in thread
From: David Combs @ 2010-04-12  5:17 UTC (permalink / raw)
  To: help-gnu-emacs

In article <87sk8586ss.fsf@rapttech.com.au>,
Tim X  <timx@nospam.dev.null> wrote:
...
>>
>
>Or just use system -> preferences -> keyboard shortcuts
>
>There are a number of 'default' gnome keyboard shortcuts I get rid of
>because they either interfere or use valuable mappings I like to use for
>emacs, such as alt-tab, some of the function keys and a few others.
>Using the GUI interface, its quite easy to replace any WM shortcuts you
>want to keep with some of the rarely used keys that are less likely to
>interfere with emacs, such as super/hyper (those 'extra' keys usually
>between Ctl and Alt, often with a windows logo etc). 

Please, in detail, what do you do to avoid getting screwed by
gnome (when using emacs).  (Also, outside of emacs).

I'm dreading having to go to gnome -- on Solaris 10 I'm
still managing to use the familiar (and nice) CDE.

One of these days, Solaris 11 maybe, no CDE will be
available, so Sun/Oracle will force gnome down everyone's
throats (throat or throats?).

Thanks!

David




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

* Re: Does gnu emacs have the equivalent of Xemacs mouse-track-insert
  2010-04-12  5:17           ` David Combs
@ 2010-04-12 16:17             ` Stefan Monnier
  2010-04-22 11:51               ` David Combs
  2010-04-14  1:00             ` Tim X
  1 sibling, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2010-04-12 16:17 UTC (permalink / raw)
  To: help-gnu-emacs

> Please, in detail, what do you do to avoid getting screwed by
> gnome (when using emacs).  (Also, outside of emacs).

The problem is not with "Gnome" (not sure what that means anyway), but
with the window-manager.  So you can reconfigure the window-manager to
use other keybindings, or you can use another window-manager (many
window-managers are Gnome-compliant).


        Stefan


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

* Re: Does gnu emacs have the equivalent of Xemacs mouse-track-insert
  2010-04-12  5:17           ` David Combs
  2010-04-12 16:17             ` Stefan Monnier
@ 2010-04-14  1:00             ` Tim X
  1 sibling, 0 replies; 12+ messages in thread
From: Tim X @ 2010-04-14  1:00 UTC (permalink / raw)
  To: help-gnu-emacs

dkcombs@panix.com (David Combs) writes:

> In article <87sk8586ss.fsf@rapttech.com.au>,
> Tim X  <timx@nospam.dev.null> wrote:
> ...
>>>
>>
>>Or just use system -> preferences -> keyboard shortcuts
>>
>>There are a number of 'default' gnome keyboard shortcuts I get rid of
>>because they either interfere or use valuable mappings I like to use for
>>emacs, such as alt-tab, some of the function keys and a few others.
>>Using the GUI interface, its quite easy to replace any WM shortcuts you
>>want to keep with some of the rarely used keys that are less likely to
>>interfere with emacs, such as super/hyper (those 'extra' keys usually
>>between Ctl and Alt, often with a windows logo etc). 
>
> Please, in detail, what do you do to avoid getting screwed by
> gnome (when using emacs).  (Also, outside of emacs).
>
Um, not really sure exactly what your concern is. Once I remove/change
the Gnome keybindings as described above, I don't have any problems with
Gnome and emacs. In fact, I'd say none at all. In what specific way does
Gnome screw with emacs apart from key binding conflicts, which 
are easily resolved.

It should be noted that in reality, some of those keybindings that you
can modify/remove with the System -> Preferences -> Keyboard Shortcuts
menu option are actually window manager keybindings and not Gnome
keybindings. Keep in mind that Gnome is not a window manager. If you use
a different window manager with Gnome, it may not have the same level of
integration with Gnome that metacity (a common default wm), so you may
have to modify some keybindings via whatever method that specific window
manager supports. As metacity has good integration, you have easy access
to modify its key bindings via the gnome interface.

> I'm dreading having to go to gnome -- on Solaris 10 I'm
> still managing to use the familiar (and nice) CDE.
>

Then maybe KDE would be a better alternative for you?

> One of these days, Solaris 11 maybe, no CDE will be
> available, so Sun/Oracle will force gnome down everyone's
> throats (throat or throats?).
>

Possibly, but many other things are also possible. Who knows what Larry
is going to do. I suspect his focus will be on the server side rather
than the desktop side. He is no open source advocate - he will use it
and promote it if it has potential to increase his bottom line, but
there is definitely no strong open source commitment running through his
vains. My guess will be that unless he can see real commercial benefits
to continuing a commercial version of Solaris, he will just drop it and
leave its development to be lead by the open Solaris community or they
will focus on the server side and leave the desktop environment
development tot he open source community. 

I don't see what the issue is with Gnome. In my experience, all of these
differences are minor and most of it is just 'fluff'. I avoided Gnome
for quite a while because it was too resource hungry and was still a bit
immature. However, now we have much faster CPUs, cheap memory and cheap
storage, all the resource issues are pretty much irrelevant. Gnome has
also matured somewhat and provides a well integrated environment. Its
not perfect, but it is as good as any other environment I've used. 

Given that your familiarity is with CDE, which I've not used since Sun
OS 5.4/Solaris 4.6(?), I'd expect KDE might be an alternative that would
be more comfortable for you. Its a long time since I used KDE, but it
was the most similar to Sun's CDE of all the desktops I've used, with
the possible exception of Red Hat's CDE implementation, which, at the
time, I thought was a very nice environment despite the numerous, but
mostly trivial, bugs. However, it failed to take off and was dropped
pretty quickly. 

Tim
-- 
tcross (at) rapttech dot com dot au


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

* Re: Does gnu emacs have the equivalent of Xemacs mouse-track-insert
  2010-04-12 16:17             ` Stefan Monnier
@ 2010-04-22 11:51               ` David Combs
  0 siblings, 0 replies; 12+ messages in thread
From: David Combs @ 2010-04-22 11:51 UTC (permalink / raw)
  To: help-gnu-emacs

In article <jwvhbngve7q.fsf-monnier+gnu.emacs.help@gnu.org>,
Stefan Monnier  <monnier@iro.umontreal.ca> wrote:
>> Please, in detail, what do you do to avoid getting screwed by
>> gnome (when using emacs).  (Also, outside of emacs).
>
>The problem is not with "Gnome" (not sure what that means anyway), but
>with the window-manager.  So you can reconfigure the window-manager to
>use other keybindings, or you can use another window-manager (many
>window-managers are Gnome-compliant).
>
>
>        Stefan

THANK YOU FOR THAT INFO!


QUESTION: then, which window-manager would YOU use?   (and why?)

David

PS: "gnome" -- or whatever the one Linux uses is called.
  (No wonder that when I googled it I found only front-yard statues,
   monsters, videos, ... :-) )


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

end of thread, other threads:[~2010-04-22 11:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-12 10:10 Does gnu emacs have the equivalent of Xemacs mouse-track-insert asac
2010-03-12 10:31 ` José A. Romero L.
2010-03-12 10:51   ` Jianguang ZUO
2010-03-12 12:59   ` asac
2010-03-12 14:25     ` José A. Romero L.
2010-03-12 15:13       ` harven
2010-03-12 23:21         ` Tim X
2010-03-15  9:50           ` asac
2010-04-12  5:17           ` David Combs
2010-04-12 16:17             ` Stefan Monnier
2010-04-22 11:51               ` David Combs
2010-04-14  1:00             ` Tim X

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).