From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "T.V Raman" Newsgroups: gmane.emacs.devel Subject: Re: describe-repeat-maps: Possible print bug: Date: Wed, 16 Nov 2022 15:15:09 -0800 Message-ID: References: <86bkqz5qp3.fsf@mail.linkov.net> <25396.65413.972637.923513@google.com> <86o7uy4qz9.fsf@mail.linkov.net> <864jv0f66a.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=gb18030 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1276"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Robert Pluim , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 17 00:16:05 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 1ovRdU-00004q-I5 for ged-emacs-devel@m.gmane-mx.org; Thu, 17 Nov 2022 00:16:04 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ovRcp-0005Wj-TS; Wed, 16 Nov 2022 18:15:23 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ovRcj-0005WJ-Tt for emacs-devel@gnu.org; Wed, 16 Nov 2022 18:15:18 -0500 Original-Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ovRch-0005h0-Ky for emacs-devel@gnu.org; Wed, 16 Nov 2022 18:15:17 -0500 Original-Received: by mail-pj1-x102f.google.com with SMTP id o7so79746pjj.1 for ; Wed, 16 Nov 2022 15:15:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6IiXPdfIg8oqOoZWW3YF/bbEa4AaxTHlfy8Gx6CDOFs=; b=eUFpagDXVvKaVq3rRbGDgNKZAixYoD0cSwRV0qhk3rSGtCXh7jnj+u4KrUq4XlgBwd wra+NzKyiY2k1ux8U7SZXYYyxhi7E+QG+saimoNInsYtONQnU3NmZuCL9JONunvKGRzN qGYv6inaHPGXUhxvew9YExsAK0f1rxfk9RE1ObMnApBpcP3BMisk4SbWsrHmpQxs4eaj spqMy5pnE9IM9eVCSWPISZmhj8xG/ssDf0hwYbF7QIsx/HaPGo5/Cs+2OTjHgs1j00OG 6x5aYi70MaPki3KZDKhw57QvKYyAXLgwM5M2dITJHucLaIk50a0qyV4n3D7R4vLNo+4K XXRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=6IiXPdfIg8oqOoZWW3YF/bbEa4AaxTHlfy8Gx6CDOFs=; b=kYfXRSueINycXcSsKXVGFQzx/aHdAKUUqoaOv51nJL5tlgSWZU/LgrSo/9PyioF4Y8 93xb7Yt2Q410CnDHBppRagbfqtfkMxYz13id833PVhWS3F7FLRSs+VZid1UZhqwghQKZ 7XCIEheCdcngtEYHygbg3jghWvJmaa17L4bPGjLKJpd8tt1DEedPjvTy3ZcTYw06QkQh LRPbMZI4rf+Nx8PAj7CFVDfFsYGiK1v1T8BWmL9JXb9knpzZEDsd7/TCmMj8+k6lrwOJ Y1/Xtpil4mvUnxlGR72EuGntrqZC9UaFkKvmou2K++Efx++v/k3gPznZfckeUB7pR+I9 mWrA== X-Gm-Message-State: ANoB5pmWp/70qaaR58y8hHd6F0F9YpfveTPp0myDYyvLF39IxawG0Be+ IevvZTWtNeEUECyCPhUfmGEFuBqKOtjFIax7 X-Google-Smtp-Source: AA0mqf7Gsj+Xqw++FsbmqioM0jRLrKo8f8oberSXq6u/vFMDesDnrHVQE4tfM3s7//TVWgx/u3oyrA== X-Received: by 2002:a17:902:6b08:b0:187:4467:7aba with SMTP id o8-20020a1709026b0800b0018744677abamr104127plk.61.1668640512558; Wed, 16 Nov 2022 15:15:12 -0800 (PST) Original-Received: from raman9 (c-24-4-174-65.hsd1.ca.comcast.net. [24.4.174.65]) by smtp.gmail.com with ESMTPSA id j34-20020a635522000000b004761e544ec6sm8173367pgb.89.2022.11.16.15.15.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Nov 2022 15:15:11 -0800 (PST) In-Reply-To: <864jv0f66a.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 15 Nov 2022 20:41:33 +0200") Received-SPF: pass client-ip=2607:f8b0:4864:20::102f; envelope-from=raman@google.com; helo=mail-pj1-x102f.google.com X-Spam_score_int: -175 X-Spam_score: -17.6 X-Spam_bar: ----------------- X-Spam_report: (-17.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:299992 Archived-At: Juri Linkov writes: I'm still seeing some bindings displayed incorrectly: Source Code: https://github.com/tvraman/emacspeak/blob/master/lisp/emacspeak-m-player.el= #L320 Example of problem: In the below extract from the help buffer for describe-repeat-maps, note that some keys are not printed, e.g.M-; I'll annotate the problem lines with "#" where is what should have been displayed. =A1=AEemacspeak-m-player-mode-map=A1=AF keymap is repeatable by these comma= nds: =A1=AEemacspeak-eww-play-media-at-point=A1=AF (bound to ) # =A1=AEemacspeak-m-player-add-autopan=A1=AF (bound to a) =A1=AEemacspeak-m-player-add-autosat=A1=AF (bound to z) =A1=AEemacspeak-m-player-add-equalizer=A1=AF (bound to E) =A1=AEemacspeak-m-player-add-filter=A1=AF (bound to f) =A1=AEemacspeak-m-player-amark-add=A1=AF (bound to A) =A1=AEemacspeak-m-player-amark-jump=A1=AF (bound to j) =A1=AEemacspeak-m-player-amark-save=A1=AF (bound to S) =A1=AEemacspeak-m-player-apply-reverb-preset=A1=AF (bound to P) =A1=AEemacspeak-m-player-backward-10min=A1=AF (bound to ) =A1=AEemacspeak-m-player-backward-10s=A1=AF (bound to , ,) =A1=AEemacspeak-m-player-backward-1min=A1=AF (bound to , <) =A1=AEemacspeak-m-player-beginning-of-track=A1=AF (bound to ) =A1=AEemacspeak-m-player-clear-filters=A1=AF (bound to C) =A1=AEemacspeak-m-player-customize-options=A1=AF (bound to o) =A1=AEemacspeak-m-player-delete-filter=A1=AF (bound to d) =A1=AEemacspeak-m-player-display-metadata=A1=AF (bound to M) =A1=AEemacspeak-m-player-display-percent=A1=AF (bound to %) =A1=AEemacspeak-m-player-display-position=A1=AF (bound to ?) =A1=AEemacspeak-m-player-double-speed=A1=AF (bound to }) =A1=AEemacspeak-m-player-edit-reverb=A1=AF (bound to R) =A1=AEemacspeak-m-player-end-of-track=A1=AF (bound to ) =A1=AEemacspeak-m-player-equalizer-preset=A1=AF (bound to e) =A1=AEemacspeak-m-player-faster=A1=AF (bound to ]) =A1=AEemacspeak-m-player-forward-10min=A1=AF (bound to ) =A1=AEemacspeak-m-player-forward-10s=A1=AF (bound to , .) =A1=AEemacspeak-m-player-forward-1min=A1=AF (bound to >, ) =A1=AEemacspeak-m-player-from-history=A1=AF (bound to h) =A1=AEemacspeak-m-player-get-length=A1=AF (bound to L) =A1=AEemacspeak-m-player-half-speed=A1=AF (bound to {) =A1=AEemacspeak-m-player-left-channel=A1=AF (bound to () =A1=AEemacspeak-m-player-load=A1=AF (bound to RET) =A1=AEemacspeak-m-player-loop=A1=AF (bound to )# =A1=AEemacspeak-m-player-mode-line=A1=AF (bound to m) =A1=AEemacspeak-m-player-next-track=A1=AF (bound to n) =A1=AEemacspeak-m-player-pan=A1=AF (bound to x) =A1=AEemacspeak-m-player-pause=A1=AF (bound to SPC) =A1=AEemacspeak-m-player-persist-process=A1=AF (bound to \) =A1=AEemacspeak-m-player-play-tracks-jump=A1=AF (bound to t) =A1=AEemacspeak-m-player-pop-to-player=A1=AF (bound to ;) =A1=AEemacspeak-m-player-previous-track=A1=AF (bound to p) =A1=AEemacspeak-m-player-reset-options=A1=AF (bound to O) =A1=AEemacspeak-m-player-reset-speed=A1=AF (bound to DEL) =A1=AEemacspeak-m-player-restore-process=A1=AF (bound to /) =A1=AEemacspeak-m-player-right-channel=A1=AF (bound to )) =A1=AEemacspeak-m-player-run-jump=A1=AF (bound to J) =A1=AEemacspeak-m-player-scale-speed=A1=AF (bound to s) =A1=AEemacspeak-m-player-seek-absolute=A1=AF (bound to g) =A1=AEemacspeak-m-player-seek-percentage=A1=AF (bound to G) =A1=AEemacspeak-m-player-seek-relative=A1=AF (bound to r) =A1=AEemacspeak-m-player-shuffle=A1=AF (bound to ) #<:> =A1=AEemacspeak-m-player-slave-command=A1=AF (bound to c) =A1=AEemacspeak-m-player-slower=A1=AF (bound to [) =A1=AEemacspeak-m-player-store-link=A1=AF (bound to l) =A1=AEemacspeak-m-player-stream-info=A1=AF (bound to i) =A1=AEemacspeak-m-player-url=A1=AF (bound to u) =A1=AEemacspeak-m-player-using-openal=A1=AF (bound to ) #<:> =A1=AEemacspeak-m-player-volume-change=A1=AF (bound to v) =A1=AEemacspeak-m-player-volume-down=A1=AF (bound to -) =A1=AEemacspeak-m-player-volume-set=A1=AF (bound to 9, 8, 7, 6, 5, 4, 3, 2= , 1) =A1=AEemacspeak-m-player-volume-up=A1=AF (bound to =3D, +) =A1=AEemacspeak-m-player-write-clip=A1=AF (bound to w) =A1=AEemacspeak-m-player-youtube-live=A1=AF (bound to ) # =A1=AEemacspeak-media-38-dc-books=A1=AF (bound to ) =A1=AEemacspeak-media-brain-sync=A1=AF (bound to ) # =A1=AEemacspeak-media-classical=A1=AF (bound to ) # =A1=AEemacspeak-media-devotional=A1=AF (bound to ) =A1=AEemacspeak-media-indian=A1=AF (bound to ) =A1=AEemacspeak-media-mp3=A1=AF (bound to ) =A1=AEemacspeak-media-pop=A1=AF (bound to ) =A1=AEemacspeak-multimedia=A1=AF (bound to ) >> Thanks, this reference helped to understand that >> emacspeak-m-player-bind-accelerator binds only global keys, >> not keys in the repeat map. Here is a short test case >> that confirms this: >> >> (repeat-mode 1) >> (keymap-set global-map "C-; 1" (defun test-repeat-next-line () (intera= ctive) (next-line))) >> (defvar-keymap test-repeat-map) >> (put 'test-repeat-next-line 'repeat-map 'test-repeat-map) >> >> And indeed 'describe-repeat-maps' outputs empty "(bound to )". >> This is because the keys in the global map used to enter the >> repeatable sequence currently are not handled by 'describe-repeat-maps'. >> This should be fixed before the next release. > > Here is a patch that uses outlines, and outputs the commands > that enter and exit the repeat-map. For example, > > * =A1=AEbuffer-navigation-repeat-map=A1=AF > > Entered with: =A1=AEtest-enter-next-line=A1=AF > Exited with: =A1=AEtest-exit-next-line=A1=AF > > Key Binding > previous-buffer > next-buffer > > These two lines from the patch show the difference between the > commands that enter and exit the repeat-map: > > (setq commands-enter (seq-difference repeat-commands map-commands)) > (setq commands-exit (seq-difference map-commands repeat-commands)) > > where 'repeat-commands' are commands with the symbol property 'repeat-map= ', > and 'map-commands' are commands existing in the map. > > diff --git a/lisp/repeat.el b/lisp/repeat.el > index 0ae68d6024d..5f19479a1e8 100644 > --- a/lisp/repeat.el > +++ b/lisp/repeat.el > @@ -588,21 +588,32 @@ describe-repeat-maps > (when (and (symbolp (car a)) > (symbolp (car b))) > (string-lessp (car a) (car b= )))))) > - (insert (format-message > - "`%s' keymap is repeatable by these commands:\n" > - (car keymap))) > - (dolist (command (sort (cdr keymap) #'string-lessp)) > - (let* ((info (help-fns--analyze-function command)) > - (map (list (if (symbolp (car keymap)) > - (symbol-value (car keymap)) > - (car keymap)))) > - (desc (mapconcat (lambda (key) > - (propertize (key-description key) > - 'face 'help-key-bind= ing)) > - (or (where-is-internal command map) > - (where-is-internal (nth 3 info= ) map)) > - ", "))) > - (insert (format-message " `%s' (bound to %s)\n" command = desc)))) > + (insert (format-message "* `%s'\n" (car keymap))) > + > + (let* ((map (if (symbolp (car keymap)) > + (symbol-value (car keymap)) > + (car keymap))) > + (repeat-commands (cdr keymap)) > + map-commands commands-enter commands-exit) > + (map-keymap (lambda (_key cmd) (when (symbolp cmd) (push c= md map-commands))) map) > + (setq map-commands (seq-uniq map-commands)) > + (setq commands-enter (seq-difference repeat-commands map-c= ommands)) > + (setq commands-exit (seq-difference map-commands repeat-c= ommands)) > + > + (when (or commands-enter commands-exit) (insert "\n")) > + (when commands-enter > + (insert (concat "Entered with: " > + (mapconcat (lambda (cmd) (format-message= "`%s'" cmd)) > + commands-enter ", ") > + "\n"))) > + (when commands-exit > + (insert (concat "Exited with: " > + (mapconcat (lambda (cmd) (format-message= "`%s'" cmd)) > + commands-exit ", ") > + "\n")))) > + > + (when (symbolp (car keymap)) > + (insert (substitute-command-keys (format-message "\\{%s}" = (car keymap))))) > (insert "\n"))))))) >=20=20 > (provide 'repeat) > > >> Also it was suggested to allow specifying the keys that enter >> the repeatable sequence and exit it, by an additional keyword >> in defvar-keymap, or by adding a new macro defvar-repeat-keymap. >> This could be implemented as well. > > This is implemented now in a separate patch. > --=20 Thanks, --Raman(I Search, I Find, I Misplace, I Research) =817=A94 Id: kg:/m/0285kf1 =950=DC8