From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: =?windows-1252?Q?=AC?= notation for not? Ref: Add a couple cells to lisp-prettify-symbols-alist Date: Mon, 18 Jul 2016 11:07:07 -0400 Message-ID: References: <578801A0.4040306@gmail.com> <87oa5zx35d.fsf@udel.edu> <87d1mfuh05.fsf@lifelogs.com> <878tx3ueoo.fsf@lifelogs.com> <87poqeud70.fsf@lifelogs.com> <8737n7t4q7.fsf@lifelogs.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1468854329 27594 80.91.229.3 (18 Jul 2016 15:05:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Jul 2016 15:05:29 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 18 17:05:20 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bPA6h-0000qF-9T for ged-emacs-devel@m.gmane.org; Mon, 18 Jul 2016 17:05:19 +0200 Original-Received: from localhost ([::1]:48189 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPA6g-0003mE-GT for ged-emacs-devel@m.gmane.org; Mon, 18 Jul 2016 11:05:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33743) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPA6U-0003Xk-S9 for emacs-devel@gnu.org; Mon, 18 Jul 2016 11:05:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPA6P-0005zR-NW for emacs-devel@gnu.org; Mon, 18 Jul 2016 11:05:05 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:38226) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPA6P-0005zN-G6 for emacs-devel@gnu.org; Mon, 18 Jul 2016 11:05:01 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1bPA6O-0000ag-5e for emacs-devel@gnu.org; Mon, 18 Jul 2016 17:05:00 +0200 Original-Received: from 69-165-156-121.dsl.teksavvy.com ([69.165.156.121]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 18 Jul 2016 17:05:00 +0200 Original-Received: from monnier by 69-165-156-121.dsl.teksavvy.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 18 Jul 2016 17:05:00 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 43 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 69-165-156-121.dsl.teksavvy.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:qVTWHB/luPc534rM//t4R4vZImU= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:205807 Archived-At: SM> Currently it's SM> SM> (push '("not" . ?√) prettify-symbols-alist) SM> SM> and hopefully we can keep something similar. This said, the intention SM> of having two sets is that adding a new element should be unusual: the SM> extended set should cover most things that someone might like. > What about the distinction between global and local (per mode, per > filename, etc.) prettifications? Not sure what you mean. > The UI here is just a programming API, but it becomes hard for > a casual user to override without writing custom Lisp code, I think? As mentioned, I assume it'd be considered an unusual need, so I think it's perfectly OK if it can't be done via Custom. >>> * how would I remove '("sqrt" . ?√) from the alist? SM> (push ?√ prettify-symbols-inhibited-chars) or customize SM> prettify-symbols-inhibited-chars. > This is a bit easier than adding, if we assume the inhibition will > always be global. Right. I assume here that it's sufficient to allow global inhibition from Custom. If you want it more fine grained, you'll need to learn to use add-hook and setq-local. > But defcustoms (and the underlying widgets) don't allow dynamically > sourced choices, do they? So the user has to copy and paste the > special symbol? (I looked in the widget library for dynamic choice > lists just this morning for the gnus-cloud stuff, where it would be > nice to offer a dynamic list of all the possible IMAP server as cloud > hosts. I couldn't find a way. Maybe I missed something.) There's currently no widget that does that, indeed. The closest is the support for completion. AFAIK there's no deep technical reason why this is the case and I'd welcome someone adding a `dynamic-choice` type. There are already various places where we could use such a thing. Stefan