Code Monkey home page Code Monkey logo

elmacro's People

Contributors

eddiepierce avatar pierre-rouleau avatar purcell avatar silex avatar syohex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

elmacro's Issues

elmacro stops working after a C-g, elmacro mode has to be toggled off and on to reset

First, thanks for an awesome library. I love it.

For some reason elmacro stops working after an C-g and only starts working again after toggling the mode off and on with (elmacro-mode) (elmacro-mode)

I understand that macro recording stops after C-g, however it can be resumed with C-u C-u C-x ( and one can even go in and edit the macro taking whatever caused the problem using C-x C-k C-e and have a working macro.

However is seems that elmacro is lost after the C-g, it doesn't seem to be able to use any macro recordings after that until it is reset by toggling the mode off and on.

It would be great if there would be some way to prevent C-g from causing such havoc on elmacro.

I'm certainly willing to edit the macro as needed (either in emacs macro editor, or via the list that elmacro generates) if I happen to cause a C-g as long as elmacro can continue to work and not get lost.

Thanks for any advice or help

Doesn't record inserts correctly with outshine enabled

In a buffer with emacs-lisp-mode and outshine-minor-mode, inserts are not correctly recorded, I get this when entering "hallo":

(defun last-macro ()
  (interactive)
  (outshine-self-insert-command 1)
  (outshine-self-insert-command 1)
  (outshine-self-insert-command 1)
  (outshine-self-insert-command 1)
  (outshine-self-insert-command 1))

If I disable outline, everyting works as expected.

Here's the relevant config which I use to enable outshine:

(require 'outshine)
(add-hook 'outline-minor-mode-hook 'outshine-hook-function)
(add-hook 'emacs-lisp-mode-hook 'outline-minor-mode)

best,
Tom

UPDATE: same thing in org-mode, it records inserts as (org-self-insert-command 1).

Support evil

  (evil-record-macro 113)
  (command1)
  (command2)
  (command3)
  (evil-record-macro nil)

Maybe refactor to introduce elmacro-macro-regexps with pairs like "(evil-record-macro \d+)" . "(evil-record-macro nil)"

Given we have a register, maybe defun elmacro-show-evil-macro (register) makes sense here.

Is it possible to apply elmacro to different sessions macros?

I have saved macros, from different sessions. I saved them using: M-x insert-kbd-macro

How is it possible to use "elmacro" with them? It seems elmacro only works with the last saved macro using F3 - F4. It doesn't seem to work with loaded macros.

Does F3 work inside a macro?

Something is wrong.
I got some time to try elmacro again, but if I use F3 inside a macro, it always shows "last-command-event" variable:

(defun last-macro2 ()
(interactive)
(setq last-command-event 13)
(org-return nil nil 1)
(setq last-command-event 13))

Interoperability with org-mode, outshine, etc

When I perform the following macro recording in org-mode:

(fset 'glossarer
   [down home ?- ?  S-end ?< ?< ?< ?  ?: ?: delete ? ])

I get from elmacro-show-last-macro this:

(defun last-macro ()
  (interactive)
  (next-line 1 1)
  (beginning-of-visual-line 1)
  (org-self-insert-command 1)
  (org-self-insert-command 1)
  (end-of-visual-line 1)
  (org-self-insert-command 1)
  (org-self-insert-command 1)
  (org-self-insert-command 1)
  (org-self-insert-command 1)
  (org-self-insert-command 1)
  (org-self-insert-command 1)
  (org-self-insert-command 1)
  (delete-forward-char 1 nil))

Which is not that useful.

The example macro is used to transform a line like this:

cursor-position
ABC
Meaning of ABC

to this:

- <<<ABC>>> :: Meaning of ABC

Note: I use smartparens.el to insert <> parens using this config:

(sp-with-modes 'org-mode
  (sp-local-pair "<<" ">>" :unless '(sp-point-after-word-p) :post-handlers '(("[d1]" "SPC"))))

`(setq last-command-event ...)` not filtered out

First off, thank you very much for this package, looks super promising!

However, looks like that the function elmacro-processor-prettify-inserts fails to filter out the (setq last-command-event ...) forms in Evil. This dosent' seem to be a problem without using Evil though.

Here's a simplest example of last-macro:

(defun last-macro ()
  (interactive)
  (setq last-command-event 119)          ; `w'
  (evil-forward-word-begin nil)
  (setq last-command-event 134217827)
  (setq last-command-event 'f4))

Add elmacro-record-everything

Value should be nil by default, but if set to true it logs even what you do in smex etc.

Maybe implement this as a processor where minibufferp is recorded in elmacro-command-history

FEATURE REQUEST: Convert insert-kbd-macro key vector into Lisp commands

Right now your code that converts keyboard macros to equivalent Lisp commands seems very connected to the command history. It would be cleaner and more flexible if you could convert from a representation of the macro itself, either what insert-kbd-macro supplies or a command-event list (listify-key-sequence).

Suppose I create keyboard macros but don't execute them. I instead want to provide either
or a list of command events as input and have your program output a defun for the macro with each key sequence converted to the associated Lisp command call. That would be very useful. Would you add that? Would want to convert macros without polluting the command history.

Better handling of isearch / phi-search

I think it's possible to transform isearch/phi-search into search-forward calls. Maybe offer filters like isearch-refactor-filter and isearch-minimal-filter so people can choose the behavior?

Unable to install or run

Installation attempt from MELPA fails with an error:

File mode specification error: (void-function backward-sexp-mode)

Downloading the code from github and evaluating the code works, but running it gives an error after giving the name for the new function:

funcall: Symbol's function definition is void: backward-sexp-mode

Googling for "backward-sexp-mode" does not bring up anything.

I am running the latest emacs from git repo (v. 24.4.50.1). Where to find this dependency?

eval: Symbol’s value as variable is void: str

I have just installed elmacro on emacs 26.1.

When I try to invoke elmacro-show-last-macro, I get this error:

eval: Symbol’s value as variable is void: str

Where is str supposed to be defined?

poll: do you care about emacs 24.3 isearch support?

Do you guys care about emacs 24.3 isearch support? Voice your opinion otherwise I'll just drop it.

elmacro will of course still work for everything, but isearch use won't be completely reproducible.

This happens because the way isearch works changed quite a lot in emacs 24.4, and I'm planning a big refactor.

See related issue #5

How to filter `file-notify-handle-event` calls

In trying to record a macro I'm getting a bunch of file-notify-handle-event calls:

(defun last-macro ()
  (interactive)
  (move-end-of-line 1)
  (insert "fjdskl")
  (file-notify-handle-event
   `(file-notify
     (307
      (create)
      ".#observations.proto")
     file-notify-callback))
  (file-notify-handle-event
   `(file-notify
     (307
      (write)
      ".#observations.proto")
     file-notify-callback))
  (file-notify-handle-event
   `(file-notify
     (306
      (create)
      ".#observations.proto")
     file-notify-callback))

I assumed this would be easy to filter out using elmacro-unwanted-commands-regexps, so I set it equal to ("^(ido.*)$" "^(smex)$" "^(file-notify.*)$"), but that doesn't work. I'm sure there is something simple I am missing.

Any hints on the right direction I should taking?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.