GNU bug report logs - #52785
29.0.50; user-full-name: "Chop off everything after the first comma"

Previous Next

Package: emacs;

Reported by: sds <at> gnu.org

Date: Fri, 24 Dec 2021 19:37:02 UTC

Severity: minor

Found in version 29.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 52785 in the body.
You can then email your comments to 52785 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#52785; Package emacs. (Fri, 24 Dec 2021 19:37:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to sds <at> gnu.org:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 24 Dec 2021 19:37:02 GMT) Full text and rfc822 format available.

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

From: Sam Steingold <sds <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; user-full-name: "Chop off everything after the first comma"
Date: Fri, 24 Dec 2021 14:35:00 -0500
Hi, 

Since at least 1996-12-08 (3415b0e9d2a), user-full-name has had the
following code:

--8<---------------cut here---------------start------------->8---
  /* Chop off everything after the first comma. */
  q = strchr (p, ',');
  full = make_string (p, q ? q - p : strlen (p));
--8<---------------cut here---------------end--------------->8---

The result is that when full name is specified in the system as
"Steingold, Sam", `user-full-name' returns "Steingold".

Are we really sure that this is still the intended behavior?
If yes, we might want to document it in the doc string and info.

Thank you.


In GNU Emacs 29.0.50 (build 4, x86_64-apple-darwin20.6.0, NS appkit-2022.60 Version 11.6.2 (Build 20G314))
 of 2021-12-20 built on 3c22fb11fdab.ant.amazon.com
Repository revision: 92ffe44834b8f77ee3f4d37edfdb19f30a376869
Repository branch: master
Windowing system distributor 'Apple', version 10.3.2022
System Description:  macOS 11.6.2

Configured using:
 'configure --with-imagemagick --with-mailutils --with-ns
 PKG_CONFIG_PATH=/usr/local/opt/libxml2/lib/pkgconfig:/usr/local/opt/imagemagick/lib/pkgconfig:/usr/local/opt/gnutls/lib/pkgconfig:/usr/local/opt/jansson/lib/pkgconfig:/usr/local/opt/libtiff/lib/pkgconfig:/usr/local/opt/libpng/lib/pkgconfig:/usr/local/opt/libjpeg/lib/pkgconfig:/usr/local/opt/freetype/lib/pkgconfig'

Configured features:
ACL GIF GMP GNUTLS IMAGEMAGICK JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY
KQUEUE NS PDUMPER PNG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP ZLIB

Important settings:
  value of $LANG: C
  locale-coding-system: utf-8-unix

-- 
Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.2022
http://childpsy.net http://calmchildstories.com http://steingoldpsychology.com
https://www.peaceandtolerance.org/ https://ij.org/ http://think-israel.org
recursion, n: See recursion.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52785; Package emacs. (Fri, 24 Dec 2021 19:53:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: sds <at> gnu.org
Cc: 52785 <at> debbugs.gnu.org
Subject: Re: bug#52785: 29.0.50;
 user-full-name: "Chop off everything after the first comma"
Date: Fri, 24 Dec 2021 21:52:16 +0200
> From: Sam Steingold <sds <at> gnu.org>
> Date: Fri, 24 Dec 2021 14:35:00 -0500
> 
> --8<---------------cut here---------------start------------->8---
>   /* Chop off everything after the first comma. */
>   q = strchr (p, ',');
>   full = make_string (p, q ? q - p : strlen (p));
> --8<---------------cut here---------------end--------------->8---
> 
> The result is that when full name is specified in the system as
> "Steingold, Sam", `user-full-name' returns "Steingold".
> 
> Are we really sure that this is still the intended behavior?

Yes, I think so.

> If yes, we might want to document it in the doc string and info.

Feel free to suggest a documentation patch.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52785; Package emacs. (Fri, 24 Dec 2021 20:05:02 GMT) Full text and rfc822 format available.

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

From: Sam Steingold <sds <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 52785 <at> debbugs.gnu.org
Subject: Re: bug#52785: 29.0.50; user-full-name: "Chop off everything after
 the first comma"
Date: Fri, 24 Dec 2021 15:04:38 -0500
> * Eli Zaretskii <ryvm <at> tah.bet> [2021-12-24 21:52:16 +0200]:
>
>> From: Sam Steingold <sds <at> gnu.org>
>> Date: Fri, 24 Dec 2021 14:35:00 -0500
>> 
>> --8<---------------cut here---------------start------------->8---
>>   /* Chop off everything after the first comma. */
>>   q = strchr (p, ',');
>>   full = make_string (p, q ? q - p : strlen (p));
>> --8<---------------cut here---------------end--------------->8---
>> 
>> The result is that when full name is specified in the system as
>> "Steingold, Sam", `user-full-name' returns "Steingold".
>> 
>> Are we really sure that this is still the intended behavior?
>
> Yes, I think so.

Why?

>> If yes, we might want to document it in the doc string and info.
>
> Feel free to suggest a documentation patch.

Sure, as soon as I understand the reason for this behavior (because it
has to be included in the doc!)

-- 
Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.2022
http://childpsy.net http://calmchildstories.com http://steingoldpsychology.com
https://ij.org/ https://ffii.org https://mideasttruth.com
Daddy, why doesn't this magnet pick up this floppy disk?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52785; Package emacs. (Fri, 24 Dec 2021 20:23:01 GMT) Full text and rfc822 format available.

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

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Sam Steingold <sds <at> gnu.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 52785 <at> debbugs.gnu.org
Subject: Re: bug#52785: 29.0.50; user-full-name: "Chop off everything after
 the first comma"
Date: Fri, 24 Dec 2021 21:22:00 +0100
See <https://en.wikipedia.org/wiki/Gecos_field>.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52785; Package emacs. (Fri, 24 Dec 2021 20:23:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: sds <at> gnu.org
Cc: 52785 <at> debbugs.gnu.org
Subject: Re: bug#52785: 29.0.50; user-full-name: "Chop off everything after
 the first comma"
Date: Fri, 24 Dec 2021 22:22:37 +0200
> From: Sam Steingold <sds <at> gnu.org>
> Cc: 52785 <at> debbugs.gnu.org
> Date: Fri, 24 Dec 2021 15:04:38 -0500
> 
> >> The result is that when full name is specified in the system as
> >> "Steingold, Sam", `user-full-name' returns "Steingold".
> >> 
> >> Are we really sure that this is still the intended behavior?
> >
> > Yes, I think so.
> 
> Why?

Because we have been doing that since 1996.

> > Feel free to suggest a documentation patch.
> 
> Sure, as soon as I understand the reason for this behavior (because it
> has to be included in the doc!)

It doesn't.  (I could hypothesize about the reasons, but I'd rather
not.)




Severity set to 'minor' from 'normal' Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Fri, 24 Dec 2021 23:19:02 GMT) Full text and rfc822 format available.

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 25 Dec 2021 07:40:01 GMT) Full text and rfc822 format available.

Notification sent to sds <at> gnu.org:
bug acknowledged by developer. (Sat, 25 Dec 2021 07:40:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 52785-done <at> debbugs.gnu.org, sds <at> gnu.org
Subject: Re: bug#52785: 29.0.50; user-full-name: "Chop off everything after
 the first comma"
Date: Sat, 25 Dec 2021 09:39:42 +0200
> From: Andreas Schwab <schwab <at> linux-m68k.org>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  52785 <at> debbugs.gnu.org
> Date: Fri, 24 Dec 2021 21:22:00 +0100
> 
> See <https://en.wikipedia.org/wiki/Gecos_field>.

Thanks, I've now updated the doc string with this information, and I'm
closing the bug.




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

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

Previous Next


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