Re: [PATCH] speed commands: error message when a key is not associated with a command

2022-05-03 Thread Juan Manuel Macías
Ihor Radchenko writes: > It is more complex and I do not see a clear benefit of introducing a > whole new hook. It would only be useful for people who define a large > number of extra speed command handlers. Yes, I agree. Also I'm afraid that this idea of mine added a drawback as a bonus track: i

Re: [PATCH] speed commands: error message when a key is not associated with a command

2022-05-01 Thread Ihor Radchenko
Juan Manuel Macías writes: > Ok, I agree that this is the most reasonable direction. What do you > think about the idea that I outlined in the last post of this thread > (https://list.orgmode.org/87v8uqmkc0@posteo.net/)?: it consists in > defining a new hook (by default with value nil) where

Re: [PATCH] speed commands: error message when a key is not associated with a command

2022-05-01 Thread Juan Manuel Macías
Ihor Radchenko writes: > This would not solve the problem of shadowing. > It may be better idea to provide a custom variable controlling > org-babel-speed-command-activate: do nothing or throw an error. > This custom variable should also be described in the docstring of > org-speed-command-hook to

Re: [PATCH] speed commands: error message when a key is not associated with a command

2022-04-30 Thread Ihor Radchenko
Juan Manuel Macías writes: > Ihor Radchenko writes: > >> Note that speed commands are not only decided by >> org-speed-command-activate. Any function in org-speed-command-hook can >> trigger speed command. Throwing an error in org-speed-command-activate >> can potentially shadow other functions i

Re: [PATCH] speed commands: error message when a key is not associated with a command

2022-04-30 Thread Juan Manuel Macías
> Ihor Radchenko writes: > >> Note that speed commands are not only decided by >> org-speed-command-activate. Any function in org-speed-command-hook can >> trigger speed command. Throwing an error in org-speed-command-activate >> can potentially shadow other functions in the hook. This other, more

Re: [PATCH] speed commands: error message when a key is not associated with a command

2022-04-30 Thread Juan Manuel Macías
Ihor Radchenko writes: > Note that speed commands are not only decided by > org-speed-command-activate. Any function in org-speed-command-hook can > trigger speed command. Throwing an error in org-speed-command-activate > can potentially shadow other functions in the hook. Ah, I see... I had not

Re: [PATCH] speed commands: error message when a key is not associated with a command

2022-04-30 Thread Ihor Radchenko
Juan Manuel Macías writes: > If we have speed commands activated and we type (by mistake) a character > not associated with a command, the letter is printed at point. I think a > more appropriate behavior would be: > > - key associated with a command: the command is activated > > - key not associ

[PATCH] speed commands: error message when a key is not associated with a command

2022-04-30 Thread Juan Manuel Macías
Hi, If we have speed commands activated and we type (by mistake) a character not associated with a command, the letter is printed at point. I think a more appropriate behavior would be: - key associated with a command: the command is activated - key not associated with a command: an error messag