all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Emacs TODO List: Have a command suggestion help system that  recognizes patterns
@ 2010-07-30 22:34 Thunk Out
  2010-08-01 23:57 ` Emacs TODO List: Have a command suggestion help system that Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Thunk Out @ 2010-07-30 22:34 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1063 bytes --]

Hi there,

I'm working on a command suggestion minor mode. I just realized that this is
also an item on the Emacs TODO list (C-h C-t), and that I should contact you
about it on off chance that you want it, or have some suggestions about its
implementation. The code is located at http://github.com/tlh/re-suggest.el

From the comments:

;; re-suggest.el is a simple command suggestion minor-mode. It works
;; by mapping commands to characters, creating a string out of the
;; character mappings of recent commands, matching the resulting
;; string against a list of user-defined regexps that correspond to
;; command sequences, and finally suggesting a better way to do things
;; when a match is found. re-suggest looks strictly at sequences of
;; commands, not sequences of keystrokes, avoiding complications
;; resulting from different keybindings in different modes.

So re-suggest actually uses the built-in regexp engine to do its command
pattern matching.

I'm more than willing to sign the papers if you actually want it. I'd love
to hear from you.

--tlh

[-- Attachment #2: Type: text/html, Size: 1383 bytes --]

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

* Re: Emacs TODO List: Have a command suggestion help system that
  2010-07-30 22:34 Emacs TODO List: Have a command suggestion help system that recognizes patterns Thunk Out
@ 2010-08-01 23:57 ` Stefan Monnier
  2010-08-02  0:19   ` Wojciech Meyer
  2010-08-02  3:43   ` Thunk Out
  0 siblings, 2 replies; 6+ messages in thread
From: Stefan Monnier @ 2010-08-01 23:57 UTC (permalink / raw)
  To: Thunk Out; +Cc: emacs-devel

> I'm working on a command suggestion minor mode. I just realized that this is
> also an item on the Emacs TODO list (C-h C-t), and that I should contact you
> about it on off chance that you want it, or have some suggestions about its
> implementation. The code is located at http://github.com/tlh/re-suggest.el

I'm not sure why you bother turning the commands into single-letter
chars, rather than just use their full name, but it looks interesting.
I think the most interesting part is the recs-cmd-regexps.

What do people think about this?
We could definitely add it to elpa.gnu.org, but of course, this would
require you signing some copyright paperwork for it.
BTW, please try C-u M-x checkdoc-current-buffer a few times to fix some
minor coding convention details.


        Stefan



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

* Re: Emacs TODO List: Have a command suggestion help system that
  2010-08-01 23:57 ` Emacs TODO List: Have a command suggestion help system that Stefan Monnier
@ 2010-08-02  0:19   ` Wojciech Meyer
  2010-08-02  5:08     ` Thunk Out
  2010-08-02  9:48     ` Thunk Out
  2010-08-02  3:43   ` Thunk Out
  1 sibling, 2 replies; 6+ messages in thread
From: Wojciech Meyer @ 2010-08-02  0:19 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Thunk Out, emacs-devel

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

>> I'm working on a command suggestion minor mode. I just realized that this is
>> also an item on the Emacs TODO list (C-h C-t), and that I should contact you
>> about it on off chance that you want it, or have some suggestions about its
>> implementation. The code is located at http://github.com/tlh/re-suggest.el
>
> I'm not sure why you bother turning the commands into single-letter
> chars, rather than just use their full name, but it looks interesting.
> I think the most interesting part is the recs-cmd-regexps.
>
> What do people think about this?
> We could definitely add it to elpa.gnu.org, but of course, this would
> require you signing some copyright paperwork for it.
> BTW, please try C-u M-x checkdoc-current-buffer a few times to fix some
> minor coding convention details.
>

This reminds me a peephole optimisation in compilers. Indeed I see
a potential. Looks good. However the messages should be really symbol
names. Also, a good thing for further would be remember missed
combinations, and have access to a summary of missed commands. More
annoying this mode would be - better chances for somebody to get rid of
bad habits.  Making rules programaticaly would be an advantage too,
keeping those in some configuration file.
And I agree, mapping to letters is not needed, and less readable.

>
>         Stefan

Cheers;
Wojciech



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

* Re: Emacs TODO List: Have a command suggestion help system that
  2010-08-01 23:57 ` Emacs TODO List: Have a command suggestion help system that Stefan Monnier
  2010-08-02  0:19   ` Wojciech Meyer
@ 2010-08-02  3:43   ` Thunk Out
  1 sibling, 0 replies; 6+ messages in thread
From: Thunk Out @ 2010-08-02  3:43 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1542 bytes --]

Honestly, it didn't cross my mind to just use commands' full names,
probably due to some misplaced concern for efficiency. You're right,
though -- using command names would make it considerably easier to
read and configure. I'll convert it over first thing.

I've corrected most of the warnings thrown by checkdoc-current-buffer,
although "First line is not a complete sentence" is a little difficult
to pull off in 80 chars :) The updated code can still be found at
http://github.com/tlh/re-suggest.el

I should have matching on command names completed by tomorrow or the
next day.

So what's the next step? I'm willing to sign the copyright papers, of
course.

--tlh


On Sun, Aug 1, 2010 at 6:57 PM, Stefan Monnier <monnier@iro.umontreal.ca>
wrote:
> I'm working on a command suggestion minor mode. I just realized that this
is
> also an item on the Emacs TODO list (C-h C-t), and that I should contact
you
> about it on off chance that you want it, or have some suggestions about
its
> implementation. The code is located at http://github.com/tlh/re-suggest.el

I'm not sure why you bother turning the commands into single-letter
chars, rather than just use their full name, but it looks interesting.
I think the most interesting part is the recs-cmd-regexps.

What do people think about this?
We could definitely add it to elpa.gnu.org, but of course, this would
require you signing some copyright paperwork for it.
BTW, please try C-u M-x checkdoc-current-buffer a few times to fix some
minor coding convention details.


       Stefan

[-- Attachment #2: Type: text/html, Size: 2251 bytes --]

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

* Re: Emacs TODO List: Have a command suggestion help system that
  2010-08-02  0:19   ` Wojciech Meyer
@ 2010-08-02  5:08     ` Thunk Out
  2010-08-02  9:48     ` Thunk Out
  1 sibling, 0 replies; 6+ messages in thread
From: Thunk Out @ 2010-08-02  5:08 UTC (permalink / raw)
  To: Wojciech Meyer; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 2322 bytes --]

Well, the intent with messages being strings was that the user could
define their own warning messages. As it stands, any command name
quoted `like-this' gets extracted, and its keybindings, if they exist,
are displayed along with the suggestion.

I agree on the silliness of mapping commands to characters. I'm
working on converting it over to use full command names.

Logging matched patterns, interactive pattern definition and a
separate config file are all good suggestions. I'll put them on the
TODO list.

recs-mode can be made *really* annoying, if you wish. It can ding and
steal the window selection out from under you. And `recs-hook' is run
for every pattern match, so you can define arbitrary code to run on
match.

Thanks for your input,
--tlh


On Sun, Aug 1, 2010 at 7:19 PM, Wojciech Meyer <
wojciech.meyer@googlemail.com> wrote:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
> >> I'm working on a command suggestion minor mode. I just realized that
> this is
> >> also an item on the Emacs TODO list (C-h C-t), and that I should contact
> you
> >> about it on off chance that you want it, or have some suggestions about
> its
> >> implementation. The code is located at
> http://github.com/tlh/re-suggest.el
> >
> > I'm not sure why you bother turning the commands into single-letter
> > chars, rather than just use their full name, but it looks interesting.
> > I think the most interesting part is the recs-cmd-regexps.
> >
> > What do people think about this?
> > We could definitely add it to elpa.gnu.org, but of course, this would
> > require you signing some copyright paperwork for it.
> > BTW, please try C-u M-x checkdoc-current-buffer a few times to fix some
> > minor coding convention details.
> >
>
> This reminds me a peephole optimisation in compilers. Indeed I see
> a potential. Looks good. However the messages should be really symbol
> names. Also, a good thing for further would be remember missed
> combinations, and have access to a summary of missed commands. More
> annoying this mode would be - better chances for somebody to get rid of
> bad habits.  Making rules programaticaly would be an advantage too,
> keeping those in some configuration file.
> And I agree, mapping to letters is not needed, and less readable.
>
> >
> >         Stefan
>
> Cheers;
> Wojciech
>

[-- Attachment #2: Type: text/html, Size: 3220 bytes --]

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

* Re: Emacs TODO List: Have a command suggestion help system that
  2010-08-02  0:19   ` Wojciech Meyer
  2010-08-02  5:08     ` Thunk Out
@ 2010-08-02  9:48     ` Thunk Out
  1 sibling, 0 replies; 6+ messages in thread
From: Thunk Out @ 2010-08-02  9:48 UTC (permalink / raw)
  To: Wojciech Meyer, Stefan Monnier; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1822 bytes --]

I've updated recs.el to match on full command names rather than mapped
chars,
and to return command name symbols per Wojciech's suggestion.
You can view the changes here: http://github.com/tlh/re-suggest.el

<http://github.com/tlh/re-suggest.el>Thanks,
--tlh

On Sun, Aug 1, 2010 at 7:19 PM, Wojciech Meyer <
wojciech.meyer@googlemail.com> wrote:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
> >> I'm working on a command suggestion minor mode. I just realized that
> this is
> >> also an item on the Emacs TODO list (C-h C-t), and that I should contact
> you
> >> about it on off chance that you want it, or have some suggestions about
> its
> >> implementation. The code is located at
> http://github.com/tlh/re-suggest.el
> >
> > I'm not sure why you bother turning the commands into single-letter
> > chars, rather than just use their full name, but it looks interesting.
> > I think the most interesting part is the recs-cmd-regexps.
> >
> > What do people think about this?
> > We could definitely add it to elpa.gnu.org, but of course, this would
> > require you signing some copyright paperwork for it.
> > BTW, please try C-u M-x checkdoc-current-buffer a few times to fix some
> > minor coding convention details.
> >
>
> This reminds me a peephole optimisation in compilers. Indeed I see
> a potential. Looks good. However the messages should be really symbol
> names. Also, a good thing for further would be remember missed
> combinations, and have access to a summary of missed commands. More
> annoying this mode would be - better chances for somebody to get rid of
> bad habits.  Making rules programaticaly would be an advantage too,
> keeping those in some configuration file.
> And I agree, mapping to letters is not needed, and less readable.
>
> >
> >         Stefan
>
> Cheers;
> Wojciech
>

[-- Attachment #2: Type: text/html, Size: 2631 bytes --]

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

end of thread, other threads:[~2010-08-02  9:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-30 22:34 Emacs TODO List: Have a command suggestion help system that recognizes patterns Thunk Out
2010-08-01 23:57 ` Emacs TODO List: Have a command suggestion help system that Stefan Monnier
2010-08-02  0:19   ` Wojciech Meyer
2010-08-02  5:08     ` Thunk Out
2010-08-02  9:48     ` Thunk Out
2010-08-02  3:43   ` Thunk Out

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.