Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make find-references behave better with simpler code #100

Merged
merged 1 commit into from
Mar 10, 2019

Conversation

kermorgant
Copy link
Contributor

@kermorgant kermorgant commented Mar 9, 2019

ensime-mode has a similar implementation, which does not rely on
tabulated mode and I liked the shorter implementation (+ grep-mode makes
it easy to kill the buffer with a single keystroke).

Besides, set-window-dedicated-p helps make the buffer sticky.

partly solves #98

@kermorgant
Copy link
Contributor Author

I might give it another stab current appearance of ref list is not as good as with tabulated mode

phpactor.el Outdated
(erase-buffer)
(dolist (file-reference current-references)
(let ((path (plist-get file-reference :file))
(x nil))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is x unused?

phpactor.el Outdated
(when path
(insert-text-button (phpactor-truncate-left path phpactor-references-list-col1-width)
'action (lambda(x) (find-file path (plist-get reference :start)))
'help-echo "mouse-2: visit this file in other window")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • If you ignore the argument, the variable name should be _.
  • Please indent this line up properly.
  • Separate between lambda and the argument list with a space.

@zonuexe
Copy link
Member

zonuexe commented Mar 10, 2019

I commented on details, but it looks good to me.

ensime-mode has a similar implementation, which does not rely on
tabulated mode and I liked the shorter implementation (grep-mode makes
it easy to kill the buffer with a single keystroke).

Besides, set-window-dedicated-p helps make the buffer sticky.
@kermorgant kermorgant force-pushed the feature/improve-find-references branch from e9c796e to c303e8e Compare March 10, 2019 15:45
@kermorgant
Copy link
Contributor Author

@zonuexe
I added goto-char instruction, reordered the "cols" (more like the initial tabulated mode) and fixed the things you mentioned (except maybe the indent ?)

@kermorgant kermorgant merged commit dd73154 into develop Mar 10, 2019
zonuexe pushed a commit that referenced this pull request Mar 25, 2019
ensime-mode has a similar implementation, which does not rely on
tabulated mode and I liked the shorter implementation (grep-mode makes
it easy to kill the buffer with a single keystroke).

Besides, set-window-dedicated-p helps make the buffer sticky.
@kermorgant kermorgant deleted the feature/improve-find-references branch March 29, 2019 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants