From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Akib Azmain Turja Newsgroups: gmane.emacs.devel Subject: Re: Howto: Bind Windows key as a prefix? Date: Wed, 06 Jul 2022 00:40:59 +0600 Message-ID: <87ilob9zd0.fsf@disroot.org> References: <25284.32832.471566.596874@google.com> <87mtdn9zi6.fsf@disroot.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38533"; mail-complaints-to="usenet@ciao.gmane.io" To: "T.V Raman" , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jul 05 20:44:51 2022 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 1o8nXX-0009kX-FT for ged-emacs-devel@m.gmane-mx.org; Tue, 05 Jul 2022 20:44:51 +0200 Original-Received: from localhost ([::1]:36956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8nXV-0004Vn-HP for ged-emacs-devel@m.gmane-mx.org; Tue, 05 Jul 2022 14:44:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8nUQ-0001qZ-Fz for emacs-devel@gnu.org; Tue, 05 Jul 2022 14:41:38 -0400 Original-Received: from knopi.disroot.org ([178.21.23.139]:52660) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8nUO-0004ZV-1w for emacs-devel@gnu.org; Tue, 05 Jul 2022 14:41:38 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id CF23E40F32; Tue, 5 Jul 2022 20:41:34 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Original-Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 89E0Exlh2Bcw; Tue, 5 Jul 2022 20:41:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1657046492; bh=EbsO8UktLPcOc84KsTHE2tScTE/80e4u7O9U3yHwYjU=; h=From:To:Subject:In-Reply-To:References:Date; b=BPr4/j5cEy+LlOwQnpBlhq+7JS+U383MMVI7rA7tHInhPZUaEiOQ3L2LacXW5xKsJ RHm9ZoWzjqZ6MaDPlQ/Zvbt8fn/ErKVUwp/ljqxSouS9ms0u633mqyZzw3H46KKNzE ajEcF4bKqsJVI2TJYHJRFnRtj8R42DQH8N4F8DZFTtaGAjOTcCoYZbMLhkIup0fva6 XV7hxR5/wXp5bGbfZv+ueiaRRLAkqivnypV82ck1yVVB6FDJky1pqK5/Qu7oGOxE50 fLolcV8PnzO7Pt0fDvD+7ZUakX8Oe5Np0ZDanlcTBaaIDm3xxF+BspQg/O3vxTa4iy CTQbpvsOyacXg== In-Reply-To: <87mtdn9zi6.fsf@disroot.org> Received-SPF: pass client-ip=178.21.23.139; envelope-from=akib@disroot.org; helo=knopi.disroot.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:291881 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Akib Azmain Turja writes: > "T.V Raman" writes: > >> On my laptop, >> pressing windows-key+ says=20 >> s- is undefined for any . >> >> M-x global-set-key RET >> windows+ RET >> command RET >> binds windows- >> and asking where is shows it as being on s-. >> >> However calling global-set-key with "s-" bombs with key-sequence >> "s-" starts with non-prefix s" >> >> Debugger entered--Lisp error: (error "Key sequence s - a starts with non= -prefix key s") >> (define-key (keymap #^[nil nil keymap=20 >> #^^[3 0 set-mark-command move-beginning-of-line backward-char mode-speci= fic-command-prefix delete-char emacspeak-prefix-command forward-char keyboa= rd-quit help-command indent-for-tab-command electric-newline-and-maybe-inde= nt kill-line recenter-top-bottom newline next-line (keymap (32 . emacspeak-= outline-speak-this-heading) (102 . emacspeak-outline-speak-forward-heading)= (98 . emacspeak-outline-speak-backward-heading) (110 . emacspeak-outline-s= peak-next-heading) (112 . emacspeak-outline-speak-previous-heading) (111 . = open-line) (13 . outline-insert-heading) (67108926 . outline-demote) (67108= 924 . outline-promote) (22 . outline-move-subtree-down) (30 . outline-move-= subtree-up) (15 . outline-hide-other) (17 . outline-hide-sublevels) (11 . o= utline-show-branches) (12 . outline-hide-leaves) (5 . outline-show-entry) (= 3 . outline-hide-entry) (1 . outline-show-all) (20 . outline-hide-body) (2 = . outline-backward-same-level) (6 . outline-forward-same-level) (21 . outli= ne-up-heading) (4 . outline-hide-subtree) (19 . outline-show-subtree) (9 . = outline-show-children) (16 . outline-previous-visible-heading) (14 . outlin= e-next-visible-heading) (64 . outline-mark-subtree)) previous-line quoted-i= nsert isearch-backward isearch-forward transpose-chars universal-argument s= croll-up-command kill-region Control-X-prefix emacspeak-muggles-yank-pop/ya= nk emacspeak-ctl-z-keymap ESC-prefix toggle-input-method abort-recursive-ed= it nil ...] #^^[1 0 #^^[2 0=20 >> #^^[3 0 set-mark-command move-beginning-of-line backward-char mode-speci= fic-command-prefix delete-char emacspeak-prefix-command forward-char keyboa= rd-quit help-command indent-for-tab-command electric-newline-and-maybe-inde= nt kill-line recenter-top-bottom newline next-line (keymap ... ... ... ... = ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...= ... ... ... ... ...) previous-line quoted-insert isearch-backward isearch-= forward transpose-chars universal-argument scroll-up-command kill-region Co= ntrol-X-prefix emacspeak-muggles-yank-pop/yank emacspeak-ctl-z-keymap ESC-p= refix toggle-input-method abort-recursive-edit nil ...] self-insert-command= self-insert-command self-insert-command self-insert-command self-insert-co= mmand self-insert-command self-insert-command self-insert-command self-inse= rt-command self-insert-command self-insert-command self-insert-command self= -insert-command self-insert-command self-insert-command self-insert-command= self-insert-command self-insert-command self-insert-command self-insert-co= mmand self-insert-command self-insert-command self-insert-command self-inse= rt-command self-insert-command self-insert-command self-insert-command self= -insert-command self-insert-command self-insert-command ...] self-insert-co= mmand self-insert-command self-insert-command self-insert-command self-inse= rt-command self-insert-command self-insert-command self-insert-command self= -insert-command self-insert-command self-insert-command self-insert-command= self-insert-command self-insert-command self-insert-command] self-insert-c= ommand self-insert-command self-insert-command self-insert-command self-ins= ert-command self-insert-command self-insert-command self-insert-command sel= f-insert-command self-insert-command self-insert-command self-insert-comman= d self-insert-command self-insert-command self-insert-command self-insert-c= ommand self-insert-command self-insert-command self-insert-command self-ins= ert-command self-insert-command self-insert-command self-insert-command sel= f-insert-command self-insert-command self-insert-command self-insert-comman= d ...] (8388716 . ansi-term) (8388640 . emacspeak-muggles-maths-navigator/b= ody) (8388718 . emacspeak-muggles-navigate/body) (print . emacspeak-muggles= -brightness/body) (f14 . kmacro-end-or-call-macro) (f13 . kmacro-start-macr= o-or-insert-counter) (S-mouse-3 . kmacro-end-call-mouse) (C-S-iso-lefttab .= tab-previous) (C-S-tab . tab-previous) (C-tab . tab-next) (f5 . find-file)= (remap keymap (dabbrev-expand . hippie-expand)) (silence . emacspeak-silen= ce) (67108903 . emacspeak-multi-keymap) (67108923 . emacspeak-hyper-keymap)= (67108910 . emacspeak-super-keymap) (67108908 . emacspeak-alt-keymap) (S-d= own . emacspeak-skip-blank-lines-forward) (S-up . emacspeak-skip-blank-line= s-backward) (S-right . next-buffer) (S-left . previous-buffer) (XF86AudioRa= iseVolume . amixer-volume-up) (XF86AudioLowerVolume . amixer-volume-down) (= C-f2 . amixer-volume-down) (C-f1 . amixer-volume-up) (XF86AudioPlay . emacs= peak-silence) (paste . clipboard-yank) (copy . clipboard-kill-ring-save) (c= ut . clipboard-kill-region) (f18 . clipboard-yank) ...) "s-a" ansi-term) >> (#f(compiled-function (key command) "Give KEY a global binding as COMM= AND.\nThis is a legacy function; see `keymap-global-set' for the\nrecommend= ed function to use instead.\n\nCOMMAND is the command definition to use; us= ually it is\na symbol naming an interactively-callable function.\nKEY is a = key sequence; noninteractively, it is a string or vector\nof characters or = event types, and non-ASCII characters with codes\nabove 127 (such as ISO La= tin-1) can be included if you use a vector.\n\nNote that if KEY has a local= binding in the current buffer,\nthat local binding will continue to shadow= any global binding\nthat you make with this function." (interactive #f(com= piled-function () #)) #) "s-a" ansi-term) >> (ad-Advice-global-set-key #f(compiled-function (key command) "Give KEY= a global binding as COMMAND.\nThis is a legacy function; see `keymap-globa= l-set' for the\nrecommended function to use instead.\n\nCOMMAND is the comm= and definition to use; usually it is\na symbol naming an interactively-call= able function.\nKEY is a key sequence; noninteractively, it is a string or = vector\nof characters or event types, and non-ASCII characters with codes\n= above 127 (such as ISO Latin-1) can be included if you use a vector.\n\nNot= e that if KEY has a local binding in the current buffer,\nthat local bindin= g will continue to shadow any global binding\nthat you make with this funct= ion." (interactive #f(compiled-function () #))= #) "s-a" ansi-term) >> (apply ad-Advice-global-set-key #f(compiled-function (key command) "Gi= ve KEY a global binding as COMMAND.\nThis is a legacy function; see `keymap= -global-set' for the\nrecommended function to use instead.\n\nCOMMAND is th= e command definition to use; usually it is\na symbol naming an interactivel= y-callable function.\nKEY is a key sequence; noninteractively, it is a stri= ng or vector\nof characters or event types, and non-ASCII characters with c= odes\nabove 127 (such as ISO Latin-1) can be included if you use a vector.\= n\nNote that if KEY has a local binding in the current buffer,\nthat local = binding will continue to shadow any global binding\nthat you make with this= function." (interactive #f(compiled-function () #)) #) ("s-a" ansi-term)) >> (global-set-key "s-a" ansi-term) >> (eval (global-set-key "s-a" 'ansi-term) t) >> (#f(compiled-function (exp &optional insert-value no-truncate char-pri= nt-limit) "Evaluate EXP and print value in the echo area.\nWhen called inte= ractively, read an Emacs Lisp expression and\nevaluate it. Value is also c= onsed on to front of the variable\n`values'. Optional argument INSERT-VALU= E non-nil (interactively,\nwith a non `-' prefix argument) means insert the= result into the\ncurrent buffer instead of printing it in the echo area.\n= \nNormally, this function truncates long output according to the\nvalue of = the variables `eval-expression-print-length' and\n`eval-expression-print-le= vel'. When NO-TRUNCATE is\nnon-nil (interactively, with a prefix argument = of zero), however,\nthere is no such truncation.\n\nIf the resulting value = is an integer, and CHAR-PRINT-LIMIT is\nnon-nil (interactively, unless give= n a non-zero prefix argument)\nit will be printed in several additional for= mats (octal,\nhexadecimal, and character). The character format is used on= ly\nif the value is below CHAR-PRINT-LIMIT (interactively, if the\nprefix a= rgument is -1 or the value doesn't exceed\n`eval-expression-print-maximum-c= haracter').\n\nRuns the hook `eval-expression-minibuffer-setup-hook' on ent= ering the\nminibuffer.\n\nIf `eval-expression-debug-on-error' is non-nil, w= hich is the default,\nthis command arranges for all errors to enter the deb= ugger." (interactive #f(compiled-function () #= )) #) (global-set-key "s-a" 'ansi-term) nil ni= l 127) >> (ad-Advice-eval-expression #f(compiled-function (exp &optional insert-= value no-truncate char-print-limit) "Evaluate EXP and print value in the ec= ho area.\nWhen called interactively, read an Emacs Lisp expression and\neva= luate it. Value is also consed on to front of the variable\n`values'. Opt= ional argument INSERT-VALUE non-nil (interactively,\nwith a non `-' prefix = argument) means insert the result into the\ncurrent buffer instead of print= ing it in the echo area.\n\nNormally, this function truncates long output a= ccording to the\nvalue of the variables `eval-expression-print-length' and\= n`eval-expression-print-level'. When NO-TRUNCATE is\nnon-nil (interactivel= y, with a prefix argument of zero), however,\nthere is no such truncation.\= n\nIf the resulting value is an integer, and CHAR-PRINT-LIMIT is\nnon-nil (= interactively, unless given a non-zero prefix argument)\nit will be printed= in several additional formats (octal,\nhexadecimal, and character). The c= haracter format is used only\nif the value is below CHAR-PRINT-LIMIT (inter= actively, if the\nprefix argument is -1 or the value doesn't exceed\n`eval-= expression-print-maximum-character').\n\nRuns the hook `eval-expression-min= ibuffer-setup-hook' on entering the\nminibuffer.\n\nIf `eval-expression-deb= ug-on-error' is non-nil, which is the default,\nthis command arranges for a= ll errors to enter the debugger." (interactive #f(compiled-function () #)) #) (global-set-ke= y "s-a" 'ansi-term) nil nil 127) >> (apply ad-Advice-eval-expression #f(compiled-function (exp &optional i= nsert-value no-truncate char-print-limit) "Evaluate EXP and print value in = the echo area.\nWhen called interactively, read an Emacs Lisp expression an= d\nevaluate it. Value is also consed on to front of the variable\n`values'= . Optional argument INSERT-VALUE non-nil (interactively,\nwith a non `-' p= refix argument) means insert the result into the\ncurrent buffer instead of= printing it in the echo area.\n\nNormally, this function truncates long ou= tput according to the\nvalue of the variables `eval-expression-print-length= ' and\n`eval-expression-print-level'. When NO-TRUNCATE is\nnon-nil (intera= ctively, with a prefix argument of zero), however,\nthere is no such trunca= tion.\n\nIf the resulting value is an integer, and CHAR-PRINT-LIMIT is\nnon= -nil (interactively, unless given a non-zero prefix argument)\nit will be p= rinted in several additional formats (octal,\nhexadecimal, and character). = The character format is used only\nif the value is below CHAR-PRINT-LIMIT = (interactively, if the\nprefix argument is -1 or the value doesn't exceed\n= `eval-expression-print-maximum-character').\n\nRuns the hook `eval-expressi= on-minibuffer-setup-hook' on entering the\nminibuffer.\n\nIf `eval-expressi= on-debug-on-error' is non-nil, which is the default,\nthis command arranges= for all errors to enter the debugger." (interactive #f(compiled-function (= ) #)) #) ((global= -set-key "s-a" 'ansi-term) nil nil 127)) >> (eval-expression (global-set-key "s-a" 'ansi-term) nil nil 127) >> (# eval-expression (global-set-key "s-a" '= ansi-term) nil nil 127) >> (apply # eval-expression ((global-set-key = "s-a" 'ansi-term) nil nil 127)) >> (ad-Advice-funcall-interactively # eval-ex= pression (global-set-key "s-a" 'ansi-term) nil nil 127) >> (apply ad-Advice-funcall-interactively # (= eval-expression (global-set-key "s-a" 'ansi-term) nil nil 127)) >> (funcall-interactively eval-expression (global-set-key "s-a" 'ansi-ter= m) nil nil 127) >> (# eval-expression nil nil) >> (apply # eval-expression (nil nil)) >> (call-interactively@ido-cr+-record-current-command # eval-expression nil nil) >> (apply call-interactively@ido-cr+-record-current-command # (eval-expression nil nil)) >> (call-interactively eval-expression nil nil) >> (command-execute eval-expression) >> >> --=20 >> >> Thanks, >> >> --Raman(I Search, I Find, I Misplace, I Research) >> =E2=99=89 Id: kg:/m/0285kf1 =F0=9F=A6=AENZIrwH2+)!y=DC=84do9 > > Evaluating "(global-set-key "s-a" 'ansi-term)" won't work. Try > evaluating "(global-set-key (kbd "s-a") 'ansi-term)". > > --=20 > Akib Azmain Turja > > This message is signed by me with my GnuPG key. It's fingerprint is: > > 7001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5 And please, add the expression you tried to evaluate in the message. I had a hard time to find that expression string in the backtrace. =2D-=20 Akib Azmain Turja This message is signed by me with my GnuPG key. It's fingerprint is: 7001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEyVTKmrtL6kNBe3FRVTX89U2IYWsFAmLEhbsACgkQVTX89U2I YWusGQ/8C7qyNKO0yUjFCjjaNfQDgStQFC1TVaekqrZzIXo+9gK9ah5s4offRXpx V98OzvvkEmRzxkEkQe5BCP9DQGdboBg3PYk2goec+KwDYBOxFg5WpxYIFQ7IDo/b J/IW5SwkmyUs6i7y9iGL/JELN+/1Xu8A/G6bVGGAxXrC+DKyynhU7mstMRe/xhDY L11aF8yS8CuLAQi6VUUbSrgumS2dN+Q7bfwbfMQZh0hL5Xo0BVzS8sa1pDkxPSnF epJPZzhjhqHDVvYxpd0VloRc7Y8JT6Pdq1IgdFAhCfkC9onHd4cHb3Vqh2ggpahL 3qkFEGzV/Asoq4+YNKhrb1x83+wB18lDxZJw8cMlkj3J1p56PMNCEQG2bB1BTi/i hO+tUa8o9Uwyc6K7X6geIhFWXiDBJqQgcyUC+SD4aQ29zXs/flPiYUoUOxQuXtGP /jZcXVxPYqNI8bCTDXnazlMzol8FAmJRIFE5O7NHfIelepwoh9aaSFNMZTJCoxtl /YlpTFZGyzCHYOOVtHtupF3t4Djc6Lm4ZovZTT+FEoosq9F7DKP9mLlDUSf8uV1E DMNji219c0frf9JyBvAb0bN7ii55axMqn0jXarpbuzO8BN0R+fLcW0iHCft64Pt6 edjkakhXVXkNl7bKrkzpIaeguRBlsJJQWQW+xJBXwFVq6ECfW6o= =QpBS -----END PGP SIGNATURE----- --=-=-=--