unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master 12578d6: Change how (declare (modes store the data
       [not found] ` <20210220132951.6CCAF20B7C@vcs0.savannah.gnu.org>
@ 2021-02-20 14:50   ` Stefan Monnier
  2021-02-20 14:53     ` Lars Ingebrigtsen
                       ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Stefan Monnier @ 2021-02-20 14:50 UTC (permalink / raw)
  To: emacs-devel; +Cc: Lars Ingebrigtsen

>     * lisp/emacs-lisp/byte-run.el (byte-run--set-modes): Change from
>     being a predicate to storing the modes.  This allows using the
>     modes for positive command discovery, too.

BTW, maybe the generalization is to replace the "completion-predicate"
and the "command-modes" into a function that returns a *score*, with
some convention where a score lower than X means the command can't
possibly work, and score lower than Y means the command is too unlikely
to be useful to be worth listing, a score higher than Y means that the
command has a special affinity with the current situation (like "written
for the current mode"), ...


        Stefan




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: master 12578d6: Change how (declare (modes store the data
  2021-02-20 14:50   ` master 12578d6: Change how (declare (modes store the data Stefan Monnier
@ 2021-02-20 14:53     ` Lars Ingebrigtsen
  2021-02-21  6:19     ` Richard Stallman
  2021-02-21  6:29     ` Richard Stallman
  2 siblings, 0 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-02-20 14:53 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> BTW, maybe the generalization is to replace the "completion-predicate"
> and the "command-modes" into a function that returns a *score*, with
> some convention where a score lower than X means the command can't
> possibly work, and score lower than Y means the command is too unlikely
> to be useful to be worth listing, a score higher than Y means that the
> command has a special affinity with the current situation (like "written
> for the current mode"), ...

That sounds useful, but it sounds like a really difficult thing to
relate to.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: master 12578d6: Change how (declare (modes store the data
  2021-02-20 14:50   ` master 12578d6: Change how (declare (modes store the data Stefan Monnier
  2021-02-20 14:53     ` Lars Ingebrigtsen
@ 2021-02-21  6:19     ` Richard Stallman
  2021-02-21 20:13       ` Stefan Monnier
  2021-02-21  6:29     ` Richard Stallman
  2 siblings, 1 reply; 5+ messages in thread
From: Richard Stallman @ 2021-02-21  6:19 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: larsi, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > BTW, maybe the generalization is to replace the "completion-predicate"
  > and the "command-modes" into a function that returns a *score*, with
  > some convention where a score lower than X means the command can't
  > possibly work, and score lower than Y means the command is too unlikely
  > to be useful to be worth listing, a score higher than Y means that the
  > command has a special affinity with the current situation (like "written
  > for the current mode"), ...

There must be no end to the levels of complexity we could put into this
feature, but this could be past the point of diminishing returns.

I suggest people stop making this more complicated and see how people
like it.  In the mean time, we could work on improving other aspects
of Emacs.

-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: master 12578d6: Change how (declare (modes store the data
  2021-02-20 14:50   ` master 12578d6: Change how (declare (modes store the data Stefan Monnier
  2021-02-20 14:53     ` Lars Ingebrigtsen
  2021-02-21  6:19     ` Richard Stallman
@ 2021-02-21  6:29     ` Richard Stallman
  2 siblings, 0 replies; 5+ messages in thread
From: Richard Stallman @ 2021-02-21  6:29 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: larsi, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > BTW, maybe the generalization is to replace the "completion-predicate"
  > and the "command-modes" into a function that returns a *score*, with
  > some convention where a score lower than X means the command can't
  > possibly work, and score lower than Y means the command is too unlikely
  > to be useful to be worth listing, a score higher than Y means that the
  > command has a special affinity with the current situation (like "written
  > for the current mode"), ...

There must be no end to the levels of complexity we could put into this
feature, but this could be past the point of diminishing returns.

I suggest people stop making this more complicated and see how people
like it.  In the mean time, we could work on improving other aspects
of Emacs.

-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: master 12578d6: Change how (declare (modes store the data
  2021-02-21  6:19     ` Richard Stallman
@ 2021-02-21 20:13       ` Stefan Monnier
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2021-02-21 20:13 UTC (permalink / raw)
  To: Richard Stallman; +Cc: larsi, emacs-devel

> There must be no end to the levels of complexity we could put into this
> feature, but this could be past the point of diminishing returns.

Given the efforts needed to mark up all the relevant ELisp code, I think
there's something to be said for trying to get as much as possible
from it.


        Stefan




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-02-21 20:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210220132950.31277.5100@vcs0.savannah.gnu.org>
     [not found] ` <20210220132951.6CCAF20B7C@vcs0.savannah.gnu.org>
2021-02-20 14:50   ` master 12578d6: Change how (declare (modes store the data Stefan Monnier
2021-02-20 14:53     ` Lars Ingebrigtsen
2021-02-21  6:19     ` Richard Stallman
2021-02-21 20:13       ` Stefan Monnier
2021-02-21  6:29     ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).