bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#43709: minibuffer keybinding cheatsheet and launcher [CODE SUBMISSIO


From: Boruch Baum
Subject: bug#43709: minibuffer keybinding cheatsheet and launcher [CODE SUBMISSION]
Date: Thu, 1 Oct 2020 14:25:04 -0400
User-agent: NeoMutt/20180716

On 2020-10-01 09:51, Stefan Monnier wrote:
> > ;;   If you've ever used packages such as `ivy' or `magit', you've
> For those who haven't, it would be good to describe what your package does.

In progress...

> > (require 'cl-seq) ;; cl-member, cl-position
> Please require `cl-lib`grather than `cl-seq`

Done.

> >     (let ((not-found t))
> >       (mapc (lambda (x)
> >               (when (string-match x (format "%s" cmd))
> >                 (setq not-found nil)))
> >             key-assist-exclude-regexps)
> >       not-found)))
>
> You should move the `(format "%s" cmd)` out of the loop (and use
> `dolist` instead of `mapc`).

Done, but I went with symbol-name instead of format.

> >      ((keymapp spec)
> >        (let (cmd)
> >          (dolist (elem spec)
>
> Please use `map-keymap` rather than `dolist` so as to handle all the
> different keymap formats.

I had tried that originally, but map-keymap brings in data from parent
keymaps, which is undesirable in this case. There is a function
map-keymap-internal which might be a usable alternative, but it returns
a single unusable cruft element (the parent keymap) when it exists, so
the result doesn't seem much better than the current code, no?

> >      (funcall (car (nth choice commands))))))
>
> This should probably be `command-execute` rather than `funcall` to fix
> the wrong-number-of-arguments error I bumped into.

Great catch. It solves the bug you found. Done.

As for posting updates to the code submission, I can do any combination of
the following, or something else, but want guidance before proceeding:

1) post to this list;

2) post to the pre-existing thread on emacs-bugs;

3) create a github repo, and post there (and gain potential wider
audience, more features, but fragment communication over two platforms);

4) create a repo on some imagined savannah / gnu server;

Finally: Tomorrow approaching sunset I go offline for about nine
days[1], so what I can squeeze in before then, great; afterwards I
welcome any continued feedback but please be patient and don't expect
any response for ~10-12 days.

But really finally this time: I've twice already made passing reference
to another package about ready to submit, that adds a lot of new
functionality to dired. I can post it now in its current state, and
inconsiderately disappear offline for 9+ days, or I could just as
inconsiderately not post it and deny you for 9+ days. I'm undecided, so
unless I hear otherwise, I'll wait.

--
[1] https://en.wikipedia.org/wiki/Sukkot

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0





reply via email to

[Prev in Thread] Current Thread [Next in Thread]