From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.devel Subject: Re: Clarifying the C-c letter guideline Date: Sun, 14 Feb 2021 20:38:34 +0300 Message-ID: References: <87ft1y4zln.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40397"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.0 (3d08634) (2020-11-07) Cc: emacs-devel@gnu.org To: Philip Kaludercic Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Feb 14 18:42:14 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lBLPS-000APF-4c for ged-emacs-devel@m.gmane-mx.org; Sun, 14 Feb 2021 18:42:14 +0100 Original-Received: from localhost ([::1]:46544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lBLPR-0005nw-6H for ged-emacs-devel@m.gmane-mx.org; Sun, 14 Feb 2021 12:42:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57884) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBLOT-0004xn-NH for emacs-devel@gnu.org; Sun, 14 Feb 2021 12:41:13 -0500 Original-Received: from stw1.rcdrun.com ([217.170.207.13]:33075) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBLOP-0001mt-QL for emacs-devel@gnu.org; Sun, 14 Feb 2021 12:41:13 -0500 Original-Received: from localhost ([::ffff:41.210.147.95]) (AUTH: PLAIN securesender, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000001E07E.00000000602960B2.00001B62; Sun, 14 Feb 2021 10:41:05 -0700 Mail-Followup-To: Philip Kaludercic , emacs-devel@gnu.org Content-Disposition: inline In-Reply-To: <87ft1y4zln.fsf@posteo.net> Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:264740 Archived-At: * Philip Kaludercic [2021-02-14 15:14]: >=20 > Hi, >=20 > a few days ago, there was a discussion on help-gnu-emacs[0], > specifically on this one paragraph from (elisp) Key Binding Conventions: >=20 > > =E2=80=A2 Don=E2=80=99t define =E2=80=98C-c LETTER=E2=80=99 as a key in= Lisp programs. Sequences > > consisting of =E2=80=98C-c=E2=80=99 and a letter (either upper or low= er case) are > > reserved for users; they are the *only* sequences reserved for > > users, so do not block them. >=20 > There seems to be some uncertainty in how this should be > interpreted. Does this mean that... >=20 > - No package/library/third-party code may ever bind a command or map to > C-c LETTER, under any circumstances (in the letter of the law). Convention is not a law, rather normative example. There are third party packages that are not public, or not free software, you may bind such as you wish and do what you wish at your home or office, it is free software, you can bind keys as you really wish and want. As a normative example C-c LETTER keys shall be reserved for users, so third party packages should not bind globally and automatically those. > - A package/library/third-party code may bind a command or a map to C-c > LETTER, if the user is explicitly asked and he or she gives > permission (in the spirit of the law). It is understandable that you can make programs to do whatever you wish and program may ask user to decide on which key to bind some function. It is not breaking any law. I just don't believe that package that globally sets key on C-c LETTER would be accepted in GNU ELPA or Non-GNU ELPA repository. But I do not think that MELPA or other repository would object to it. Short recursive grep in 2500 *.el packages from MELPA tells me that there is almost no package binding anything on C-c LETTER. They will rather suggest it to be bound by user or one will provide a single function to bind all keys like it is in lorem-ipsum package =2E/lorem-ipsum-20190819.2042.el=0076: In that sense, many packages decide to sugest to user to use C-c LETTER for commands or prefix keys. There is nothing wrong in suggesting it to user through interactive function, artificial intelligence, to bind the key on some of suggested keys or letters as that will then be decided by user and not by programmer. Function can also ask user to invoke manually the preferred key and to bind it to such desired chosen key without suggesting to user series or list of keys. Jean 79 matches for ""C-c" in buffer: *grep* 5:./dpaste-20160303.2113.el=0054:;; (global-set-key (kbd "C-c p")= 'dpaste-region-or-buffer) 40:./simple-call-tree-20180224.2056.el=00318:;; (global-set-key (kbd "= C-c S") 'simple-call-tree-display-buffer) 53:./project-root-20160408.1600.el=0056:;; (global-set-key (kbd "C-c p= f") 'project-root-find-file) 54:./project-root-20160408.1600.el=0057:;; (global-set-key (kbd "C-c p= g") 'project-root-grep) 55:./project-root-20160408.1600.el=0058:;; (global-set-key (kbd "C-c p= a") 'project-root-ack) 56:./project-root-20160408.1600.el=0059:;; (global-set-key (kbd "C-c p= d") 'project-root-goto-root) 57:./project-root-20160408.1600.el=0060:;; (global-set-key (kbd "C-c p= p") 'project-root-run-default-command) 58:./project-root-20160408.1600.el=0061:;; (global-set-key (kbd "C-c p= l") 'project-root-browse-seen-projects) 59:./project-root-20160408.1600.el=0063:;; (global-set-key (kbd "C-c p= M-x") 86:./scratch-ext-20140104.516.el=0056:;; (global-set-key (kbd "C-c= i") 'scratch-ext-insert-newest-log) 87:./scratch-ext-20140104.516.el=0057:;; (global-set-key (kbd "C-c= r") 'scratch-ext-restore-last-scratch) 91:./eyuml-20170413.2141.el=0032:;; (global-set-key (kbd "C-c a") 'eyu= ml-create-activity-diagram) 92:./eyuml-20170413.2141.el=0033:;; (global-set-key (kbd "C-c c") 'eyu= ml-create-class-diagram) 93:./eyuml-20170413.2141.el=0034:;; (global-set-key (kbd "C-c u") 'eyu= ml-create-usecase-diagram) 108:./helm-spaces-20161001.1409.el=0034:;; (global-set-key (kbd "C-c s"= ) 'helm-spaces) 125:./jump-to-line-20130122.1653.el=0049:;; (global-set-key (kbd "C-c C= -j") 'jump-to-line) ; Jump 126:./jump-to-line-20130122.1653.el=0050:;; (global-set-key (kbd "C-c b= ") 'jtl-back) ; Back 135:./region-convert-20190104.1108.el=0040:;;; (global-set-key (kb= d "C-c r") 'region-convert) 137:./org-mru-clock-20201019.824.el=0047:;;; (global-set-key (kbd "C-c = C-x i") #'org-mru-clock-in) 138:./org-mru-clock-20201019.824.el=0048:;;; (global-set-key (kbd "C-c = C-x C-j") #'org-mru-clock-select-recent-task) 139:./sqlup-mode-20190814.46.el=0051:;; (global-set-key (kbd "C-c u") '= sqlup-capitalize-keywords-in-region) 156:./ietf-docs-20190420.851.el=0037:;; (global-set-key (kbd "C-c i o")= 'ietf-docs-open-at-point) 171:./helm-c-moccur-20151230.924.el=00492:;; e.x, (global-set-key (kbd = "C-c f") (helm-c-moccur-define-occur-command "defun ")) 197:./hide-lines-20151127.1840.el=0046:;; (global-set-key (kbd "C-c /")= 'hide-lines) 209:./org-gtd-20200825.1410.el=0074:;; (global-set-key (kbd "C-c d c"= ) 'org-gtd-capture) ;; add item to inbox 210:./org-gtd-20200825.1410.el=0075:;; (global-set-key (kbd "C-c d p"= ) 'org-gtd-process-inbox) ;; process entire inbox 211:./org-gtd-20200825.1410.el=0076:;; (global-set-key (kbd "C-c d a"= ) 'org-agenda-list) ;; see what's on your plate today 212:./org-gtd-20200825.1410.el=0077:;; (global-set-key (kbd "C-c d n"= ) 'org-gtd-show-all-next) ;; see all NEXT items 213:./org-gtd-20200825.1410.el=0078:;; (global-set-key (kbd "C-c d s"= ) 'org-gtd-show-stuck-projects) ;; see projects that don't have a NEXT item 221:./decide-20190201.2137.el=00127:;; (global-set-key (kbd "C-c r") 'd= ecide-roll-dice) 223:./panda-20200917.520.el=0028:;; (global-set-key (kbd "C-c b"= ) 'panda-map) ;; b for "Bamboo" 225:./number-20170901.1312.el=0045:;; (global-set-key (kbd "C-c C-+") '= number/add) 226:./number-20170901.1312.el=0046:;; (global-set-key (kbd "C-c C--") '= number/sub) 227:./number-20170901.1312.el=0047:;; (global-set-key (kbd "C-c C-*") '= number/multiply) 228:./number-20170901.1312.el=0048:;; (global-set-key (kbd "C-c C-/") '= number/divide) 229:./number-20170901.1312.el=0049:;; (global-set-key (kbd "C-c C-0") '= number/pad) 230:./number-20170901.1312.el=0050:;; (global-set-key (kbd "C-c C-=3D")= 'number/eval) 244:./string-inflection-20200927.747.el=0066:;; (global-set-key (kbd = "C-c C-u") 'string-inflection-all-cycle) 247:./right-click-context-20190528.1832.el=00182: (global-set-key (k= bd \"C-c :\") #'right-click-context-menu) 250:./helm-grepint-20200811.1616.el=0053:;; (global-set-key (kb= d "C-c g") #'helm-grepint-grep) 251:./helm-grepint-20200811.1616.el=0054:;; (global-set-key (kb= d "C-c G") #'helm-grepint-grep-root) 255:./auto-shell-command-20180817.1502.el=0051:;; (global-set-key (kbd = "C-c C-m") 'ascmd:toggle) ; Temporarily on/off auto-shell-command run 256:./auto-shell-command-20180817.1502.el=0052:;; (global-set-key (kbd = "C-c C-,") 'ascmd:popup) ; Pop up '*Auto Shell Command*' 257:./auto-shell-command-20180817.1502.el=0053:;; (global-set-key (kbd = "C-c C-.") 'ascmd:exec) ; Exec-command specify file name 277:./helm-bm-20160321.1331.el=0033:;; (global-set-key (kbd "C-c b") 'h= elm-bm) 280:./helm-swoop-20200814.448.el=0049:;; (global-set-key (kbd "C-c M-i"= ) 'helm-multi-swoop) 294:./heaven-and-hell-20190713.1830.el=0040:;; (global-set-key (kbd "C-= c ") 'heaven-and-hell-load-default-theme) 309:./helm-git-grep-20170614.1411.el=0034:;; (global-set-key (kbd "C-c = g") 'helm-git-grep) 311:./test-kitchen-20171129.2035.el=0044:;; (global-set-key (kbd "C-c= C-d") 'test-kitchen-destroy) 312:./test-kitchen-20171129.2035.el=0045:;; (global-set-key (kbd "C-c= C-t") 'test-kitchen-test) 313:./test-kitchen-20171129.2035.el=0046:;; (global-set-key (kbd "C-c= l") 'test-kitchen-list) 314:./test-kitchen-20171129.2035.el=0047:;; (global-set-key (kbd "C-c= C-kv") 'test-kitchen-verify) 315:./test-kitchen-20171129.2035.el=0048:;; (global-set-key (kbd "C-c= C-kc") 'test-kitchen-converge) 316:./quick-shell-keybind-20171023.613.el=0033:;; (global-set-key (= kbd "C-c C-t") #'quick-shell-keybind) 360:./org-board-20200619.1016.el=00324:;; (global-set-key (kbd "C-c o"= ) org-board-keymap) 364:./browse-kill-ring-20200210.921.el=0043:;; (global-set-key (kbd "C-= c k") 'browse-kill-ring) 381:./lorem-ipsum-20190819.2042.el=0058:;; (global-set-key (kbd "C-c C-= l s") 'lorem-ipsum-insert-sentences) 382:./lorem-ipsum-20190819.2042.el=0059:;; (global-set-key (kbd "C-c C-= l p") 'lorem-ipsum-insert-paragraphs) 383:./lorem-ipsum-20190819.2042.el=0060:;; (global-set-key (kbd "C-c C-= l l") 'lorem-ipsum-insert-list) 384:./lorem-ipsum-20190819.2042.el=0076: (global-set-key (kbd "C-c l s= ") 'lorem-ipsum-insert-sentences) 385:./lorem-ipsum-20190819.2042.el=0077: (global-set-key (kbd "C-c l p= ") 'lorem-ipsum-insert-paragraphs) 386:./lorem-ipsum-20190819.2042.el=0078: (global-set-key (kbd "C-c l l= ") 'lorem-ipsum-insert-list)) 387:./firefox-controller-20160529.55.el=00136:;; | (global-set-key (k= bd "C-c m L") 388:./firefox-controller-20160529.55.el=00196:;; | (global-set-key (k= bd "C-c m g") 389:./org-journal-20201019.1813.el=00421:(global-set-key (kbd "C-c C-j"= ) 'org-journal-new-entry) 426:./org-working-set-20200914.456.el=001030: "- As above, but edit= your .emacs and insert a setq-clause: (setq org-working-set-id \"XXX\"), w= here XXX is the id of your node. You might want to add a keybinding too, e.= g. (global-set-key (kbd \"C-c w\") 'org-working-set)" 435:./iy-go-to-char-20150927.226.el=0052:;; (global-set-key (kbd "C= -c f") 'iy-go-to-char) 436:./iy-go-to-char-20150927.226.el=0053:;; (global-set-key (kbd "C= -c F") 'iy-go-to-char-backward) 437:./iy-go-to-char-20150927.226.el=0054:;; (global-set-key (kbd "C= -c ;") 'iy-go-to-or-up-to-continue) 438:./iy-go-to-char-20150927.226.el=0055:;; (global-set-key (kbd "C= -c ,") 'iy-go-to-or-up-to-continue-backward) 439:./iy-go-to-char-20150927.226.el=0059:;; (global-set-key (kbd "C= -c f") 'iy-go-up-to-char) 440:./iy-go-to-char-20150927.226.el=0060:;; (global-set-key (kbd "C= -c F") 'iy-go-up-to-char-backward) 443:./cbm-20171116.1240.el=0039:;; (global-set-key (kbd "C-c o") #'cbm-= find-org-agenda-file) 445:./quick-preview-20191017.1920.el=0036:;; (global-set-key (kbd "C-c = q") 'quick-preview-at-point) 446:./sudo-edit-20200625.142.el=0040:;; (global-set-key (kbd "C-c C= -r") 'sudo-edit) 451:./helm-backup-20180911.614.el=0036:;; (global-set-key (kbd "C-c b")= 'helm-backup) 455:./sharper-20201014.335.el=0026:;; (global-set-key (kbd "C-c n= ") 'sharper-main-transient) ;; For "n" for "dot NET" 459:./todotxt-20200530.2337.el=0050:;; - Bind 'todotxt' to some accele= rator like C-c t: (global-set-key (kbd "C-c t") 'todotxt) 465:./helm-sheet-20130630.1239.el=0031:;; (global-set-key (kbd "C-c s")= 'helm-sheet)