GNU bug report logs - #34776
27.0.50; Some questions about choose-completion-string-functions

Previous Next

Package: emacs;

Reported by: Eric Abrahamsen <eric <at> ericabrahamsen.net>

Date: Wed, 6 Mar 2019 23:06:02 UTC

Severity: normal

Found in version 27.0.50

Done: Eric Abrahamsen <eric <at> ericabrahamsen.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#34776: closed (27.0.50; Some questions about choose-completion-string-functions)
Date: Wed, 10 Apr 2019 03:17:03 +0000
[Message part 1 (text/plain, inline)]
Your message dated Tue, 09 Apr 2019 20:16:36 -0700
with message-id <87y34iim7f.fsf <at> ericabrahamsen.net>
and subject line Re: bug#34776: Acknowledgement (27.0.50; Some questions about choose-completion-string-functions)
has caused the debbugs.gnu.org bug report #34776,
regarding 27.0.50; Some questions about choose-completion-string-functions
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
34776: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=34776
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; Some questions about choose-completion-string-functions
Date: Wed, 06 Mar 2019 15:05:29 -0800
I'm trying to use `choose-completion-string-functions' to do some
"stuff" after the user finishes a completion, and have two questions:

1. The docstring of this variable says it is called with three
   arguments, but in fact it's called with four: the fourth is passed as
   nil, and is only there for backward compatibility, apparently. But
   still, you can't use a function that only accepts three args. I can
   provide a patch for the docstring if this is correct.
2. The code in `choose-completion-string' behaves as though the above
   variable is buffer local, but it is never declared to be so. I'm not
   sure if this is a bug (ie, we should be using `defvar-local'), or
   whether I should be adding functions here using the (local 'SYMBOL)
   convention of `add-function'. If that's the case, that's probably
   also a docstring bug, as we should warn users that they'll want to
   specify a local variable.

WDYT?

Eric


[Message part 3 (message/rfc822, inline)]
From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: 34776 <at> debbugs.gnu.org 
Cc: 34776-done <at> debbugs.gnu.org
Subject: Re: bug#34776: Acknowledgement (27.0.50;
 Some questions about choose-completion-string-functions)
Date: Tue, 09 Apr 2019 20:16:36 -0700
Noam Postavsky <npostavs <at> gmail.com> writes:

> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>
>> So never mind! But I'd still like to add something like the attached, as
>> functions following the current docstring will raise an error.
>>
>> Eric
>>
>> diff --git a/lisp/simple.el b/lisp/simple.el
>> index d4ae5ebb1f..0274bdb459 100644
>> --- a/lisp/simple.el
>> +++ b/lisp/simple.el
>> @@ -8188,6 +8188,9 @@ choose-completion-string-functions
>>  BUFFER - the buffer in which the choice should be inserted,
>>  BASE-POSITION - where to insert the completion.
>>  
>> +Functions should also accept and ignore a potential fourth
>> +argument, passed for backwards compatibility.
>> +
>
> Looks good to me.  And it can go to emacs-26 since it's a doc fix.

Done, thanks.

Welcome back!

E


This bug report was last modified 6 years and 47 days ago.

Previous Next


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