From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.help Subject: Re: find-file "before" hook. Date: Wed, 29 Jul 2009 23:58:13 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1248904736 4005 80.91.229.12 (29 Jul 2009 21:58:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 Jul 2009 21:58:56 +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:58:49 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 1MWHAf-00024t-6k for geh-help-gnu-emacs@m.gmane.org; Wed, 29 Jul 2009 23:58:49 +0200 Original-Received: from localhost ([127.0.0.1]:48030 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWHAe-0005c6-L7 for geh-help-gnu-emacs@m.gmane.org; Wed, 29 Jul 2009 17:58:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MWHAF-0005az-KT for help-gnu-emacs@gnu.org; Wed, 29 Jul 2009 17:58:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MWHAA-0005Xx-5h for help-gnu-emacs@gnu.org; Wed, 29 Jul 2009 17:58:22 -0400 Original-Received: from [199.232.76.173] (port=46420 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWHAA-0005Xu-0R for help-gnu-emacs@gnu.org; Wed, 29 Jul 2009 17:58:18 -0400 Original-Received: from mail-yx0-f172.google.com ([209.85.210.172]:62264) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MWHA9-0002xI-M9 for help-gnu-emacs@gnu.org; Wed, 29 Jul 2009 17:58:17 -0400 Original-Received: by yxe2 with SMTP id 2so2000919yxe.14 for ; Wed, 29 Jul 2009 14:58:17 -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 :content-transfer-encoding; bh=PlCTfEeUiZPsKmCMETrWp4Qn7EiG/6Isf7Bayyj1zSo=; b=F7i5SD5zETU9ptgftWJDFtemM/5E3GfuueQmCUX2xrkAJQY+jNTaBu2VYYqhEcmmKF KAEd+Mf0zJrz8HD6iI4G2CJzggopE+/yFuGjuopGiTl64K78ehWJH61OHNVNlxDwBcww bEyh7yaSfTSZBj+S4nu3fAVq2X2N2vvfnNH1E= 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:content-transfer-encoding; b=mdwI50COfssVkjfiv8B63RT6VGQv9ZLBJ5poDcxHprZkPbf0SebYSSdxF2Bka68q+Z scl7/IMEChkqCYxzrrLscAKOll5fxsQ0f/lPLL9HWxqC135ITj7pNpo6bCzFd3l/qCrN CmyfbtEh3P+boLR2QTpimTd5QDP/KnmdDtDhE= Original-Received: by 10.100.10.15 with SMTP id 15mr495172anj.8.1248904693476; Wed, 29 Jul 2009 14:58:13 -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:66497 Archived-At: On Wed, Jul 29, 2009 at 10:47 PM, 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:) There are file handlers too. Look in for example sex-mode.el that comes with nXhtml.