GNU bug report logs - #50621
28.0.50; Flymake wrong message about y-or-n-p

Previous Next

Package: emacs;

Reported by: Manuel Uberti <manuel.uberti <at> inventati.org>

Date: Thu, 16 Sep 2021 12:39:01 UTC

Severity: normal

Found in version 28.0.50

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50621 in the body.
You can then email your comments to 50621 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#50621; Package emacs. (Thu, 16 Sep 2021 12:39:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Manuel Uberti <manuel.uberti <at> inventati.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 16 Sep 2021 12:39:02 GMT) Full text and rfc822 format available.

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

From: Manuel Uberti <manuel.uberti <at> inventati.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; Flymake wrong message about y-or-n-p
Date: Thu, 16 Sep 2021 14:38:10 +0200
This is a small recipe to reproduce the problem:

- emacs -Q
- Write: (y-or-n-p "Is this a test?")
- M-x flymake-mode
- M-x flymake-show-buffer-diagnostics
- You will see the following message: `y-or-n-p' argument should end
with "? "

According to this item in NEWS I was led to believe that the trailing
whitespace was not needed any more:

** 'yes-or-no-p' and 'y-or-n-p' PROMPT parameter no longer needs trailing space.
This has been the case since Emacs 24.4 but was not announced or
documented until now.


In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.18, cairo 
version 1.16.0)
 of 2021-09-16 built on hathaway
Repository revision: db12b386537f0a0d36a4759c625ba643e391e4f2
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12009000
System Description: Ubuntu 20.04 LTS

Configured using:
 'configure --with-harfbuzz --with-native-compilation'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF
TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB

Important settings:
  value of $LC_MESSAGES: en_GB.UTF-8
  value of $LC_MONETARY: it_IT.UTF-8
  value of $LC_NUMERIC: it_IT.UTF-8
  value of $LC_TIME: it_IT.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  flymake-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail
rmail-loaddefs auth-source eieio eieio-core eieio-loaddefs
password-cache json map mm-decode mm-bodies mm-encode mailabbrev
gmm-utils mailheader sendmail mail-utils time-date noutline outline
checkdoc comp comp-cstr subr-x rx cl-extra lisp-mnt mail-parse rfc2231
rfc2047 rfc2045 mm-util ietf-drums mail-prsvr help-mode cl-macs cl-seq
flymake-proc flymake project compile text-property-search comint
ansi-color ring warnings thingatpt misearch multi-isearch vc-git
diff-mode easy-mmode vc-dispatcher cl-loaddefs cl-lib seq byte-opt gv
bytecomp byte-compile cconv iso-transl tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process
native-compile emacs)

Memory information:
((conses 16 112572 7925)
 (symbols 48 9674 1)
 (strings 32 28529 1758)
 (string-bytes 1 1055644)
 (vectors 16 19978)
 (vector-slots 8 337135 14232)
 (floats 8 37 28)
 (intervals 56 342 11)
 (buffers 992 16))

-- 
Manuel Uberti
www.manueluberti.eu




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50621; Package emacs. (Thu, 16 Sep 2021 12:54:02 GMT) Full text and rfc822 format available.

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

From: Manuel Uberti <manuel.uberti <at> inventati.org>
To: 50621 <at> debbugs.gnu.org
Subject: Re: 28.0.50; Flymake wrong message about y-or-n-p
Date: Thu, 16 Sep 2021 14:53:07 +0200
M-x checkdoc complains about this as well, so I guess it is more a checkdoc than 
a Flymake problem here.

-- 
Manuel Uberti
www.manueluberti.eu




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50621; Package emacs. (Thu, 16 Sep 2021 14:25:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Manuel Uberti <manuel.uberti <at> inventati.org>
Cc: Stefan Kangas <stefan <at> marxist.se>, 50621 <at> debbugs.gnu.org
Subject: Re: bug#50621: 28.0.50; Flymake wrong message about y-or-n-p
Date: Thu, 16 Sep 2021 16:23:59 +0200
Manuel Uberti <manuel.uberti <at> inventati.org> writes:

> M-x checkdoc complains about this as well, so I guess it is more a
> checkdoc than a Flymake problem here.

Yeah, I guess all of the y-or-n-p stuff should be removed from
checkdoc.el?  Or should it still verify that the string ends with a
question mark?  I've added Stefan to the CCs; perhaps he has an opinion
here.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50621; Package emacs. (Thu, 16 Sep 2021 15:07:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Lars Ingebrigtsen <larsi <at> gnus.org>,
 Manuel Uberti <manuel.uberti <at> inventati.org>
Cc: 50621 <at> debbugs.gnu.org
Subject: Re: bug#50621: 28.0.50; Flymake wrong message about y-or-n-p
Date: Thu, 16 Sep 2021 08:05:50 -0700
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

>> M-x checkdoc complains about this as well, so I guess it is more a
>> checkdoc than a Flymake problem here.
>
> Yeah, I guess all of the y-or-n-p stuff should be removed from
> checkdoc.el?  Or should it still verify that the string ends with a
> question mark?  I've added Stefan to the CCs; perhaps he has an opinion
> here.

As the NEWS item points out, the behavior was changed [IMO for the
better] already in 2014 (commit 298520dfb7f6). The question now is what
to do with Flymake/checkdoc, and I see three ways forward:

 A) We remove this check.
 B) We change it to only warn about a missing question mark.
 C) We change it as in B, but also warn about a spurious space.

Alternative A is the easiest one, but loses functionality.

Alternative B is better, but leaves a spurious space where it's not
needed.

Alternative C will cause some code-churn, but is also formally the most
correct one. It might also save someones sanity if they are trying to
fit a line into a 80 or 100 character limit.

My preference is for, in order: C > B > A.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50621; Package emacs. (Thu, 16 Sep 2021 15:18:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: Manuel Uberti <manuel.uberti <at> inventati.org>, 50621 <at> debbugs.gnu.org
Subject: Re: bug#50621: 28.0.50; Flymake wrong message about y-or-n-p
Date: Thu, 16 Sep 2021 17:17:00 +0200
Stefan Kangas <stefan <at> marxist.se> writes:

> Alternative C will cause some code-churn, but is also formally the most
> correct one. It might also save someones sanity if they are trying to
> fit a line into a 80 or 100 character limit.
>
> My preference is for, in order: C > B > A.

I think C is too ambitious -- there's code out-of-tree that needs to
work in a wide range of Emacs versions, so they can't remove the
trailing space.  So I like B (i.e.., check that there's "\\? *" at the
end).

(And then we can remove trailing spaces in-tree at will.)

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50621; Package emacs. (Thu, 16 Sep 2021 20:06:01 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Manuel Uberti <manuel.uberti <at> inventati.org>, 50621 <at> debbugs.gnu.org
Subject: Re: bug#50621: 28.0.50; Flymake wrong message about y-or-n-p
Date: Thu, 16 Sep 2021 13:05:01 -0700
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Stefan Kangas <stefan <at> marxist.se> writes:
>
>> Alternative C will cause some code-churn, but is also formally the most
>> correct one. It might also save someones sanity if they are trying to
>> fit a line into a 80 or 100 character limit.
>>
>> My preference is for, in order: C > B > A.
>
> I think C is too ambitious -- there's code out-of-tree that needs to
> work in a wide range of Emacs versions, so they can't remove the
> trailing space.  So I like B (i.e.., check that there's "\\? *" at the
> end).

Sounds good.  How about the attached patch?
[0001-checkdoc-y-or-n-p-no-longer-needs-space.patch (text/x-diff, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50621; Package emacs. (Fri, 17 Sep 2021 13:56:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: Manuel Uberti <manuel.uberti <at> inventati.org>, 50621 <at> debbugs.gnu.org
Subject: Re: bug#50621: 28.0.50; Flymake wrong message about y-or-n-p
Date: Fri, 17 Sep 2021 15:55:05 +0200
Stefan Kangas <stefan <at> marxist.se> writes:

> Sounds good.  How about the attached patch?

Looks good to me.

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




Reply sent to Stefan Kangas <stefan <at> marxist.se>:
You have taken responsibility. (Fri, 17 Sep 2021 20:42:02 GMT) Full text and rfc822 format available.

Notification sent to Manuel Uberti <manuel.uberti <at> inventati.org>:
bug acknowledged by developer. (Fri, 17 Sep 2021 20:42:02 GMT) Full text and rfc822 format available.

Message #28 received at 50621-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 50621-done <at> debbugs.gnu.org, Manuel Uberti <manuel.uberti <at> inventati.org>
Subject: Re: bug#50621: 28.0.50; Flymake wrong message about y-or-n-p
Date: Fri, 17 Sep 2021 13:41:35 -0700
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Stefan Kangas <stefan <at> marxist.se> writes:
>
>> Sounds good.  How about the attached patch?
>
> Looks good to me.

Thanks, pushed to master as commit b6bff3ba79.

Closing this bug.  If anyone is still seeing problems, please report
back and we can re-open.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50621; Package emacs. (Sat, 18 Sep 2021 05:58:02 GMT) Full text and rfc822 format available.

Message #31 received at 50621-done <at> debbugs.gnu.org (full text, mbox):

From: Manuel Uberti <manuel.uberti <at> inventati.org>
To: Stefan Kangas <stefan <at> marxist.se>, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 50621-done <at> debbugs.gnu.org
Subject: Re: bug#50621: 28.0.50; Flymake wrong message about y-or-n-p
Date: Sat, 18 Sep 2021 07:57:17 +0200
On 17/09/21 22:41, Stefan Kangas wrote:
> Thanks, pushed to master as commit b6bff3ba79.
> 
> Closing this bug.  If anyone is still seeing problems, please report
> back and we can re-open.

Thank you, Stefan, checkdoc does not complain any more.

-- 
Manuel Uberti
www.manueluberti.eu




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 16 Oct 2021 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 191 days ago.

Previous Next


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