From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jens C. Jensen Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: marginalia Date: Wed, 02 Jun 2021 16:46:18 +0200 Message-ID: <87pmx42ukl.fsf@subst.net> References: <5146817f-4b3f-8a7e-edce-f34a9a10f805@daniel-mendler.de> <871r9qk9el.fsf@mail.linkov.net> <92c218f7-1168-a7f4-3861-04f64a37eec9@daniel-mendler.de> <874kehcnl6.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26100"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "emacs-devel@gnu.org" To: Juri Linkov , Daniel Mendler Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jun 02 16:48:35 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 1loSAd-0006T6-0z for ged-emacs-devel@m.gmane-mx.org; Wed, 02 Jun 2021 16:48:35 +0200 Original-Received: from localhost ([::1]:42962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1loSAc-0003fU-36 for ged-emacs-devel@m.gmane-mx.org; Wed, 02 Jun 2021 10:48:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loS9y-0002yr-DB for emacs-devel@gnu.org; Wed, 02 Jun 2021 10:47:54 -0400 Original-Received: from out2.migadu.com ([2001:41d0:2:aacc::]:10317) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loS9t-0005S1-He for emacs-devel@gnu.org; Wed, 02 Jun 2021 10:47:54 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=subst.net; s=key1; t=1622645261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5aluNTwUBKVFOPXWbtf1fW441FyzOX+xJRMiSSppbdo=; b=ERh3zqVid2f49yUGP8LnJkrKbUSxAuWInX6o0QOOC23WZieF4kb71ofGdE6EUGLTJsfqHW LLMR86dNCNpVa/5A7bBcvQrLN1rSeC5tUwuxcEQ74rZBIk1cV2FvKZcgehYiMFz/iIpb65 hxaB/4bhtihYLgm1RATCU+wr6+73sp2fA5nMYT3AAbkZJ5A0InBd+E8HkRnPMfxHYCW0Xx yhNaF+kf1QQZgHXSNkn+bBaq9CO+Pg4mFURs5lFDFRAGbE6NtJhrIv2w3q0TJQl4RI49xA 22wWP6ieZJcwIM7z4m1RO6+x3FgPl8os7/mjsQry7yC191CgcEy5/Aqd9FJqPA== In-Reply-To: <874kehcnl6.fsf@mail.linkov.net> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: jens@subst.net Received-SPF: pass client-ip=2001:41d0:2:aacc::; envelope-from=jens@subst.net; helo=out2.migadu.com 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 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:270295 Archived-At: > From: Juri Linkov > Date: Tue, 01 Jun 2021 23:54:45 +0300 > Maybe something like [...] > > Then you could use it, and prepend/append more characters > such as: o for obsolete, ! for advised, * for modified. I was recently fiddling with my configuration and was surprised not to find this function anywhere, so this would be a welcome addition in my opinion. I too stumbled on `help--symbol-completion-table-affixation', however it seems to specialize on function-symbols (function/macro/command), but not on variables (keymap/boolean/keyword/etc.). 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.