GNU bug report logs - #18265
24.3.92; lisp-completion-at-point should return nil in comments, unless after `

Previous Next

Package: emacs;

Reported by: Dmitry <dgutov <at> yandex.ru>

Date: Thu, 14 Aug 2014 12:27:01 UTC

Severity: minor

Found in version 24.3.92

Fixed in version 25.1

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 18265 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 18265 <at> debbugs.gnu.org
Subject: Re: bug#18265: 24.3.92; lisp-completion-at-point should return nil
 in comments, unless after `
Date: Fri, 15 Aug 2014 07:13:04 +0400
On 08/15/2014 07:04 AM, Stefan Monnier wrote:

> Good point.  Makes me wonder how to extend completion-at-point-functions
> such that a function like lisp-completion-at-point could behave
> differently for something like Company (which calls it without the user
> making an explicit completion request) than for an explicit M-TAB.

Sometimes the user makes an explicit request, though. So it's "idle mode 
vs manual mode", not "Company vs complete-symbol".

Still, the fact that user called `M-x company-complete' inside a comment 
doesn't tell me that they actually want to see completions from 
`company-capf' and not some other backend like `company-dabbrev'.

Likewise, user pressing C-M-i inside a comment might prefer not to talk 
`lisp-completion-at-point', but some other completion function that goes 
after it that's more suited for completion in comments.

If we really want to use `lisp-completion-at-point' in comments in more 
cases, I'd try to detect whether we're probably in a code sample (by the 
extra indentation, maybe), and otherwise return nil.




This bug report was last modified 10 years and 229 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.