From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kaushal Newsgroups: gmane.emacs.devel Subject: Suggestion to have highlight related bindings consistent between search-map and hi-lock-map Date: Fri, 10 Jul 2015 15:02:43 -0400 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1147f9eaac99b3051a8a0631 X-Trace: ger.gmane.org 1436555018 6308 80.91.229.3 (10 Jul 2015 19:03:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 10 Jul 2015 19:03:38 +0000 (UTC) To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 10 21:03:35 2015 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 1ZDdaB-0007FN-9b for ged-emacs-devel@m.gmane.org; Fri, 10 Jul 2015 21:03:35 +0200 Original-Received: from localhost ([::1]:45844 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDda9-0004Gk-CM for ged-emacs-devel@m.gmane.org; Fri, 10 Jul 2015 15:03:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDda2-0004GV-MD for emacs-devel@gnu.org; Fri, 10 Jul 2015 15:03:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZDda1-0003FO-5q for emacs-devel@gnu.org; Fri, 10 Jul 2015 15:03:26 -0400 Original-Received: from mail-yk0-x230.google.com ([2607:f8b0:4002:c07::230]:36710) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDda0-0003Ec-W3 for emacs-devel@gnu.org; Fri, 10 Jul 2015 15:03:25 -0400 Original-Received: by ykey15 with SMTP id y15so74225881yke.3 for ; Fri, 10 Jul 2015 12:03:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=5ofRgvKHBGHZVOm8IMvJE/eOsTP92rYgse6Zuv0whBk=; b=dszu2SRX57fAutdZ6d7BEV5oqHAHYmbqS4Hul15GOKMI8iS+AlHeM4ARggWWWAT56d Uz2FEUp3kcQDrCUt9BverXskRAfEcZbRZRzZuSo4/DhY3t3Kmbx0oho761eQuzR+aARM /YZLvcHJE2BxWwSc7L2CrZdTQKYEguSfF/PkCmczfA15th23QQiSwrPPZaLi/RMAESqT ePcjaSKOAp2lSDp9hE05NQF2fVikgBjccLDEOdTdDK89PL7ngX7BqnHY+PrD94WvRQhE GguXOMOz+2MKQFMhHdbar2UAUS7YEB3/7ArTFc1nfz6ReuGywBcju//6vMA+ECWKeKoE LyVQ== X-Received: by 10.129.116.134 with SMTP id p128mr24744076ywc.1.1436555003334; Fri, 10 Jul 2015 12:03:23 -0700 (PDT) Original-Received: by 10.13.253.5 with HTTP; Fri, 10 Jul 2015 12:02:43 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4002:c07::230 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:187800 Archived-At: --001a1147f9eaac99b3051a8a0631 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, I was trying to using the binding for highlight-regexp and I got confused if the prefix was "C-x w r" or "M-s h r". I "grepping" (actually agging), I found that below are the ONLY bindings that begin with "C-x w .." and "M-s h .." (with the exact same number of bindings too). Can we make the bindings consistent so that it doesn't matter is the user is using "C-x w" or "M-s h"? km=C2=B2~/downloads/:git/emacs/lisp> ag 'define.*C\-xw' hi-lock.el 277: (define-key map "\C-xwi" 'hi-lock-find-patterns) 278: (define-key map "\C-xwl" 'highlight-lines-matching-regexp) 279: (define-key map "\C-xwp" 'highlight-phrase) 280: (define-key map "\C-xwh" 'highlight-regexp) 281: (define-key map "\C-xw." 'highlight-symbol-at-point) 282: (define-key map "\C-xwr" 'unhighlight-regexp) 283: (define-key map "\C-xwb" 'hi-lock-write-interactive-patterns) km=C2=B2~/downloads/:git/emacs/lisp> ag 'define.*search-map\s+"h' bindings.el 935:(define-key search-map "hf" 'hi-lock-find-patterns) 932:(define-key search-map "hl" 'highlight-lines-matching-regexp) 931:(define-key search-map "hp" 'highlight-phrase) 930:(define-key search-map "hr" 'highlight-regexp) 933:(define-key search-map "h." 'highlight-symbol-at-point) 934:(define-key search-map "hu" 'unhighlight-regexp) 936:(define-key search-map "hw" 'hi-lock-write-interactive-patterns) =E2=80=8BSome bindings are consistent but some are not. Here are the incons= istent ones: hi-lock.el 277: (define-key map "\C-xwi" 'hi-lock-find-patterns) bindings.el 935: (define-key search-map "hf" 'hi-lock-find-patterns) hi-lock.el 282: (define-key map "\C-xwr" 'unhighlight-regexp) bindings.el 934: (define-key search-map "hu" 'unhighlight-regexp) hi-lock.el 280: (define-key map "\C-xwh" 'highlight-regexp) bindings.el 930: (define-key search-map "hr" 'highlight-regexp) hi-lock.el 283: (define-key map "\C-xwb" 'hi-lock-write-interactive-patterns) bindings.el 936: (define-key search-map "hw" 'hi-lock-write-interactive-patterns) *** Here are my suggested consistent bindings to fix the inconsistent ones: *** - Currently "C-x w f" is undefined; "f" for find patterns hi-lock.el 277: (define-key map "\C-xwf" 'hi-lock-find-patterns) ; changed bindings.el 935: (define-key search-map "hf" 'hi-lock-find-patterns) ; no change - Currently "C-x w u" is undefined; "u" for unhighlight hi-lock.el 282: (define-key map "\C-xwu" 'unhighlight-regexp) ; changed bindings.el 934: (define-key search-map "hu" 'unhighlight-regexp) ; no change - "C-x w r" which was earlier bound to unhighlight-regexp should now be bound to highlight-regexp; "r" for regexp hi-lock.el 280: (define-key map "\C-xwr" 'highlight-regexp) ; changed bindings.el 930: (define-key search-map "hr" 'highlight-regexp) ; no change - Currently "C-x w w" is undefined; "w" for write interactive patterns hi-lock.el 283: (define-key map "\C-xww" 'hi-lock-write-interactive-patterns) ; changed bindings.el 936: (define-key search-map "hw" 'hi-lock-write-interactive-patterns) ; no change Well.. turns out only 4 bindings need to change in hi-lock.el to make these consistent. =E2=80=8B |------------+-------------+---------------------+-------------------------= -----------| | search-map | hi-lock-map | last key in binding | function | |------------+-------------+---------------------+-------------------------= -----------| | M-s h | C-x w | l | highlight-lines-matching-regexp | | M-s h | C-x w | p | highlight-phrase | | M-s h | C-x w | . | highlight-symbol-at-point | |------------+-------------+---------------------+-------------------------= -----------| | M-s h | C-x w | f | hi-lock-find-patterns | | M-s h | C-x w | u | unhighlight-regexp | | M-s h | C-x w | r | highlight-regexp | | M-s h | C-x w | w | hi-lock-write-interactive-patterns | |------------+-------------+---------------------+-------------------------= -----------| -- Kaushal Modi --001a1147f9eaac99b3051a8a0631 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

I was trying to= using the binding for highlight-regexp and I got confused if the prefix wa= s "C-x w r" or "M-s h r". I "grepping" (actua= lly agging), I found that below are the ONLY bindings that begin with "= ;C-x w .." and "M-s h .." (with the exact same number of bin= dings too).

Can we make the bindings consis= tent so that it doesn't matter is the user is using "C-x w" o= r "M-s h"?

km=C2=B2~/downloads/:gi= t/emacs/lisp> ag 'define.*C\-xw'
hi-lock.el<= /div>
277: =C2=A0 =C2=A0(define-key map "\C-xwi" 'hi-lock-fin= d-patterns)
278: =C2=A0 =C2=A0(define-key map "\C-xwl&qu= ot; 'highlight-lines-matching-regexp)
279: =C2=A0 =C2=A0(d= efine-key map "\C-xwp" 'highlight-phrase)
280: = =C2=A0 =C2=A0(define-key map "\C-xwh" 'highlight-regexp)
281: =C2=A0 =C2=A0(define-key map "\C-xw." 'highligh= t-symbol-at-point)
282: =C2=A0 =C2=A0(define-key map "\C-= xwr" 'unhighlight-regexp)
283: =C2=A0 =C2=A0(define-k= ey map "\C-xwb" 'hi-lock-write-interactive-patterns)

km=C2=B2~/downloads/:git/emacs/lisp> ag 'defi= ne.*search-map\s+"h'
bindings.el
935:(de= fine-key search-map "hf" =C2=A0 'hi-lock-find-patterns)
932:(define-key search-map "hl" =C2=A0 'highlight-lin= es-matching-regexp)
931:(define-key search-map "hp" = =C2=A0 'highlight-phrase)
930:(define-key search-map "= ;hr" =C2=A0 'highlight-regexp)
933:(define-key search= -map "h." =C2=A0 'highlight-symbol-at-point)
934= :(define-key search-map "hu" =C2=A0 'unhighlight-regexp)
936:(define-key search-map "hw" =C2=A0 'hi-lock-writ= e-interactive-patterns)

=E2=80=8BSome bindin= gs are consistent but some are not. Here are the inconsistent ones:<= /div>

hi-lock.el =C2=A0277: (define-key map =C2=A0 =C2= =A0 =C2=A0 =C2=A0"\C-xwi" 'hi-lock-find-patterns)

hi-lock.el =C2=A0282= : (define-key map =C2=A0 =C2=A0 =C2=A0 =C2=A0"\C-xwr" 'unhigh= light-regexp)
bindings.el 934: (define-key search-map =C2=A0 = =C2=A0 "hu" 'unhighlight-regexp)

hi-lock.el =C2=A0280: (define-key map =C2=A0 =C2=A0 =C2=A0 =C2=A0"\= C-xwh" 'highlight-regexp)
bindings.el 930: (define-ke= y search-map =C2=A0 =C2=A0 "hr" 'highlight-regexp)

hi-lock.el =C2=A0283: (define-key map =C2=A0 =C2=A0 = =C2=A0 =C2=A0"\C-xwb" 'hi-lock-write-interactive-patterns)
bindings.el 936: (define-key search-map =C2=A0 =C2=A0 "hw&q= uot; 'hi-lock-write-interactive-patterns)


- Currently "C-x w f" is un= defined; "f" for find patterns
hi-lock.el =C2=A0277:= (define-key map =C2=A0 =C2=A0 =C2=A0 =C2=A0"\C-xwf" 'hi-lock= -find-patterns) ; changed
bindings.el 935: (define-key search-= map =C2=A0 =C2=A0 "hf" 'hi-lock-find-patterns) ; no change

- Currently "C-x w u" is undefined; = "u" for unhighlight
hi-lock.el =C2=A0282: (define-ke= y map =C2=A0 =C2=A0 =C2=A0 =C2=A0"\C-xwu" 'unhighlight-regexp= ) ; changed
bindings.el 934: (define-key search-map =C2=A0 = =C2=A0 "hu" 'unhighlight-regexp) ; no change
- "C-x w r" which was earlier bound to unhighlight= -regexp should now be bound to highlight-regexp; "r" for regexp
hi-lock.el =C2=A0280: (define-key map =C2=A0 =C2=A0 =C2=A0 =C2= =A0"\C-xwr" 'highlight-regexp) ; changed
binding= s.el 930: (define-key search-map =C2=A0 =C2=A0 "hr" 'highligh= t-regexp) ; no change
<= font face=3D"monospace, monospace">
- Currently "C-x = w w" is undefined; "w" for write interactive patterns=
hi-lock.el =C2=A0283: (define-key map =C2=A0 =C2=A0 =C2=A0 =C2=A0&qu= ot;\C-xww" 'hi-lock-write-interactive-patterns) ; changed
bindings.el 936: (define-key search-map =C2=A0 =C2=A0 "hw" &= #39;hi-lock-write-interactive-patterns) ; no change

Well.. turns out only 4 bindings need to change in hi-lock.el to m= ake these consistent.
<= font face=3D"monospace, monospace">=E2=80=8B
|------------+---= ----------+---------------------+------------------------------------|
| search-map | hi-lock-map | last key in binding | function =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 |
|------------+-------------+---------------------= +------------------------------------|
| M-s h =C2=A0 =C2=A0 = =C2=A0| C-x w =C2=A0 =C2=A0 =C2=A0 | l =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 | highlight-lines-matching-regexp =C2=A0 =C2=A0= |
| M-s h =C2=A0 =C2=A0 =C2=A0| C-x w =C2=A0 =C2=A0 =C2=A0 | p= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | highlight= -phrase =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |
| M-s h =C2=A0 =C2=A0 =C2=A0| C-x w =C2=A0 =C2=A0 =C2=A0 | . =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | highlight-sym= bol-at-point =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|
|------------= +-------------+---------------------+------------------------------------|<= /font>
| M-s h =C2=A0 =C2=A0 =C2=A0| C-x w =C2=A0 =C2=A0 =C2=A0 | f = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | hi-lock-fi= nd-patterns =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|
<= div class=3D"gmail_default" style=3D"">= | M-s h =C2=A0 =C2=A0 =C2=A0| C-x w =C2=A0 =C2=A0 =C2=A0 | u =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | unhighlight-regexp =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |
| M-s h= =C2=A0 =C2=A0 =C2=A0| C-x w =C2=A0 =C2=A0 =C2=A0 | r =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | highlight-regexp =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |
| M-s h = =C2=A0 =C2=A0 =C2=A0| C-x w =C2=A0 =C2=A0 =C2=A0 | w =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | hi-lock-write-interactive-patte= rns |
|------------+-------------+---------------------+------= ------------------------------|

--
Kaushal Modi
--001a1147f9eaac99b3051a8a0631--