Open jacekmigacz opened 7 years ago
I'm interested in this pull request as well.
In the same vein, I added a variable to toggle truncating lines. When using narrower frames, this can help make the buffer look less cluttered.
Would you consider adding it to your pull request?
0001-Add-variable-to-truncate-lines-in-helm-gtags-parse-f.txt
@jomi-se I'v applied your path on top of mine, but - for me - it doesn't do what is supposed to do. Records for helm-gtags--buffer buffer are built inside helm-gtags--parse-file-candidate-transformer. I'm not sure how it works, but I'm sure that helm:truncate-lines doesn't strip the line numbers.
@jacekmigacz
Cool ! But the patch doesn't have anything to do with stripping line numbers. It just adds a variable that is passed as helm:truncate-lines so that this value can be easily set only for helm-gtags buffers.
What this value does is enable/disable line-wrapping when the line is longer than the frame's width. With helm:truncate-lines at nil, lines wrap around as they do in your first 2 screenshots. With this patch you can customize a variable to truncate these lines instead.
@jomi-se
Rigth. Not it makes sense. But how about global switch for truncating a content of every helm-gtags buffer? Is it something special about "parse file" that does not apply to the rest?
@jacekmigacz That's a good idea. Looking at the code, most helm-gtags-* functions end up calling helm-gtags--common
which is responsible for calling helm
to create the helm-gtags-buffer.
helm-gtags-parse-file
is a special case which calls helm
directly so I just added the option :truncate-lines helm-gtags-parse-file-truncate-lines
.
But we could rename this variable to helm-gtags-buffer-truncate-lines
and add it to the helm
call in helm-gtags--common
as well, right?
With recent helm updates, the helm-gtags-direct-helm-completing is broken.
Instead of calling helm-comp-read, completing-read-function is left not overwritten with completing-read-default.
I'm not sure why is it failing, but looks it is not related with my changes...
Dependency helm failed to install: Package emacs-24.4 is unavailable
Syohei-san.
I think current helm-output of helm-gtags-parse-file is unreadable:![before](https://cloud.githubusercontent.com/assets/1120058/24060917/a8c2aba4-0b55-11e7-93b5-7a8c8641527d.png)
I'm proposing another output format:
![after2](https://cloud.githubusercontent.com/assets/1120058/24060962/d329a514-0b55-11e7-91df-855233d78a41.png)
Regards.