GNU bug report logs - #20489
25.0.50; next-error-find-buffer chooses non-current buffer without good reason

Previous Next

Package: emacs;

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

Date: Sat, 2 May 2015 23:19:01 UTC

Severity: normal

Found in version 25.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


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

From: Juri Linkov <juri <at> linkov.net>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 20489 <at> debbugs.gnu.org
Subject: Re: [Emacs-diffs] master d48e07a: * lisp/simple.el
 (next-error-find-buffer-function): New defcustom.
Date: Sat, 24 Feb 2018 23:34:35 +0200
>> +(defun next-error-find-buffer-function-default (&optional avoid-current
>> +                                                          extra-test-inclusive
>> +                                                          extra-test-exclusive))
>
> This looks like a syntax error to me (function without body).  I know
> it's accepted (because various parts of the byte-compiler need special
> hacks to deal with it), but please always put a body (i.e. an explicit nil).

And without body there is no way to add a docstring.

>> +(defvar next-error-find-buffer-function 'next-error-find-buffer-function-default
>
> should just say
>
>     (defvar next-error-find-buffer-function #'ignore

Ah, before arriving to the function without body I mistakenly tried #'identity
(that didn't work) whereas I actually intended to try #'ignore.

But the question that I really don't understand is what to do with the function
next-error-buffer-on-selected-frame that now will have no reference in code,
no use by default.  How the users are supposed to know that it's possible
to put add-function with this function in the init file?  Should we document
this in the docstring of next-error-buffer-on-selected-frame or the docstring
of next-error-find-buffer-function together with examples of using add-function?




This bug report was last modified 7 years and 72 days ago.

Previous Next


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