help-gnu-emacs
[Top][All Lists]
Advanced

[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 11:41:10 -0700

> Sorry Drew, but as I said, I'm more of a beginner.

No apology needed. My fault for not noticing that.

> I saved the two libraries you recommended, and then loaded both
> manually with load-file. So... what now? I can't call add-hook from
> inside emacs (or I don't know how). What am I supposed to do from
> this point on? How do I test the hook?

After you load the *.el files with `load-file', do this (mentioned in the
file Commentary):

M-: (add-hook 'after-make-frame-functions 'fit-frame)

If that doesn't fix the problem, then take a look at the value of
`after-make-frame-functions'. If it contains more than just `fit-frame', try
setting it to nil (empty) and then adding `fit-frame' back again:

M-: (setq after-make-frame-functions nil)
M-: (add-hook 'after-make-frame-functions 'fit-frame)

The result should then be this:

C-h v after-make-frame-functions ==> (fit-frame)

Note: If there were additional functions, besides `fit-frame', in
`after-make-frame-functions', then there might be a good reason for them to
be there. ;-)

The above procedure is just to try to see if `fit-frame' does the right
thing at least when there are no other `after-make-frame-functions' present.
If it does, then there is likely interference among those functions. In that
case, you can try (starting with an empty list) adding them all back, in
different orders (e.g. try `fit-frame' first or last), to see if that helps.
You get the idea.

But see my previous reply about long lines. It sounds like this might just
be unrealistic expectations on your part. `fit-frame' makes the frame as
wide as its longest line, but it respects maximum limits that you can set.
See the `fit-frame' doc string.





reply via email to

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