unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Using gpm in emacs
@ 2004-12-15  0:39 Nick Roberts
  2004-12-15  9:20 ` David Kastrup
  0 siblings, 1 reply; 7+ messages in thread
From: Nick Roberts @ 2004-12-15  0:39 UTC (permalink / raw)



Following the earlier discussion on emacs-pretest-bug about mouse support for
Emacs in a text-only terminal, I contacted the main author of gpm/mev
(Alessandro Rubini). He thought that including gpm in Emacs might not be the
right thing to do and that it would be best to connect to the gpm socket and
use its own protocol. He pointed out that gpm is specific to the Linux kernel
and many users already have it installed and configured by their distribution.
I guess thats similar to X, where, I presume, the mouse movements are
communicated to the application by the X server, the difference being that X
is ported more widely.

So I propose to tinker with the gpm library and try to connect things up with
Emacs (presumbly with pointers like mouse_position_hook?). Clearly, if anybody
who knows what they are doing is interested, that would be a better bet.

Nick

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

* Re: Using gpm in emacs
  2004-12-15  0:39 Using gpm in emacs Nick Roberts
@ 2004-12-15  9:20 ` David Kastrup
  2004-12-15  9:36   ` Stephan Stahl
  0 siblings, 1 reply; 7+ messages in thread
From: David Kastrup @ 2004-12-15  9:20 UTC (permalink / raw)
  Cc: emacs-devel

Nick Roberts <nickrob@snap.net.nz> writes:

> Following the earlier discussion on emacs-pretest-bug about mouse
> support for Emacs in a text-only terminal, I contacted the main
> author of gpm/mev (Alessandro Rubini). He thought that including gpm
> in Emacs might not be the right thing to do and that it would be
> best to connect to the gpm socket and use its own protocol. He
> pointed out that gpm is specific to the Linux kernel and many users
> already have it installed and configured by their distribution.  I
> guess thats similar to X, where, I presume, the mouse movements are
> communicated to the application by the X server, the difference
> being that X is ported more widely.
>
> So I propose to tinker with the gpm library and try to connect
> things up with Emacs (presumbly with pointers like
> mouse_position_hook?). Clearly, if anybody who knows what they are
> doing is interested, that would be a better bet.

;;; gpm.el --- Support the mouse when emacs run on a Linux console.

;; Copyright (C) 1999 Free Software Foundation

;; Author: William Perry <wmperry@gnu.org>
;; Keywords: mouse, terminals

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: Using gpm in emacs
  2004-12-15  9:20 ` David Kastrup
@ 2004-12-15  9:36   ` Stephan Stahl
  2004-12-15  9:54     ` David Kastrup
  0 siblings, 1 reply; 7+ messages in thread
From: Stephan Stahl @ 2004-12-15  9:36 UTC (permalink / raw)
  Cc: Nick Roberts, emacs-devel

Hi.

David Kastrup said:

> ;;; gpm.el --- Support the mouse when emacs run on a Linux console.
>
> ;; Copyright (C) 1999 Free Software Foundation
>
> ;; Author: William Perry <wmperry@gnu.org>
> ;; Keywords: mouse, terminals

What about:

;;; xt-mouse.el --- support the mouse when emacs run in an xterm

;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; Keywords: mouse, terminals

...

;;; Commentary:

;; Enable mouse support when running inside an xterm or Linux console.

Does this mean gpm.el is not really needed?
BTW i can't find gpm.el in my cvs emacs here (about 4 months old..)
-- 
Stephan Stahl

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

* Re: Using gpm in emacs
  2004-12-15  9:36   ` Stephan Stahl
@ 2004-12-15  9:54     ` David Kastrup
  2004-12-15 10:12       ` Stephan Stahl
  2004-12-15 10:46       ` Nick Roberts
  0 siblings, 2 replies; 7+ messages in thread
From: David Kastrup @ 2004-12-15  9:54 UTC (permalink / raw)
  Cc: Nick Roberts, emacs-devel

"Stephan Stahl" <stahl@eos.franken.de> writes:

> David Kastrup said:
>
>> ;;; gpm.el --- Support the mouse when emacs run on a Linux console.
>>
>> ;; Copyright (C) 1999 Free Software Foundation
>>
>> ;; Author: William Perry <wmperry@gnu.org>
>> ;; Keywords: mouse, terminals
>
> What about:
>
> ;;; xt-mouse.el --- support the mouse when emacs run in an xterm
>
> ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
> ;; Keywords: mouse, terminals
>
> ...
>
> ;;; Commentary:
>
> ;; Enable mouse support when running inside an xterm or Linux console.

> Does this mean gpm.el is not really needed?

No idea.

> BTW i can't find gpm.el in my cvs emacs here (about 4 months old..)

Probably because it isn't there.  It's somewhere on the web,
presumably.  I just did `locate' and it was in the XEmacs file tree.
Of course, if it really turned out to be needed, one should check back
with WP that this is ok as a contribution to Emacs proper (for which
he has an assignment on file, but not for gpm.el specifically).

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: Using gpm in emacs
  2004-12-15  9:54     ` David Kastrup
@ 2004-12-15 10:12       ` Stephan Stahl
  2004-12-15 10:46       ` Nick Roberts
  1 sibling, 0 replies; 7+ messages in thread
From: Stephan Stahl @ 2004-12-15 10:12 UTC (permalink / raw)
  Cc: Stephan Stahl, Nick Roberts, emacs-devel

Hi.

David Kastrup said:

>> Does this mean gpm.el is not really needed?
>
> No idea.
...
> Probably because it isn't there.  It's somewhere on the web,
> presumably.  I just did `locate' and it was in the XEmacs file tree.
> Of course, if it really turned out to be needed, one should check back
> with WP that this is ok as a contribution to Emacs proper (for which
> he has an assignment on file, but not for gpm.el specifically).

I'm quite sure i have used gpm with emacs running on a linux console.  That
should be the reason why i have (xterm-mouse-mode 1) in my .emacs.. So it
would seem that gpm.el is not needed.  Just to be sure i will test this later
today when i'm back home...
-- 
Stephan Stahl

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

* Re: Using gpm in emacs
  2004-12-15  9:54     ` David Kastrup
  2004-12-15 10:12       ` Stephan Stahl
@ 2004-12-15 10:46       ` Nick Roberts
  2004-12-15 11:24         ` Stephan Stahl
  1 sibling, 1 reply; 7+ messages in thread
From: Nick Roberts @ 2004-12-15 10:46 UTC (permalink / raw)
  Cc: Stephan Stahl, emacs-devel

 > >> ;;; gpm.el --- Support the mouse when emacs run on a Linux console.
 > >>
 > >> ;; Copyright (C) 1999 Free Software Foundation
 > >>
 > >> ;; Author: William Perry <wmperry@gnu.org>
 > >> ;; Keywords: mouse, terminals

What is your point exactly? 

This appears to be part of XEmacs. William Perry is not the author of gpm. I
don't know how to get the mouse to work at all with XEmacs, either in an xterm
or a text-only terminal. Loading gpm doesn't seem to do it.

Alessandro Rubini has also written a mode called t-mouse.el. This works with
Emacs but provides incomplete support in 21.3.50 for a mouse in a text-only
terminal.  My idea is to address those shortcomings.

 > > What about:
 > >
 > > ;;; xt-mouse.el --- support the mouse when emacs run in an xterm
 > >
 > > ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 > > ;; Keywords: mouse, terminals
 > >
 > > ...
 > >
 > > ;;; Commentary:
 > >
 > > ;; Enable mouse support when running inside an xterm or Linux console.
 > 
 > > Does this mean gpm.el is not really needed?

I don't think this mode works on a text-only terminal. This file also says:

;; The xterm mouse escape codes are supposedly also supported by the
;; Linux console, but I have not been able to verify this.

I can't see how this can work outside the context of X.


Nick

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

* Re: Using gpm in emacs
  2004-12-15 10:46       ` Nick Roberts
@ 2004-12-15 11:24         ` Stephan Stahl
  0 siblings, 0 replies; 7+ messages in thread
From: Stephan Stahl @ 2004-12-15 11:24 UTC (permalink / raw)
  Cc: Stephan Stahl, emacs-devel

Hi.

Nick Roberts said:

> Alessandro Rubini has also written a mode called t-mouse.el. This works with
> Emacs but provides incomplete support in 21.3.50 for a mouse in a text-only
> terminal.  My idea is to address those shortcomings.

You are right xt-mouse does not work correctly with cvs emacs.  I now remember
that i have send a mail regarding this to emacs-devel but got no answer.
http://lists.gnu.org/archive/html/emacs-devel/2004-07/msg00527.html
Seems only few people need this :) and i have had no time so far to take a
closer look and find what is wrong.  I think the way mouse event are used was
changed and xt-mouse "just" needs to be adapted..

> I don't think this mode works on a text-only terminal. This file also says:
>
> ;; The xterm mouse escape codes are supposedly also supported by the
> ;; Linux console, but I have not been able to verify this.
>
> I can't see how this can work outside the context of X.

Well, right now all i can say is that i'm pretty sure i used xt-mouse with gpm
on the console and it worked..
-- 
Stephan Stahl

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

end of thread, other threads:[~2004-12-15 11:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-15  0:39 Using gpm in emacs Nick Roberts
2004-12-15  9:20 ` David Kastrup
2004-12-15  9:36   ` Stephan Stahl
2004-12-15  9:54     ` David Kastrup
2004-12-15 10:12       ` Stephan Stahl
2004-12-15 10:46       ` Nick Roberts
2004-12-15 11:24         ` Stephan Stahl

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