[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: fit-frame every time i open a file

From: Drew Adams
Subject: RE: fit-frame every time i open a file
Date: Mon, 15 Oct 2007 10:02:14 -0700

> Thanks, but been there, done that. I admit I didn't try again with the new
> libraries, because I'm not sure where they should be replaced :"> (yes, I
> could try to find the files on disk).

You need not replace anything, just to try a library - just load it. If it
happens to help, then you can worry about how to replace what you have.

> However, aren't I correct in assuming that the libraries (albeit not
> necessarily the latest versions) are already in Aquamacs, since I can call
> fit-frame manually and it works?

I have no idea what is in Aquamacs. I don't use Aquamacs, I don't have
access to an Apple machine, and I wasn't involved in adding my code to

If I had to guess, I'd guess that Aquamacs does something different with
these libraries and `after-make-frame-functions'. But that's just a guess
from ignorance.

> Moreover, I can successfully associate it to some other hooks and
> that works too. The only thing that doesn't work is
> hooking fit-frame to after-make-frame-functions in particular.
> This yields no visible results.

I'm afraid I can't help you then. It works fine on other platforms. Perhaps
Aquamacs does something special in this regard. Perhaps someone who is
familiar with Aquamacs has a suggestion.

Perhaps it has to do with the order of the functions in
`after-make-frame-functions'. You might try changing the order or testing
without any other functions in that hook, besides `fit-frame'.

Perhaps it has to do with how Aquamacs and Apple create frames, and how that
process interacts with `after-make-frame-functions'. Dunno.

Did you say that it doesn't work only on files with long lines? Perhaps
`fit-frame' is in fact being called, but it doesn't do what you expect.
`fit-frame' does not fill or change your text in any way. The new frame
width is based on the longest line in your buffer, so if you have long
lines, then you'll have a wide frame. You can, however, control the maximum
width in various ways (variables) - see the Commentary in fit-frame.el.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]