mmontone / emacs-inspector

Inspection tool for Emacs Lisp objects.
GNU General Public License v3.0
108 stars 9 forks source link

Add github ci #16

Closed nhannht closed 1 year ago

nhannht commented 1 year ago
mmontone commented 1 year ago

I'd rather not integrate the global-mode and new commands marked as TODO. Is it in usable state? Can you remove that, and leave only CI stuff and tests?

nhannht commented 1 year ago

Ah, my mistake, the [fix: add inspector global(mode/map)] intend to be another pr. The change was made after I created this PR. I didn't know the PR will auto-update like this if I push a new commit to the branch

nhannht commented 1 year ago

Can you check if this PR is ok?. I just reset the branch Sorry again for the inconvenience. Next time I will create a minor branch for each PR.

Can I add what about creating a global mode? New menu option. And right-click menu options And add some new functions like inspector-top-defun etc...

mmontone commented 1 year ago

Can you check if this PR is ok?. I just reset the branch Sorry again for the inconvenience. Next time I will create a minor branch for each PR.

Yes. I'll merge now.

Can I add what about creating a global mode? New menu option. And right-click menu options And add some new functions like inspector-top-defun etc...

I'm not sure about a global mode. The inspector makes sense only in elisp mode, so why not a minor mode that can be activated for elisp-mode ? Also, I don't understand the inspector-inspect-top-defun. Functions usually have arguments ... Perhaps I don't understand what it does.

nhannht commented 1 year ago
mmontone commented 1 year ago
  • Ah!! my bad, I forget that the package only works in Elisp mode.

    • Sure, those functions should only work in Elisp mode. Because I see you have added inspector menu panel that only appears in the pop-up *inspector* window.

Yes. That menu is for inspector-mode, that is the mode that inspector uses, for navigation, quitting, etc. I think what you want is to have menus for elisp-mode, for inspecting expressions.

* So I want to add another `inspector global` panel(this is sure a naming crisis, I only mean a panel that is different from the current one, but I accidentally hook it to `global mode`, I didn't intend that commit will appear in PR). This panel adds a shortcut for the user to execute the command. But the best option I think is that we should make the `inspector` menu dynamic change base on the current mode instead of using 2 panels.

I think it would be good to be able to extend the menu in elisp mode to include inspector commands, somehow.

* `the inspector-inspect-top-defun` is command with `(interactive)`. It is like `M-x` but triggers the inspector on the result. What do you think? I usually use `M-x` just like I use `C-x C-e` so I think it was useful. Because you have `inspector-inspect-last-sexp` command so I think this new command will not be a problem.

I'm not sure how that would work. Can you give me an implementation for me to try?