[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: feature request: indicator of minibuffer-recursion depth

From: Drew Adams
Subject: RE: feature request: indicator of minibuffer-recursion depth
Date: Fri, 15 Jun 2007 22:40:09 -0700

> Because this is a tiny feature that I think most users won't
> customize, and that doesn't merit (IMHO, etc.) one defcustom, let
> alone two...

"Most users" misses the mark. It is a self-fulfilling prophecy - if you make it 
difficult for most users to change this, they won't. Most users will limit 
their changes to whatever you have facilitated changing. If you require a 
password that only you know, for instance, then "most users" is limited to (at 
most) you.

Regardless of the calculation of "most users", you think wrong for at least one 
user - me. The first thing I did after getting Miles's code was to add a 
defface and a defcustom to it. Here's my mb-depth+.el, which at least some 
other users have also been using since last November:

(require 'mb-depth nil t)

(defface mb-depth-indicator '((t (:inherit default)))
  "Face used to indicate minibuffer depth."
  :group 'convenience :group 'faces)

(defcustom mb-depth-indicator-format "%d) "
  "*Format string for minibuffer depth indicator."
  :type 'string :group 'convenience)

;; REPLACE original defined in `mb-depth.el'.
;; Uses customizable format string and face.
(defun minibuf-depth-setup-minibuffer ()
  "Set up a minibuffer for `minibuffer-indicate-depth-mode'.
The prompt should already have been inserted."
  (when (> (minibuffer-depth) 1)
    (setq minibuf-depth-overlay
          (make-overlay (point-min) (1+ (point-min))))
    (overlay-put minibuf-depth-overlay 'before-string
              (format mb-depth-indicator-format
              'face 'mb-depth-indicator))
    (overlay-put minibuf-depth-overlay 'evaporate t)))

(provide 'mb-depth+)

Call me silly. Call me interested in "tiny features" that "most users" don't 
care about. I call someone who thinks that most users don't care about things 
like this naive - or uninterested in most users. 

Have you seen the use of cell-phone customizing gadgets in, say, Seoul or 
Bangkok?  Think users don't care much about personalizing the appearance of the 
things they use? Think again. One might even argue that that's all we _do_ care 
about. Look at the interest in Emacs color themes or Windows desktop 
customizing fluff. One fish, two fish, red fish, blue fish.

It's not all silly. But people are passionate even about preferences that 
others think of as perfectly silly. (Did I mention religious preferences? 

> And more to the point, you're arbitrarily supposing that changing the
> text (the "[%s]") and the face is all the user would want to
> customize. 

Arbitrarily? No. Judiciously.  Only? No. Typically. Facilitating changing what 
users typically have preferences about - when you give them the chance. 

I'd be willing to bet that some users will want to change the text, others will 
want to change the face, and others both. But you won't see any sign of such 
preferences as long as you make it hard for them to do that.

["Since we've taken a tough stance and stopped listening to them, we haven't 
heard anything from them." - French government wrt independentists in New 
Caledonia in the 90s]

> If you want to be *really* general, allow a function, so I can do
> (setq minibuffer-depth-indicator
>       #'(lambda (level)
>           (concat (make-string level ?*) " ")))

That's no more general than doing nothing - you might as well just provide the 
original source code, to "be *really* general". Arbitrary generality is not the 
aim, in any case. Ease of use for the target user audience is the aim. This 
tiny feature is just a user convenience. And, for me, that target audience is 
not just Lispers.

This is only a "tiny feature", yes, but it is big enough to bring out 
differences in point of view wrt what you and I think about the appearance and 
what we think about how much users might care about the appearance. Imagine how 
much more difference in point of view there must be in the wider user 
population! This tiny feature is a good litmus test in user friendliness, IMO.

You proposed:
(defvar minibuffer-depth-indicator 
        (propertize "[%d]" 'face 'highlight)

I replied "Sure, something like that would be OK." So I'm not hostile to your 

But I pointed out that having a defvar for that is not very useful - it's about 
the same amount of difficulty (and requires as much Lisp knowledge) to change 
the appearance using this variable as it would be to change the source code 
itself - you've simply extracted a piece of code into an internal variable.

Just replacing defvar with defcustom wouldn't help much either, because 
non-Lispers still wouldn't have a clue how to change the appearance. Just think 
about how much Lisp you need to know to understand (propertize "[%d]" 'face 
'highlight). Seriously - think about it.

And this is something that is _not_ inherently difficult to change. This is a 
_trivial_ change for users, provided you don't make it unnecessarily hard to 
change - for most users. Losers indeed.

reply via email to

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