From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Milliken Newsgroups: gmane.emacs.help Subject: Re: find-file "before" hook. Date: Thu, 30 Jul 2009 07:48:33 +1000 Message-ID: <791153ba0907291448s6b16eeabp8e058f044f79f469@mail.gmail.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016367f96e00d9f8a046fdf2634 X-Trace: ger.gmane.org 1248904168 2445 80.91.229.12 (29 Jul 2009 21:49:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 Jul 2009 21:49:28 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Michal Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 29 23:49:21 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MWH1T-00076S-My for geh-help-gnu-emacs@m.gmane.org; Wed, 29 Jul 2009 23:49:21 +0200 Original-Received: from localhost ([127.0.0.1]:36280 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWH1S-0006Jp-Rg for geh-help-gnu-emacs@m.gmane.org; Wed, 29 Jul 2009 17:49:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MWH0s-0006Eb-Vc for help-gnu-emacs@gnu.org; Wed, 29 Jul 2009 17:48:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MWH0o-0006Cm-9d for help-gnu-emacs@gnu.org; Wed, 29 Jul 2009 17:48:42 -0400 Original-Received: from [199.232.76.173] (port=38925 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWH0o-0006Ch-5o for help-gnu-emacs@gnu.org; Wed, 29 Jul 2009 17:48:38 -0400 Original-Received: from mail-qy0-f183.google.com ([209.85.221.183]:58733) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MWH0n-0001V1-LS for help-gnu-emacs@gnu.org; Wed, 29 Jul 2009 17:48:37 -0400 Original-Received: by qyk13 with SMTP id 13so1464444qyk.14 for ; Wed, 29 Jul 2009 14:48:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=Uqcd/n1K5pQoefYhyl6YsJNsrkalZn/sjb+gw68/dEg=; b=XUlvj+rYtH1wQU89Rr1cjOIeUmLhhWU8baL+G0EOk8wu8cWLM9iyJbioxWYKDqaaak INyA8GhR9rh3/uS+z6qmJvvaCg3P1NtRc6EOYMqauSC1OKnnZM7h12TGYxH/qtRolHzu TphV5ADjYlyu9AkpXCnVp2jfTspOWEJiBR3Yw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=JGyiuWEFQ3XwrRk7xaPmb6pyKrYquWzanYaflW/fEDj1eGPoPYDVKgZ2ZoHJFP8WDq s9XrVaxo8PNg9LXvGLFHfHJOsF847P4gVwCaKJkZSZkQUZu6rNP3qokWl+vrJhay8eVa hcCZ2v6KB4wbz1A/EdvSnQjOyaAnmd6EBjdak= Original-Received: by 10.229.100.81 with SMTP id x17mr73713qcn.15.1248904113658; Wed, 29 Jul 2009 14:48:33 -0700 (PDT) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:66496 Archived-At: --0016367f96e00d9f8a046fdf2634 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Well, I am curious about what you might want to do before a file is opened. Just off the top of my head, I can't think of anything you might want to do before it is opened that you can't do equally as well after it is open :-) But in answer to your later questions - have a look at ido, it must do something similar in "overloading"/hijacking the find-file command, I haven't bothered looking at how or what it does, but I do use the mode occasionally. It definitely hijacks find-file and adds its own functionality. Best of luck Peter On Thu, Jul 30, 2009 at 6:47 AM, Michal wrote: > Hallo Group Members > > I would like to invoke some action just before file is opened. I do not > see any hook that would allow it for me. find-file-hook is invoked after > file is opened. > > Do YOu know any or have an idea on how to do it. I imagine 2 ways: > - overloading find-file - I do not like it. > - advising find-file. ... but maybe there is better solution:) > > best regards, > Michal > --0016367f96e00d9f8a046fdf2634 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Well, I am curious about what you might want to do before a file is opened.= Just off the top of my head, I can't think of anything you might want = to do before it is opened that you can't do equally as well after it is= open :-)

But in answer to your later questions - have a look at ido, = it must do something similar in "overloading"/hijacking the find-= file command, I haven't bothered looking at how or what it does, but I = do use the mode occasionally. It definitely hijacks find-file and adds its = own functionality.

Best of luck
Peter

On Thu, Jul 30, 2009 at 6:47 AM, Michal <rab= bitko@tenbit.pl> wrote:
Hallo Group Members

I would like to invoke some action just before file is opened. I do not
see any hook that would allow it for me. find-file-hook is invoked after file is opened.

Do YOu know any or have an idea on how to do it. I imagine 2 ways:
- overloading find-file - I do not like it.
- advising find-file. ... but maybe there is better solution:)

best regards,
Michal

--0016367f96e00d9f8a046fdf2634--