From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark Oteiza Newsgroups: gmane.emacs.devel Subject: Re: On controlling rectangle-preview Date: Tue, 19 Jul 2016 22:25:39 -0400 Message-ID: <20160720022539.GA25914@holos.localdomain> References: <87wpkhgq5i.fsf@udel.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1468981594 17678 80.91.229.3 (20 Jul 2016 02:26:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Jul 2016 02:26:34 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 20 04:26:28 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bPhDP-00059A-Io for ged-emacs-devel@m.gmane.org; Wed, 20 Jul 2016 04:26:27 +0200 Original-Received: from localhost ([::1]:60174 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPhDO-00073x-BX for ged-emacs-devel@m.gmane.org; Tue, 19 Jul 2016 22:26:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPhCm-00073q-Aw for emacs-devel@gnu.org; Tue, 19 Jul 2016 22:25:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPhCg-0000Ek-AV for emacs-devel@gnu.org; Tue, 19 Jul 2016 22:25:47 -0400 Original-Received: from mail-qt0-x22f.google.com ([2607:f8b0:400d:c0d::22f]:33190) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPhCg-0000Eg-1R for emacs-devel@gnu.org; Tue, 19 Jul 2016 22:25:42 -0400 Original-Received: by mail-qt0-x22f.google.com with SMTP id w38so19580185qtb.0 for ; Tue, 19 Jul 2016 19:25:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=6duQkbF0resma/VeFcGBF4KL9GAn1iDOFpmnueVQ8Dg=; b=VLVxnp7N44TH+9tf7y9/su4pacDAnNGCGFkA3I9UfnE0DtFIyZwkd/6mowS74D5TGI 3eC2E9PjkTabpG0S/sN9F860c+dilMxIYtBX9kdGsrfrDKXwgp6cNPxqtzYeW6AZhqxA daYYla8naInpEV1SXNoTh3kUBErc6rFfYx+j9PUF5rezpXrqGtng2rVfTBLUvzLJ7GDI TI6uF82wBXZ1Do8OzzGZ54yefbVOaDvVeQwzU9vyalvvM52+4uYFNQ2+EBa2MWU9EqDJ NK+5ONJMBp7b6V6LIz0lV9zDHOmg4K6ZCfijs5fdypbEChBk3e4pv2wESaQM9Gu/4UEa be7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=6duQkbF0resma/VeFcGBF4KL9GAn1iDOFpmnueVQ8Dg=; b=SW/t/5xHSwAhL9Vv+iekAqIeV1NVPtGuoqFtojsRqrgRyUlBhfrlMQR7EU/hgblU7b vT4GohHg0rolxX0DnK6rH6XmlyeSSWfD13UC/sts5zfWPhpu7RecQS54dQblZl85DftC kMZmLN3NVVjP8u8dmx+nvTTBVy1/9ISmbrqqUgCC7agIRzoIAsCwesd/j0qcCKOCo5z/ UnSjkdnVGpoEA5MDd2Q5BfN6UBShXYpBoisUeqvCc7yNpfQORFpf/Sc36niNDzRjVPWd 9XulncYiJ3XQ3SrAS6RyHRV5SU9ju19xtVA3rr2vZ3yTUscthrxHp1DvuIQjXuC060ku 3rPQ== X-Gm-Message-State: ALyK8tKpvpoQMXfySBYJrZFIP4UmCGpZ751WeqE1OcnXGgOXS28dqzag93ZnR3HFlOj2fo1a X-Received: by 10.237.35.201 with SMTP id k9mr66146529qtc.92.1468981541556; Tue, 19 Jul 2016 19:25:41 -0700 (PDT) Original-Received: from holos.localdomain (ip68-100-200-121.dc.dc.cox.net. [68.100.200.121]) by smtp.gmail.com with ESMTPSA id p2sm239812qta.15.2016.07.19.19.25.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jul 2016 19:25:40 -0700 (PDT) Original-Received: by holos.localdomain (Postfix, from userid 1000) id DC19466C35; Tue, 19 Jul 2016 22:25:39 -0400 (EDT) Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.2+14 (b2cb7a38c1ed) (2016-07-01) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c0d::22f X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:205855 Archived-At: 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.