🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.epoch.misc
Article #2026

Re: Getting out of I-search with mouse?

#2026
From: Ken Laprade
Date: Fri, 03 May 1991 15:33
40 lines
2026 bytes
In <1991May2.130332.23508@eua.ericsson.se> ebubra@erix.ericsson.se (Bertil Askelid) writes:

>	When you are in an I-search and hit C-f (or any other control
>	sequence but ESC, C-s, C-w, C-y, C-q), the I-search is abandonded.
>	Same thing in non-epoch Gnu emacs under X when you hit a mouse
>	button.

>	Is there any way to make a mouse button cause I-search to be left
>	in Epoch?

I define this:

(defun abort-isearch () "Abort any isearch in progress."
  (condition-case err
      (throw 'search-done t)
    (no-catch nil)))

Then I add it to all the functions I want to abort isearch, e.g.:

(defun start-mouse-drag (arg)
  (when arg
    (setq mouse::downp 'start)
    (mouse::set-point arg)
    (set-mouse-marker)
    (setq mouse::last-point (point))
    (if drag-button
      (progn (delete-button drag-button) (setq drag-button nil) )
    )
  )
  (abort-isearch)
)

It is the easiest solution I could come up with, but it is certainly not
the best thing.  It works most of the time - you still need to abort the
isearch with a control character if it was started from a mouse hit itself.
---
Ken Laprade			INTERNET: laprade@trantor.harris-atd.com
Harris Corporation 		Usenet:  ...!uunet!x102a!trantor!laprade
PO Box 37, MS 3A/1912		Voice: (407)727-4433
Melbourne, FL 32902		FAX: (407)729-3363
Technical Details
Message-ID: <laprade.673284800@ringworld>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!samsung!sol.ctr.columbia.edu!trantor.harris-atd.com!ringworld!laprade
References: <1991May2.130332.23508@eua.ericsson.se>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fc7ee,5efa3599a749c220
X-Google-Attributes: gidfc7ee,public
X-Google-ArrivalTime: 1991-05-04 00:56:13 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!samsung!sol.ctr.columbia.edu!trantor.harris-atd.com!ringworld!laprade
From: laprade@ringworld.harris-atd.com (Ken Laprade)
Newsgroups: gnu.epoch.misc
Subject: Re: Getting out of I-search with mouse?
Message-ID: <laprade.673284800@ringworld>
Date: 3 May 91 15:33:20 GMT
References: <1991May2.130332.23508@eua.ericsson.se>
Sender: news@trantor.harris-atd.com
Reply-To: laprade@trantor.harris-atd.com
Organization: Advanced Technology Dept., Harris Corp., Melbourne, FL
Lines: 40