From: Alex Deva <alxx@indigenious.ro>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: Help-gnu-emacs@gnu.org
Subject: Re: fit-frame every time i open a file
Date: Mon, 15 Oct 2007 23:12:46 +0300 [thread overview]
Message-ID: <3575DEDA-88CF-442C-BE9D-1AB1A5E84383@indigenious.ro> (raw)
In-Reply-To: <DNEMKBNJBGPAOPIJOOICCEJPEAAA.drew.adams@oracle.com>
[-- Attachment #1.1: Type: text/plain, Size: 3645 bytes --]
On Oct 15, 2007, at 9:41 PM, Drew Adams wrote:
>> Sorry Drew, but as I said, I'm more of a beginner.
>
> No apology needed. My fault for not noticing that.
I actually take pride in 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)
>
I added the hook manually (I honestly didn't know about M-: because
I'm not a LISP programmer, though it's on my list) and the effect was
this: any file I opened came up in a frame exactly the same
dimensions as the current frame (which, as it happens, had been fit-
framed). The dimensions of the new frames are now irrespective of the
frame best fit (i.e., if I manually call fit-frame, the frame resizes).
However, if I resize the current window by dragging its corner
(Aquamacs lets you do that), then the files I subsequently open still
have the same dimensions that the current window originally had. In
other words, width/height seem to have been frozen when I added the
hook, somehow.
> 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:
>
Taking a look at the variable in question, I get this:
(fit-frame set-mode-style-after-make-frame)
A quick grep showed that the second call has nothing to do with
either of your two libraries. I don't know how to look it up inside
emacs to see where it comes from. :(
> 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)
>
OK.
Now again nothing happens when I open new files. They seem to open
with the default width/height and are resized to best fit when I call
fit-frame manually.
> 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.
Thank you, I do, but since the test failed, I don't see the point in
reversing the order of the only 2 functions that were hooked...
>
> 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.
I read everything you write carefully. I know (empirically) what fit-
frame does and what it doesn't do, and we're not having a case of
enforced line width limits (besides, those are accessible as
configuration parameters within Aquamacs -- one of the reasons I
thought fit-frame would be better integrated).
Given this new information, is there anything else I could try? The
problem started off pretty simple, but now seems to be getting
hairier... Aquamacs support is rather scarce, and I'm surprised to
discover that nobody from their team is on this list also.
Thank you for your support so far,
Alex
[-- Attachment #1.2: Type: text/html, Size: 8688 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
next prev parent reply other threads:[~2007-10-15 20:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-15 13:07 fit-frame every time i open a file alxx
2007-10-15 15:45 ` Drew Adams
2007-10-15 16:13 ` alxx
2007-10-15 17:02 ` Drew Adams
2007-10-15 17:44 ` Peter Dyballa
2007-10-15 18:15 ` Drew Adams
2007-10-15 18:23 ` Alex Deva
2007-10-15 18:41 ` Drew Adams
2007-10-15 20:12 ` Alex Deva [this message]
2007-10-15 20:54 ` Drew Adams
2007-10-16 7:15 ` Alex Deva
2007-10-16 14:18 ` Drew Adams
2007-10-16 8:44 ` Peter Dyballa
[not found] ` <mailman.2101.1192479183.18990.help-gnu-emacs@gnu.org>
2007-10-21 7:57 ` David Reitter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3575DEDA-88CF-442C-BE9D-1AB1A5E84383@indigenious.ro \
--to=alxx@indigenious.ro \
--cc=Help-gnu-emacs@gnu.org \
--cc=drew.adams@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.