GNU bug report logs - #70230
30.0.50; [PATCH] * lisp/master.el (master-says): check nil parameter

Previous Next

Package: emacs;

Reported by: Lin Sun <sunlin7.mail <at> gmail.com>

Date: Sat, 6 Apr 2024 06:39:01 UTC

Severity: normal

Tags: patch

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

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 70230 in the body.
You can then email your comments to 70230 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#70230; Package emacs. (Sat, 06 Apr 2024 06:39:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lin Sun <sunlin7.mail <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 06 Apr 2024 06:39:01 GMT) Full text and rfc822 format available.

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

From: Lin Sun <sunlin7.mail <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; [PATCH] * lisp/master.el (master-says): check nil parameter
Date: Sat, 6 Apr 2024 00:05:29 +0000
[Message part 1 (text/plain, inline)]
Hi,

The `(master-says)' will trigger an unexpected error message with follow code:

(require 'master)
(master-says)

> Wrong type argument: stringp, nil

The patch tries checking the nil parameter before calling `get-buffer'
to avoid the unexpected err message.

Please help check it. Thanks.

Best regards
Lin
[0001-lisp-master.el-master-says-check-nil-parameter.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70230; Package emacs. (Sat, 06 Apr 2024 08:07:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lin Sun <sunlin7.mail <at> gmail.com>
Cc: 70230 <at> debbugs.gnu.org
Subject: Re: bug#70230: 30.0.50;
 [PATCH] * lisp/master.el (master-says): check nil parameter
Date: Sat, 06 Apr 2024 11:06:00 +0300
> From: Lin Sun <sunlin7.mail <at> gmail.com>
> Date: Sat, 6 Apr 2024 00:05:29 +0000
> 
> The `(master-says)' will trigger an unexpected error message with follow code:
> 
> (require 'master)
> (master-says)
> 
> > Wrong type argument: stringp, nil
> 
> The patch tries checking the nil parameter before calling `get-buffer'
> to avoid the unexpected err message.

Thanks, but "Slave buffer has disappeared" doesn't sound like a good
error message when master-of is nil, does it?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70230; Package emacs. (Sat, 06 Apr 2024 15:31:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lin Sun <sunlin7.mail <at> gmail.com>
Cc: 70230 <at> debbugs.gnu.org
Subject: Re: bug#70230: 30.0.50; [PATCH] * lisp/master.el (master-says): check
 nil parameter
Date: Sat, 06 Apr 2024 18:30:10 +0300
> From: Lin Sun <sunlin7.mail <at> gmail.com>
> Date: Sat, 6 Apr 2024 15:25:35 +0000
> Cc: 70230 <at> debbugs.gnu.org
> 
> On Sat, Apr 6, 2024 at 8:06 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > Thanks, but "Slave buffer has disappeared" doesn't sound like a good
> > error message when master-of is nil, does it?
> Totally, the message will confuse the user. I modified the patch and
> it checks the parameter `master-of' and gives a message "Slave buffer
> does not exist" when it's nil.

I think "Slave buffer does not exist" is not the best message, since
the slave master is simply undefined in that case.  A better message
would be something like "Current buffer is not a master of any other
buffer".




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70230; Package emacs. (Sat, 06 Apr 2024 17:10:05 GMT) Full text and rfc822 format available.

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

From: Lin Sun <sunlin7.mail <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 70230 <at> debbugs.gnu.org
Subject: Re: bug#70230: 30.0.50; [PATCH] * lisp/master.el (master-says): check
 nil parameter
Date: Sat, 6 Apr 2024 15:25:35 +0000
[Message part 1 (text/plain, inline)]
Hi Eli,

On Sat, Apr 6, 2024 at 8:06 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> Thanks, but "Slave buffer has disappeared" doesn't sound like a good
> error message when master-of is nil, does it?
Totally, the message will confuse the user. I modified the patch and
it checks the parameter `master-of' and gives a message "Slave buffer
does not exist" when it's nil.

Please help review again. Thanks.
[0001-lisp-master.el-master-says-check-nil-parameter.patch (application/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70230; Package emacs. (Sat, 06 Apr 2024 21:28:02 GMT) Full text and rfc822 format available.

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

From: Lin Sun <sunlin7.mail <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 70230 <at> debbugs.gnu.org
Subject: Re: bug#70230: 30.0.50; [PATCH] * lisp/master.el (master-says): check
 nil parameter
Date: Sat, 6 Apr 2024 21:26:49 +0000
[Message part 1 (text/plain, inline)]
Hi Eli,

Yes, the "Current buffer is not a master of any other buffer" is more accurate.
The changed message path is attached.

Thank you so much!
[0001-lisp-master.el-master-says-check-nil-parameter.patch (text/x-patch, attachment)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sun, 07 Apr 2024 06:18:02 GMT) Full text and rfc822 format available.

Notification sent to Lin Sun <sunlin7.mail <at> gmail.com>:
bug acknowledged by developer. (Sun, 07 Apr 2024 06:18:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lin Sun <sunlin7.mail <at> gmail.com>
Cc: 70230-done <at> debbugs.gnu.org
Subject: Re: bug#70230: 30.0.50; [PATCH] * lisp/master.el (master-says): check
 nil parameter
Date: Sun, 07 Apr 2024 09:17:00 +0300
> From: Lin Sun <sunlin7.mail <at> gmail.com>
> Date: Sat, 6 Apr 2024 21:26:49 +0000
> Cc: 70230 <at> debbugs.gnu.org
> 
> Yes, the "Current buffer is not a master of any other buffer" is more accurate.
> The changed message path is attached.

Thanks, installed on master, and closing the bug.

P.S. Please in the future format the commit log message according to
our conventions, and also mention the bug number when known.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70230; Package emacs. (Sun, 07 Apr 2024 14:05:02 GMT) Full text and rfc822 format available.

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

From: Lin Sun <sunlin7.mail <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 70230-done <at> debbugs.gnu.org
Subject: Re: bug#70230: 30.0.50; [PATCH] * lisp/master.el (master-says): check
 nil parameter
Date: Sun, 7 Apr 2024 14:03:52 +0000
Yes, will do that. Thank you!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 06 May 2024 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 10 days ago.

Previous Next


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