From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.devel Subject: Re: [patch] Run occur command restricted to a region Date: Thu, 29 Dec 2016 18:50:27 +0000 Message-ID: References: <87vau3jl6f.fsf@gmail.com> <8337h6vhr7.fsf@gnu.org> <87shp665hf.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c192438b26ec20544d08f12 X-Trace: blaine.gmane.org 1483037460 18373 195.159.176.226 (29 Dec 2016 18:51:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 29 Dec 2016 18:51:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: Drew Adams , Tino Calancha , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 29 19:50:52 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cMfmq-00035j-Nx for ged-emacs-devel@m.gmane.org; Thu, 29 Dec 2016 19:50:48 +0100 Original-Received: from localhost ([::1]:36931 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cMfms-0003fv-ND for ged-emacs-devel@m.gmane.org; Thu, 29 Dec 2016 13:50:50 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54994) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cMfml-0003ff-RF for emacs-devel@gnu.org; Thu, 29 Dec 2016 13:50:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cMfmk-0003hk-MH for emacs-devel@gnu.org; Thu, 29 Dec 2016 13:50:43 -0500 Original-Received: from mail-ua0-x235.google.com ([2607:f8b0:400c:c08::235]:35042) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cMfmi-0003hD-Jl; Thu, 29 Dec 2016 13:50:40 -0500 Original-Received: by mail-ua0-x235.google.com with SMTP id v2so61979314uac.2; Thu, 29 Dec 2016 10:50:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tUgxsA/C9eNMoRfxgNd18jMpmx64NG+Iu7dj8zVwdfo=; b=qJkxZ0Yij0KRyZpPSRxJCbTrJO53KzrvzUcrHLDp1qSHYfJEgsi6yszVhoWCN8dTCk +5tzfq+GNALnJPUWxO11AdfrUiTyLCrltGBNUozNJlPhtZChFGHHho3VnM1zjQC9OUPE 64/G33ndxonkYpw2Q9mbQWCP05NIpQShHuaoAs9CfjgopgXst6CZ2l7U3dcLQEHkuQE/ qLjAc8i7eTfgYrMrZuev5MYJXUzu+GkvBPvKHIdOcFKawxml26V8BkdgbRXYojXogdxE OvdnCm1KxsuMkKeuC+FFJ/1O19ZrVZx/5gYxRpUsSU6C9+dNJqnopujXCC2TF3MQ0oQ7 4DfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tUgxsA/C9eNMoRfxgNd18jMpmx64NG+Iu7dj8zVwdfo=; b=akP+CHgmKfWlqQHJAd0ECJWS07XjmjJZplqD6IOZy3BE2JtZm2CpHKldMcflfcIF5Q 86wUv2EwxeIaAnEtqmgP1fRnBaq21YQVsye9fBn2H71RSYnjLHXBVw0TDWBvNVHsw/32 ZHSdYz4wGI+jLVnf4y5Up6oQXNnqVfMpyjZRDVN7G8V6kvKDRKMyODzCZn5gFC4GseR7 x+af6/gaBr1Yvb9x18A5sWdf4mDBweRiFMXH+f9Ab8Bv4heXy3ZKBvOhQG0iPODMa8ar nQ7Dhl77RvVd+C4zCwJeZVIRJPpllKw64uDgx1hTZZvk26SZQBGNOVcWx88iVYaxY8Dg 3v3g== X-Gm-Message-State: AIkVDXJBGr44/FWa4N4HO88ued1GBLIFdk1S5NMyL15K0T75TTzpi5HIFXP+TXxxEs5c9Rc+8ZY7JVWu/3/gXg== X-Received: by 10.176.83.12 with SMTP id x12mr25886847uax.174.1483037438273; Thu, 29 Dec 2016 10:50:38 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400c:c08::235 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:210969 Archived-At: --94eb2c192438b26ec20544d08f12 Content-Type: text/plain; charset=UTF-8 I agree with Drew's reasoning behind not using up the M-s b/f bindings for occur-backward/forward. But I don't like the idea of having M-s o as a submap binding. M-s o is super useful as it is now. Here's a suggestion for bindings that might work out. I am not at a computer, so cannot verify if M-s M-o is already taken,.. but if not then how about M-s M-o f for occur-forward, and M-s M-o b for occur-backward ?? The above bindings are easy to press and also easy to remember. On Thu, Dec 29, 2016, 11:47 PM Drew Adams wrote: > > (define-key search-map "o" 'occur) > > +(define-key search-map "b" 'occur-backward) > > +(define-key search-map "f" 'occur-forward) > > FWIW, I don't think those keys (`M-s b' and `M-s f') should be > bound to those commands. If we want to bind the new commands > during Isearch then I suggest that the occur commands be grouped > on prefix key `M-s o': > > M-s oo occur > M-s ob occur-backward > M-s of occur-backward > > `M-s' is a _general_ search prefix key. There is nothing > particularly mnemonic about `b' or `f' being `occur-backward' > or `occur-forward'. And we should not sacrifice 3 `M-s' keys > to these commands. > > I, and perhaps other users, and perhaps in the future vanilla > Emacs, have other bindings on `M-s'. And `M-s' bindings can > be anything at all related to the encompassing context of > searching. > > -- Kaushal Modi --94eb2c192438b26ec20544d08f12 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

I agree with Drew's reasoning behind not using up the M-= s b/f bindings for occur-backward/forward. But I don't like the idea of= having M-s o as a submap binding. M-s o is super useful as it is now.

Here's a suggestion for bindings that might work out. I = am not at a computer, so cannot verify if M-s M-o is already taken,.. but i= f not then how about

M-s M-o f for occur-forward, and
M-s M-o b for occur-backward

??

The above bindings are easy to press and also easy to rememb= er.


On Thu, Dec 29, 2016, 11:47= PM Drew Adams <drew.adams@orac= le.com> wrote:
>=C2=A0 (d= efine-key search-map "o"=C2=A0 =C2=A0 'occur)
> +(define-key search-map "b"=C2=A0 =C2=A0 'occur-backward= )
> +(define-key search-map "f"=C2=A0 =C2=A0 'occur-forward)=

FWIW, I don't think those keys (`M-s b' and `M-s f') should be<= br class=3D"gmail_msg"> bound to those commands.=C2=A0 If we want to bind the new commands
during Isearch then I suggest that the occur commands be grouped
on prefix key `M-s o':

=C2=A0 M-s oo=C2=A0 =C2=A0occur
=C2=A0 M-s ob=C2=A0 =C2=A0occur-backward
=C2=A0 M-s of=C2=A0 =C2=A0occur-backward

`M-s' is a _general_ search prefix key.=C2=A0 There is nothing
particularly mnemonic about `b' or `f' being `occur-backward' or `occur-forward'.=C2=A0 And we should not sacrifice 3 `M-s' keys<= br class=3D"gmail_msg"> to these commands.

I, and perhaps other users, and perhaps in the future vanilla
Emacs, have other bindings on `M-s'.=C2=A0 And `M-s' bindings can be anything at all related to the encompassing context of
searching.

--

Kaushal Modi

--94eb2c192438b26ec20544d08f12--