* find-file "before" hook.
@ 2009-07-29 20:47 Michal
2009-07-29 21:48 ` Peter Milliken
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Michal @ 2009-07-29 20:47 UTC (permalink / raw)
To: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: find-file "before" hook.
2009-07-29 20:47 find-file "before" hook Michal
@ 2009-07-29 21:48 ` Peter Milliken
2009-07-29 21:58 ` Lennart Borgman
[not found] ` <mailman.3419.1248904124.2239.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 4+ messages in thread
From: Peter Milliken @ 2009-07-29 21:48 UTC (permalink / raw)
To: Michal; +Cc: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1009 bytes --]
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 <rabbitko@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
>
[-- Attachment #2: Type: text/html, Size: 1348 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: find-file "before" hook.
2009-07-29 20:47 find-file "before" hook Michal
2009-07-29 21:48 ` Peter Milliken
@ 2009-07-29 21:58 ` Lennart Borgman
[not found] ` <mailman.3419.1248904124.2239.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 4+ messages in thread
From: Lennart Borgman @ 2009-07-29 21:58 UTC (permalink / raw)
To: Michal; +Cc: help-gnu-emacs
On Wed, Jul 29, 2009 at 10:47 PM, Michal<rabbitko@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:)
There are file handlers too. Look in for example sex-mode.el that
comes with nXhtml.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: find-file "before" hook.
[not found] ` <mailman.3419.1248904124.2239.help-gnu-emacs@gnu.org>
@ 2009-07-30 12:20 ` Michal
0 siblings, 0 replies; 4+ messages in thread
From: Michal @ 2009-07-30 12:20 UTC (permalink / raw)
To: help-gnu-emacs
Peter Milliken <peter.milliken@gmail.com> writes:
> 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.
>
Hallo Lennart and Peter!
Thank You for Your help.
It looks like there is no thing in emacs that cannot be solved:)
best regards,
Michal
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-07-30 12:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-29 20:47 find-file "before" hook Michal
2009-07-29 21:48 ` Peter Milliken
2009-07-29 21:58 ` Lennart Borgman
[not found] ` <mailman.3419.1248904124.2239.help-gnu-emacs@gnu.org>
2009-07-30 12:20 ` Michal
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.