unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#25272: problem with imenu and company-mode
@ 2016-12-26  2:40 Ali AlipourR
  2020-11-30 11:30 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Ali AlipourR @ 2016-12-26  2:40 UTC (permalink / raw)
  To: 25272

[-- Attachment #1: Type: text/plain, Size: 145 bytes --]

Hi
I'm not sure this is really a "problem" with imenu, but here are the
details:
https://github.com/company-mode/company-mode/issues/624

Thanks

[-- Attachment #2: Type: text/html, Size: 265 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#25272: problem with imenu and company-mode
  2016-12-26  2:40 bug#25272: problem with imenu and company-mode Ali AlipourR
@ 2020-11-30 11:30 ` Lars Ingebrigtsen
  2020-12-01  0:50   ` Dmitry Gutov
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-30 11:30 UTC (permalink / raw)
  To: Ali AlipourR; +Cc: 25272, Dmitry Gutov

Ali AlipourR <alipoor90@gmail.com> writes:

> Hi
> I'm not sure this is really a "problem" with imenu, but here are the details: 
> https://github.com/company-mode/company-mode/issues/624
>
> Thanks

(This bug report unfortunately got no response at the time.)

The relevant bits from that bug report seems to be:

---

 1 open this file  
 2 M-x sh-mode (this should recognize the shebang line and take you to  
  shell-script[bash] mode)  
 3 M-x company-mode  
   
 and it should give you suggestions, define a new long name function/variable  
 and ...  
   
 Thanks  
@dgutov 
SVG Image Copy link 
Member 

@dgutov 
dgutov commented Dec 25, 2016 

 Thanks. I though I was doing exactly that, but apparently not. I can reproduce  
 this now.  
   
 It's a problem in Emacs (which was apparent from the outset, since the backend  
 is company-capf), and it goes like this: the completion function takes the  
 generated IMenu index to get the list of functions.  
   
 IMenu, however, uses imenu-max-item-length to truncate the lengths of its items.  
   
 So please M-x report-emacs-bug so we can get this fixed, one way or another. In  
 the meantime, you can customize imenu-max-item-length to some larger value  
 as a workaround.  
SVG Image
@dgutov 
dgutov added the third party issue label Dec 25, 2016 
SVG Image
@SudoerReodus 
SudoerReodus closed this Dec 26, 2016 
@dgutov 
SVG Image Copy link 
Member 

@dgutov 
dgutov commented Dec 26, 2016 

 To be clear, it's a bug in sh-mode, not in IMenu.  

---

It's not really that clear what the issue is -- at least not to me.  :-)
Dmitry?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#25272: problem with imenu and company-mode
  2020-11-30 11:30 ` Lars Ingebrigtsen
@ 2020-12-01  0:50   ` Dmitry Gutov
  0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Gutov @ 2020-12-01  0:50 UTC (permalink / raw)
  To: Lars Ingebrigtsen, Ali AlipourR; +Cc: 25272

On 30.11.2020 13:30, Lars Ingebrigtsen wrote:
> It's not really that clear what the issue is -- at least not to me.:-)
> Dmitry?

sh--cmd-completion-table (a completion table function) delegates to 
imenu--make-index-alist. Which is affected imenu-max-item-length: when 
an item gets too long, it is truncated.

That is fine for Imenu index, I guess, but creates invalid completions 
(the examples in the report are when function names are longer than 60 
chars).

A fix would be to either stop going through imenu--make-index-alist and 
write proper completion logic, or at least temporarily bind 
imenu-max-item-length to nil, while making sure to clear the imenu 
entries cache.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-01  0:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-26  2:40 bug#25272: problem with imenu and company-mode Ali AlipourR
2020-11-30 11:30 ` Lars Ingebrigtsen
2020-12-01  0:50   ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).