gnu-emacs-sources
[Top][All Lists]
Advanced

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

eclips.el - Problem and workaround


From: Thorsten Bonow
Subject: eclips.el - Problem and workaround
Date: Sun, 13 Apr 2008 12:59:06 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) XEmacs/21.4.21 (linux)

Hi,

since I found no other reference, email of the author or website for eclips.el
(which was posted only in this group), I'm posting this here---sorry.

After requiring "eclips" and activating it via `eclips-start-recording', it
periodically collects the X clipboard contents and makes it available to emacs
with a keyboard shortcut---very nice!

While using Emacs from CVS I encountered a glitch with the calendar middle mouse
pop-up menu `calendar-mouse-2-date-menu' which I thought was a bug with emacs 
and
not related to "eclips.el": On pressing the middle mouse button, emacs got stuck
in a loop, needing a lot of "C-g"'s to make it responsive again.

On checking yesterday with stable emacs, I realised it happens only when
eclips is running: emacs then gets stuck in `x-popup-menu'.

I hacked a quick workaround which does work in my setup. I'm still interested
in a real fix. Thanks for any help.

Toto


PS: Here comes my fix: Advising `x-popup-menu' to turn of eclips before popping 
up
    the menu and reactivating it afterwards only if it was deactivated by the
    advice...


(defadvice x-popup-menu (around my-xpopup-menu-advice activate)
  "Bugfix for eclips.el: Make sure `eclips-start-recording' is
  turned of before calling `x-popup-menu' and reactivated
  afterwards if it was running before."
  (let ((my-eclips-timer-turned-of nil))
  (if (not eclips-timer)
      (setq my-eclips-timer-turned-of nil)
    (eclips-stop-recording)
    (setq my-eclips-timer-turned-of t))
  ad-do-it
  (if my-eclips-timer-turned-of
      (eclips-start-recording))))
(ad-activate 'x-popup-menu)

PPS: XEmacs, which only has a `popup-menu' defun, is not affected.

-- 
Contact information and PGP key at
http://www.withouthat.org/~toto/contact.html

Aaachen University of Technology -- now even further ahead...


reply via email to

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