Re: [jasspa] open, save hooks?
- Thanks for your tips! I think it would be a great idea to implement the
Btw, shouldn't I receive all mails posted to this mail group if I have
joined the jasspa mail list? I have so far not received anything. Maybe it
is may e-mail providers SPAM filter that stops the mails?
> Subject: Re: [jasspa] open, save hooks?
> From: Steven Phillips <bill@j...>
> Date: Wed Dec 22, 2004 11:17 pm
> To: "jasspa group" <email@example.com>
>It is dangerous to do something like this too low down as it can break
>things, for example the CVS interface loads the CVS/Entries file and if
>extension made the file load and go to line 20 the cvs directory list would
>not be correct, there are plenty of other examples.
>I think the best way to do this would be to write a wrapper around the
>find-file command and bind the new macro to C-x C-f, i.e.
>!if '$buffer-fname in list' and 'file just loaded'
>global-bind-key my-find-file "C-x C-f"
>You may find that you have to replace a couple of commands but the side
>are far easier to control. The difficulty with this is to actually store
>final cursor position of each file as it is deleted and this will require a
>little hacking in the macro release.
>The best mechanism to use would be the very little used $buffer-dhook
>can be set to the name of a macro which will be called when the buffer is
>deleted. The only difficulty is setting this variable and the only solution
>can think of that's near reasonable is to modify the buffer-init function
>buffinit.emf (look for the setting of $buffer-fhook) to simply set this
>variable to your macro. You will also need to create an fhook-default to
>handle general files without a hook.
>I have been thinking for some time that if a 'my-fhook-always' macro exists
>then it is called for all files loaded, perhaps this can be addressed for
>next release so you would be able to remove your changes from buffinit.