all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Juanma Barranquero" <lekktu@gmail.com>
To: "martin rudalics" <rudalics@gmx.at>
Cc: David Hansen <david.hansen@gmx.net>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	emacs-devel@gnu.org
Subject: Re: `split-window-preferred-horizontally'
Date: Sat, 7 Jun 2008 14:46:25 +0200	[thread overview]
Message-ID: <f7ccd24b0806070546t1936524fldb6f9a41a7d2fde5@mail.gmail.com> (raw)
In-Reply-To: <484A451E.2070105@gmx.at>

On Sat, Jun 7, 2008 at 10:21, martin rudalics <rudalics@gmx.at> wrote:
>> And BTW, split-window-preferred-function's docstring is horribly
>> defcustom-oriented. `Vertically', `Horizontally' and `Sensibly' are
>> *not* the values the variable can have...
>
> But the doc-string is also what people customizing this read.

Yes. There are lot of variables that can be customized, and the
docstring usually reflects the values that it can have, not the tags
of the defcustom declaration. That's what the tags are for: to help
the people who's going through the customization interface.

>  I once
> used to put the valid values like `t' in the doc-string, and
> `vertically' plus `t' in parentheses in the tags of the customization
> interface and people complained. Hence, I don't know how to do this
> right.  Please write a better solution than the current one.

If I try to set up this variable out of customize (which I avoid like
hell), the current docstring is simply wrong. I had to go to the
source code to know what  *really* are the allowed values. The
docstring should reflect the truth (which, in this case, is that
`split-window-preferred-function' can have values `horizontally',
`sensibly', nil, or a function); then the defcustom tags would do its
job.

The following is what I would do (the specific wording is irrelevant).

--- window.el	6 Jun 2008 08:00:59 -0000	1.137
+++ window.el	7 Jun 2008 12:40:44 -0000
@@ -743,9 +743,12 @@
 (defcustom split-window-preferred-function nil
   "How `display-buffer' shall split windows.
-Choices are `Vertically', `Horizontally', and `Sensibly' where
-the latter attempts to split wide windows horizontally, narrow
-ones vertically.  Alternatively, you can set this to a function
-called with a window as single argument to split that window in
-two and return the new window."
+Choices are:
+  - `horizontally'   windows are split horizontally
+  - `sensibly'       attempt to split wide windows horizontally,
+                       narrow ones vertically
+  - nil              windows are split vertically
+  - a function       it will be called with a window as a single
+                       argument; it should split it in two and
+                       return the new window."
   :type '(choice
 	  (const :tag "Vertically" nil)




  reply	other threads:[~2008-06-07 12:46 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-06 19:44 `split-window-preferred-horizontally' David Hansen
2008-06-06 22:01 ` `split-window-preferred-horizontally' martin rudalics
2008-06-06 22:36   ` `split-window-preferred-horizontally' David Hansen
2008-06-07  8:21     ` `split-window-preferred-horizontally' martin rudalics
2008-06-07 20:16       ` `split-window-preferred-horizontally' David Hansen
2008-06-08 13:07         ` `split-window-preferred-horizontally' martin rudalics
2008-06-08 17:49           ` `split-window-preferred-horizontally' David Hansen
2008-06-09 20:54             ` `split-window-preferred-horizontally' David Hansen
2008-06-10  7:54               ` `split-window-preferred-horizontally' martin rudalics
2008-06-10 14:27                 ` `split-window-preferred-horizontally' Stefan Monnier
2008-06-07  1:44   ` `split-window-preferred-horizontally' Stefan Monnier
2008-06-07  2:29     ` `split-window-preferred-horizontally' Juanma Barranquero
2008-06-07  8:21       ` `split-window-preferred-horizontally' martin rudalics
2008-06-07 12:46         ` Juanma Barranquero [this message]
2008-06-07 14:41           ` `split-window-preferred-horizontally' martin rudalics
2008-06-07  8:21     ` `split-window-preferred-horizontally' martin rudalics
2008-06-07 18:23       ` `split-window-preferred-horizontally' Stefan Monnier
2008-06-07 14:36     ` `split-window-preferred-horizontally' martin rudalics
2008-06-07 18:33       ` `split-window-preferred-horizontally' 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

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

  git send-email \
    --in-reply-to=f7ccd24b0806070546t1936524fldb6f9a41a7d2fde5@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=david.hansen@gmx.net \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rudalics@gmx.at \
    /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.