From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: Making `interactive' conditional Date: Mon, 11 Jan 2016 21:14:44 -0500 Message-ID: <56946194.3070207@gmail.com> References: <87mvszdp6b.fsf@gnus.org> <8737u9kv6f.fsf@russet.org.uk> <87fuy7hdc6.fsf_-_@wanadoo.es> <87bn8vh8q4.fsf@wanadoo.es> <4002fc97-5629-4367-8b8f-48b659fefdce@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="M2hKs8rIgHTe4EkvFXmToE5t9UA3abkGH" X-Trace: ger.gmane.org 1452564917 8767 80.91.229.3 (12 Jan 2016 02:15:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 Jan 2016 02:15:17 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 12 03:15:08 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 1aIoUF-0002bR-Ki for ged-emacs-devel@m.gmane.org; Tue, 12 Jan 2016 03:15:07 +0100 Original-Received: from localhost ([::1]:57652 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIoUE-0003s5-RL for ged-emacs-devel@m.gmane.org; Mon, 11 Jan 2016 21:15:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39536) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIoU0-0003ro-PY for emacs-devel@gnu.org; Mon, 11 Jan 2016 21:14:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aIoTv-0004ek-PV for emacs-devel@gnu.org; Mon, 11 Jan 2016 21:14:52 -0500 Original-Received: from mout.kundenserver.de ([212.227.17.10]:49383) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIoTv-0004eg-Fg for emacs-devel@gnu.org; Mon, 11 Jan 2016 21:14:47 -0500 Original-Received: from [18.189.87.242] ([18.189.87.242]) by mrelayeu.kundenserver.de (mreue104) with ESMTPSA (Nemesis) id 0MfZIB-1aYzmf0Zv1-00P5s1 for ; Tue, 12 Jan 2016 03:14:46 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 In-Reply-To: X-Provags-ID: V03:K0:fEL7mXHKWAQdDwxMVeQQUczKQt0CI+CXbfyF42Lp2Nc7xgrHEm2 Srzh7LwV9snsN4GWtIov+k/jZhUu+Kq4FVpYl4Z40zgJNUTHpstAyTEUzh4R/h6UmfOGVjJ cuMZo13C//4Svl1lTWWPx+ssLqnWhMWsMDc/iXjK8bjE1DRMmFXL0jDSEvpkR46rFuZFTUE SHCLjNae3kwwUIGfEa/5g== X-UI-Out-Filterresults: notjunk:1;V01:K0:yexLdYR7iUs=:NBroEaPccz82TRkYQI2W11 RSDT7WKZQkDPFFO7rLeMjTF/5ICfE+Gypdx0lIaTlsnqLKwWefZtwzoEjXynaw6c5K6T568hF 2FwTLDPitIeHp8QCkx11nWcrTXYT3DIMy9H/QFXCVP56fvQGVk3qRy9T0gNkGRVMPUVC+ViT/ 2moSrb4YR1o2ra5smKTzHLbzzmndJ0wSMl38mebrt+mNTYDfdqHMP82a5/rooqro5cISYDUxk 3ampA+cJRkcbiAYsaGhwxm1wIP1yYPZzfnDb2AZgr0y9q9nWrTwe8DN+wTDOxqjKhJlcqJzVD SXicmfQ4UbpqS11PzbMaD8p8Yghnfsz/Z9ZkIyzNihJ/G++YJL+gHeCv3gTa8L04Gf5EMQLRC 7MnNegkf7qbMmjYAEvhA3YBC8Qw/A1vQdLOo6cXnXmjHVL8bEpf76UWIU5Ww5s87Ew7rfL1v7 BFrdIdJxQeEGHZ4ghyvxW1zFPdzNJQJlRbCg7AbjB/BuYd2P+Wd+hw3OX69SnbkjZgmy8F1dP PL2lXvWwqhZklTMxEJwi21d/v2yYuOtr73CivdcTguJiiOyQqgzTDNWE26JdPcIIGRFz1O5aM g+tQvU9c1mf5qHpy6xulYpTyfhnGtPgNrBCplperNbIcS6UztE5bQC0fHHSqEOT47VmS8gKB/ 4ZRbZap7rGFYDm9hptsTL1EJm9t9nH//MwasXPzkR3z3iCcAcDFjyhtgBaSbwJJZzXSc= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.10 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:198058 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --M2hKs8rIgHTe4EkvFXmToE5t9UA3abkGH Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 01/10/2016 04:02 AM, Lars Magne Ingebrigtsen wrote: > John Wiegley writes: >=20 >> Right now, functions are interactive if declared with `interactive', a= nd not >> otherwise. The suggestion at hand is to allow `interactive' forms to b= ecome >> conditional -- possibly in multiple ways. I like this concept, and thi= nk the >> right place for it is indeed in core. >> >> The question is how to declare such conditionality. We can do this rat= her >> easily by accepting new keyword arguments to `interactive': >> >> (interactive "sDirectory: " [:mode foo-mode] [:when ]) >=20 > That does sound kinda exciting. To take a random example, `M-x > delete-matching-lines' could have a :when of `buffer-writable-p' and no= t > auto-complete when in a read-only buffer. Etc. It seems interactive already has support for a limited version of this: > If =91*=92 appears at the beginning of the string, then an error is s= ignaled if the buffer is read-only.=20 So the annotation is already there, at least for some function that use a= string-based interactive spec. But maybe everyone already had this in mi= nd? (450 of the approx 4500 string-based interactive specs in core Emacs = use that) Cl=E9ment. --M2hKs8rIgHTe4EkvFXmToE5t9UA3abkGH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJWlGGUAAoJEPqg+cTm90wjinUQAJiWNr/jTETwPZZsVJYomSAi c1Ljisfc+qiiz4COj4mRmhbi9ejyivuNgrwsr3PDb7Yhm+Rb1mJr7qt6TAVG0twy XAE0b3J2zLoSYEDjU8eLX2+tgn62Inf2CLL4ElA4TbQtq4jMD/jmhddFFVPvnnfd CeZ5vZRqp/p/QM+fwcQVbF9/eDq5rezPRaKpmEmr6i4W7afiKDRCxQJR3im+XLJV xxX/iBx7Xx3Y0Y30BuN0dPiTJpKNFpHZhk2HCADsbXBxBPoIOmpu+xqpg3r1bILl zT74U9HDertJQQm52JOC573NIzSYrWQ4gqgetOC/kJ1+1XInEqf4AGT/Csu1KUSL 9AUE8PM/go+L0OICw+yu5cEGytYL2lB8PcE67TuF7/4X0O1xrGn4pAXt9pztFxWt qtOftVW2GJ64EpTNdEjlpUJRbDZCdnXcPeONhgnJnyuufUzxO+KBQO/xsEGWqLXp CTqWGJ0xcUA1qnlb3S3ChWN/52nLLfsFoxNpMI7s8kOe+vnSroSqNIqeitvpEbGB 38thCnp9RCiYi5A31MFIqNHHkrGf1PolMHXWuYkTqnSoMssWuKRasqr59jURW7Cd YUu5/AhmGU52W2hfqgZW91omke0fIqlmCrD3JRyUpGHaJ5/OQuS+l6gUnyMO/mnS 8o4scnevxtKnv4WmScv2 =iTe5 -----END PGP SIGNATURE----- --M2hKs8rIgHTe4EkvFXmToE5t9UA3abkGH--