From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Still about frame title case [Windows] Date: Sun, 04 Nov 2018 14:59:46 +0200 Message-ID: <83k1ltdmm5.fsf@gnu.org> References: <27568754.1288532.1541323387866@mail.libero.it> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1541336332 17781 195.159.176.226 (4 Nov 2018 12:58:52 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 4 Nov 2018 12:58:52 +0000 (UTC) Cc: emacs-devel@gnu.org To: Angelo Graziosi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 04 13:58:48 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJHzK-0004V2-IV for ged-emacs-devel@m.gmane.org; Sun, 04 Nov 2018 13:58:46 +0100 Original-Received: from localhost ([::1]:58775 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJI1Q-0002sV-QZ for ged-emacs-devel@m.gmane.org; Sun, 04 Nov 2018 08:00:56 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59525) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJI0S-0002sG-JR for emacs-devel@gnu.org; Sun, 04 Nov 2018 07:59:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJI0P-0004MR-CK for emacs-devel@gnu.org; Sun, 04 Nov 2018 07:59:56 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56082) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJI0P-0004MN-8i; Sun, 04 Nov 2018 07:59:53 -0500 Original-Received: from [176.228.60.248] (port=3971 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gJI0O-0005YP-RS; Sun, 04 Nov 2018 07:59:53 -0500 In-reply-to: <27568754.1288532.1541323387866@mail.libero.it> (message from Angelo Graziosi on Sun, 4 Nov 2018 10:23:07 +0100 (CET)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:231005 Archived-At: > Date: Sun, 4 Nov 2018 10:23:07 +0100 (CET) > From: Angelo Graziosi > Cc: Eli Zaretskii > > More than an year ago we discussed about this > (http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00212.html) Doesn't the solution/workaround I proposed in http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00235.html work for you? > but now I notice a strange thing I want to report. > > When one manages packages (Options - Manage Emacs Packages), after it has updates the packages list [*], on the frame, near the Emacs icon, the string "emacs@COMPUTER_NAME" changes in "emacs@Computer_name", i.e. it respects the PC name case (what occurs on other GNU/Linux, for example). > > When the Packages buffer is closed, that string remains to "emacs@Computer_name" and return to "emacs@COMPUTER_NAME" only if one restarts Emacs... > > Maybe the strategy adopted by "Options - Manage Emacs Packages" could be used elsewhere so that also on Windows Emacs has the same behavior it has on other systems. There's nothing strange here: package.el connects to the ELPA repositories, so it initializes Winsock, after which the call to system-name will returns the name of your system in its original letter-case. If you for some reason don't like the original proposal I made back then, you could do in your .emacs something similar to what package.el does: call some function that connects to some net address (perhaps even localhost will do), then call system-name. The effect will be the same as the solution/workaround I proposed back then, because all that's needed is to do something that forces Emacs to initialize Winsock. The underlying problem is that normally Emacs calls system-name for the first time before Winsock is initialized, so gethostname cannot yet be called.