unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: 'Emacs-Devel' <emacs-devel@gnu.org>
Subject: Re: FW: fit-frame.el
Date: Tue, 11 Mar 2008 14:17:48 -0400	[thread overview]
Message-ID: <jwv63vtkufd.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <002c01c882ef$a76bbeb0$c2b22382@us.oracle.com> (Drew Adams's message of "Mon, 10 Mar 2008 12:45:19 -0800")

>> but it's far from clear what might be meant by "fit a frame to the
>> current buffer" (unless the current buffer is the only one 
>> shown in the frame, that is).

> What is meant by "fit a frame to the current buffer" is detailed in the doc
> string, starting with "_Fitting a non-empty buffer means_ resizing the frame
> to the smallest size such that the following are both true:".

This description is an algorithm, i.e. code written in English.
Most people are poor at reading such things, because human languages are
very ambiguous and elliptic in nature.  To make the docstring clear,
you'd need at the very least to somehow mark "fit a frame" in some kind
of special way, so people understand that this is a special term with
a very narrow meaning, explained elsewhere.  And even then it's not
clear that by "fit a frame to the current buffer" you really mean
"pretend there's no other window", especially since the resulting
behavior is just really odd.

> Why prohibit a user from using this in situations where it is useful?

Because it's clearly not a finished feature.  It's like a car without
windshield and doors and with a trunk that doesn't close: sure it can
come in handy sometimes, but to most people it's just a broken car.

When the feature is completed we can reconsider it.

>> We might also want to have a variant that only shrinks the frame.
>> Such a variant probably wouldn't need any customization.

> Only shrinks it to what size?

fit-frame can grow or shrink, depending on the situation.  I'm proposing
to provide a restriction of it that only shrinks (i.e. use the current
size as an upper bound on the desired final size).


        Stefan




  reply	other threads:[~2008-03-11 18:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-10  4:44 FW: fit-frame.el Drew Adams
2008-03-10 15:34 ` Stefan Monnier
2008-03-10 17:04   ` Drew Adams
2008-03-10 18:24     ` Stefan Monnier
2008-03-10 20:45       ` Drew Adams
2008-03-11 18:17         ` Stefan Monnier [this message]
2008-03-11 18:45           ` Drew Adams
2008-03-11 21:00             ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv63vtkufd.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).