[Top][All Lists]

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

Re: On controlling rectangle-preview

From: Mark Oteiza
Subject: Re: On controlling rectangle-preview
Date: Tue, 19 Jul 2016 22:25:39 -0400
User-agent: Mutt/1.6.2+14 (b2cb7a38c1ed) (2016-07-01)

On 19/07/16 at 09:32pm, Stefan Monnier wrote:
> > The automatic preview can be pretty jarring, especially when doing
> > rectangle-string in one place (some mode, language, what-have-you), then
> > going someplace else, doing rectangle-string and seeing the preview when
> > the plan is to enter something completely different.
> FWIW, I also find it unsatisfactory in some cases.  Which cases annoy me
> depends on whether the text I'm about to insert is related to the last
> text I inserted via that mechanism, so there's no way Emacs can tell
> whether it'll be annoying or not.
> > Not sure if there is a better way to control this other than introducing
> > a parameter.
> Agreed.  I thought about delaying the preview a bit when str is "", but
> it's fiddly and not very convincing either.
> > For the reasons above I'd prefer this to be nil by default,
> I could live with it being nil by default (or even without any option
> at all).
> > -      (when (equal str "")
> > +      (when (and rectangle-preview-default (equal str ""))
> But I think the preview should not be inhibited when str is "" *again*
> (i.e. when str is "" as a result of minibuffer modifications rather than
> as a result of inaction).

To me that seems a little odd (unexpected behaviour), and with an empty
minibuffer the default preview is only an M-n away.

Since rectangle--string-preview's scope seems to just be in the
minibuffer it looks like it can be done by locally setting
rectangle-preview-default => t (or otherwise making that condition
truthy) after the first `let' in rectangle--string-preview.

Another parameter?  Or rectangle-preview could be made a ternary-or-so option.

reply via email to

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