Closed yantar92 closed 1 year ago
Ok. If you know how to code in elisp I welcome some tips on a possible implementation approach :)
Check out backtrace--print-to-string
.
Thanks for the pointer. I'll look.
About the horizontal line, I couldn't find anything about how to draw a horizontal line that adapts to window size when it changes. It'd help if you can find something about that too.
Or perhaps I should just consider removing the horizontal line and give emphasis to the title, with bold font, or color/background color, something like that.
Try
(with-silent-modifications (insert (propertize " " 'display '(space :align-to right-fringe))))
(with-silent-modifications (put-text-property (1- (point)) (point) 'face '(:strike-through t)))
Ok. I'll do.
About the resizes, there's window-size-change-functions hook.
I could try to hook and redraw the buffer when window changes. Truncation should be made to use current window size.
About the resizes, there's window-size-change-functions hook.
Be careful about performance. An alternative could be allowing to refresh the buffer manually.
Noted. Perhaps use a customization variable to toggle that behavior.
Yes. I like the ability to be able to refresh the buffer in any case. That should be added.
Pushed first attempt of truncation method based on backtrace--print-string. It looks better IMO. The ... buttons don't work though, because there's an inspector button that overwrites those and performs navigation to the object.
buttons don't work though, because there's an inspector button that overwrites those and performs navigation to the object.
Sounds like not a big deal. Navigation will reveal the details anyway. I will be able to tell more when I actually use this in practice.
You can try it now with your data and give me some feedback. It is better IMO.
I'm using this to test:
(require 'request)
(require 'json)
(request "https://www.govtrack.us/api/v2/role?current=true&role_type=senator"
:success (lambda (&rest args)
(inspector-inspect (json-read-from-string (cl-getf args :data)))))
Sure, it looks better. But I was referring to actual daily usage when debugging staff, where I need to get meaningful understanding of the data. It will take time.
Should not prevent you from considering this aspect of the issue closed though. I will open a new issue if necessary.
Yes. I like the ability to be able to refresh the buffer in any case. That should be added.
A standard way would be revert-buffer-function
.
Ah. I've pushed an inspector-refresh
command. I should look at the revert-buffer-function
.
I've hooked into revert-buffer-function
in https://github.com/mmontone/emacs-inspector/commit/4d58a95ad9d8c6093d5daffd324aa9331fdb1430
LGTM.
I am trying to use inspector to check a real nested list data and I find the current truncation behaviour inconvenient. I just got the following
I see two problems with this text:
("Text with newline " 0 18 (:parent (paragraph …)) )