emacsorphanage / helm-gtags

GNU GLOBAL helm interface
203 stars 32 forks source link

Format for helm-gtags-parse-file output. #170

Open jacekmigacz opened 7 years ago

jacekmigacz commented 7 years ago

Syohei-san.

I think current helm-output of helm-gtags-parse-file is unreadable: before

I'm proposing another output format: after after2

Regards.

jomi-se commented 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

jacekmigacz commented 7 years ago

@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.

jomi-se commented 7 years ago

@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.

jacekmigacz commented 7 years ago

@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?

jomi-se commented 7 years ago

@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-fileis a special case which calls helmdirectly 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 helmcall in helm-gtags--common as well, right?

jacekmigacz commented 6 years ago

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.

jacekmigacz commented 6 years ago

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