From: Daniel Mendler <mail@daniel-mendler.de>
To: "Jens C. Jensen" <jens@subst.net>, Juri Linkov <juri@linkov.net>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Re: [ELPA] New package: marginalia
Date: Wed, 2 Jun 2021 17:07:54 +0200 [thread overview]
Message-ID: <f403ceda-93ef-8438-7784-0000ff83328a@daniel-mendler.de> (raw)
In-Reply-To: <87pmx42ukl.fsf@subst.net>
On 6/2/21 4:46 PM, Jens C. Jensen wrote:
> I ended up with something like:
> #+begin_src emacs-lisp
> (cond
> ((commandp sym) 'command)
> ((macrop sym) 'macro)
> ((functionp sym) 'function)
> ((booleanp sym) 'boolean)
> ((keywordp sym) 'keyword)
> ((keymapp (symbol-value sym)) 'keymap)
> ((facep sym) 'face)
> ((boundp sym) 'variable)
> ((symbolp sym) 'symbol))
> #+end_src
>
> It has worked fine for my use-case thus far, but is neither complete nor robust enough for documentation, as Daniel pointed out emacs-lisp is a Lisp-2 - the above code completely misses this point.
Yes exactly, such a classifier should return a list of types. The
Marginalia symbol annotator gets this right and annotates each symbol
with multiple characters. I like this annotation functionality when
doing Elisp hacking. Also `marginalia-annotate-variable` is quite useful.
Jens, where are you using this classifier in your configuration?
Daniel
next prev parent reply other threads:[~2021-06-02 15:07 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-28 6:35 [ELPA] New package: marginalia Daniel Mendler
2021-05-28 13:47 ` Stefan Monnier
2021-05-28 13:59 ` Daniel Mendler
2021-05-28 14:08 ` Eli Zaretskii
2021-05-28 18:40 ` Juri Linkov
2021-05-29 8:06 ` Daniel Mendler
2021-06-01 20:54 ` Juri Linkov
2021-06-01 21:07 ` Daniel Mendler
2021-06-02 22:13 ` Juri Linkov
2021-06-11 17:13 ` Juri Linkov
2021-06-17 20:22 ` Juri Linkov
2021-06-02 14:46 ` Jens C. Jensen
2021-06-02 15:07 ` Daniel Mendler [this message]
2021-06-03 6:17 ` Jens C. Jensen
2021-06-02 15:10 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f403ceda-93ef-8438-7784-0000ff83328a@daniel-mendler.de \
--to=mail@daniel-mendler.de \
--cc=emacs-devel@gnu.org \
--cc=jens@subst.net \
--cc=juri@linkov.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.