all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Reitter <david.reitter@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: fit-frame every time i open a file
Date: Sun, 21 Oct 2007 00:57:59 -0700	[thread overview]
Message-ID: <1192953479.976658.21140@q3g2000prf.googlegroups.com> (raw)
In-Reply-To: <mailman.2101.1192479183.18990.help-gnu-emacs@gnu.org>

On Oct 15, 9:12 pm, Alex Deva <a...@indigenious.ro> wrote:

> Given this new information, is there anything else I could try? The
> problem started off pretty simple, but now seems to be getting
> hairier...

(I presume you run one-buffer-one-frame-mode, that is, "Display
Buffers in Separate Frames" is on in the Options menu.)

To fit a frame, the `fit-frame' function needs to see the buffer
contents.

When you type C-x C-f, a new frame is opened, and then you are allowed
to enter the name of the file to be loaded. This means that the `after-
make-frame-functions' are run _before_ the file is loaded. The  idea
of using `after-make-frame-functions' is thus a kludge: it assumes
that the frame is created after the file has been loaded. This is easy
to see if you actually watch watch's happening when you press C-x C-f.
As further hint: `fit-frame' works fine when you find files from the
"Recent Files" menu.

If you enter C-h k C-x C-f, you find that C-x C-f is bound to
`aquamacs-find-file' in Aquamacs. That's something we can leverage.
So, my solution is this (in addition to the code Drew suggested):

(defadvice aquamacs-find-file (after fit activate)
  (fit-frame))

if you add that to your ~/Library/Preferences/Aquamacs Emacs/
Preferences.el, `fit-frame' is called after each (interactive)
aquamacs-find-file operation.

Does that work for you?

Maybe we'll add an option for users to easily enable frame fitting in
such a situation - I think that'd be nice.

> Aquamacs support is rather scarce, and I'm surprised to
> discover that nobody from their team is on this list also.

Can you substantiate that? What else have you tried with respect to
support? Notice the support options on the website.

--
http://aquamacs.org -- Aquamacs: Emacs on Mac OS X
http://aquamacs.org/donate -- Could we help you? Return the favor and
support the Aquamacs Project!

      parent reply	other threads:[~2007-10-21  7:57 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
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 [this message]

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=1192953479.976658.21140@q3g2000prf.googlegroups.com \
    --to=david.reitter@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.