emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New primitive buffer-position-at


From: Nick Roberts
Subject: Re: New primitive buffer-position-at
Date: Wed, 12 Jan 2005 19:58:12 +1300

 > > The posn-* family of commands (posn-point, posn-object etc) only work if
 > > Emacs provides the proper click event in the first place which it doesn't
 > > currently do on a text terminal or xterm.
 > 
 > ??? Are you saying that posn-point would throw an error or otherwise
 > behave incorrectly if invoked on a tty without a mouse?  I tried that,
 > and it seemed to work fine for me.

I'm trying to say that posn-point etc doesn't work if invoked on a tty *with*
a mouse. 

For example, calling the function below in an xterm, xt-mouse.el doesn't
provide the full click event and so (posn-point posn) is not a number.

(defun gdb-mouse-toggle-breakpoint (event)
  "Toggle breakpoint in left fringe/margin with mouse click."
  (interactive "e")
  (mouse-minibuffer-check event)
  (let ((posn (event-end event)))
    (if (numberp (posn-point posn))
        (with-selected-window (posn-window posn)
          (save-excursion
            (goto-char (posn-point posn))
            (if (or (posn-object posn)
            ...

 > I'm puzzled why did you need to patch xt-mouse.el, since these 2
 > functions seem to work for me on a tty, even a tty that lacks the
 > mouse.

I've just committed my changes to xt-mouse.el. With these, if you start Emacs
in an xterm, you should now be able to select another buffer etc by clicking
on the mode-line, navigate info from the header line, set breakpoints with the
mouse...

I have done the same for a text-terminal with t-mouse.el, but FSF doesn't have
an assignment yet to let me install this file.


Nick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]