all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
To: Nick Roberts <nickrob@snap.net.nz>
Cc: cyd@stupidchicken.com, emacs-devel@gnu.org, rms@gnu.org,
	bojohan+news@dd.chalmers.se
Subject: Re: mouse-1-click-follows-link with xt-mouse (was: with t-mouse)
Date: Wed, 21 Mar 2007 11:07:37 +0100	[thread overview]
Message-ID: <m3odmmzz86.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <17920.33032.840044.978947@kahikatea.snap.net.nz> (Nick Roberts's message of "Wed\, 21 Mar 2007 12\:49\:12 +1200")

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

> Actually the patch below seems to work for xt-mouse.el.  The timestamp isn't
> computed directly from the mouse click, but for a value of many (450)
> milliseconds it seems good enough.
>
> Shall I install it?

It is ok with me, but you should add suitable comments
to say that you emulate the time-stamp information, and
the possible implications of this.

Also, there is a problem with timestamp wrap-around
every 2^16 seconds.

I think this approach is safer:

Instead of:

> + 	 (time (current-time))
> + 	 (timestamp (+ ( * (nth 1 time) 1000 ) (/ (nth 2 time) 1000)))

use relative time:

(defvar xt-mouse-epoch nil)

..

  (timestamp (truncate
	      (* 1000
		 (- (float-time)
		    (or xt-mouse-epoch
		        (setq xt-mouse-epoch (float-time)))))))


-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

  reply	other threads:[~2007-03-21 10:07 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-03 23:56 Updating the homepage Yavor Doganov
2007-03-04  4:15 ` Eli Zaretskii
2007-03-04 13:01   ` Yavor Doganov
2007-03-04 13:13     ` Romain Francoise
2007-03-05  2:55       ` Richard Stallman
2007-03-05  4:12         ` Stefan Monnier
2007-03-05  7:20           ` David Kastrup
2007-03-05 21:49           ` Richard Stallman
2007-03-05 22:04       ` JD Smith
2007-03-06  9:44         ` Romain Francoise
2007-03-06 10:00           ` martin rudalics
2007-03-06 19:48             ` Romain Francoise
2007-03-06 10:18           ` David Hansen
2007-03-06 23:35           ` Daniel Brockman
2007-03-06 23:46             ` Nick Roberts
2007-03-25 13:32               ` Romain Francoise
2007-03-09 21:34             ` Dieter Wilhelm
2007-03-25 13:32               ` Romain Francoise
2007-03-16 14:06             ` mouse-1-click-follows-link with t-mouse (was: Updating the homepage) Johan Bockgård
2007-03-18 12:19               ` Richard Stallman
2007-03-18 14:37                 ` mouse-1-click-follows-link with t-mouse Chong Yidong
2007-03-18 23:21                   ` Johan Bockgård
2007-03-19  2:22                     ` Nick Roberts
2007-03-19 18:10                     ` Richard Stallman
2007-03-19  5:14                   ` Richard Stallman
2007-03-19 10:33                     ` Nick Roberts
2007-03-19 11:04                       ` Kim F. Storm
2007-03-19 11:17                         ` Nick Roberts
2007-03-19 12:09                           ` Kim F. Storm
2007-03-19 15:56                           ` Chong Yidong
2007-03-19 21:57                           ` Richard Stallman
2007-03-19 22:46                             ` Nick Roberts
2007-03-21  0:41                               ` Richard Stallman
2007-03-21  9:20                                 ` Kim F. Storm
2007-03-21  0:49                               ` mouse-1-click-follows-link with xt-mouse (was: with t-mouse) Nick Roberts
2007-03-21 10:07                                 ` Kim F. Storm [this message]
2007-03-21 20:45                                   ` Nick Roberts
2007-03-21 18:16                                 ` Richard Stallman
2007-03-19 15:57                         ` mouse-1-click-follows-link with t-mouse Chong Yidong
2007-03-25 13:31             ` Updating the homepage Romain Francoise
2007-03-25 14:21               ` Drew Adams
2007-03-25 22:41                 ` David Kastrup
2007-04-09 20:20                 ` Romain Francoise
2007-03-25 20:23               ` Eli Zaretskii
2007-03-25 22:42                 ` David Kastrup
2007-03-26  1:53                   ` YAMAMOTO Mitsuharu
2007-04-09 20:21                 ` Romain Francoise
2007-03-06  5:40     ` Yavor Doganov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3odmmzz86.fsf@kfs-l.imdomain.dk \
    --to=storm@cua.dk \
    --cc=bojohan+news@dd.chalmers.se \
    --cc=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=nickrob@snap.net.nz \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.