From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 09 20:11:22 2014 Received: (at submit) by debbugs.gnu.org; 10 Sep 2014 00:11:22 +0000 Received: from localhost ([127.0.0.1]:35778 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XRVVJ-0003YC-Eh for submit@debbugs.gnu.org; Tue, 09 Sep 2014 20:11:21 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38475) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XRVVH-0003Xp-F2 for submit@debbugs.gnu.org; Tue, 09 Sep 2014 20:11:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XRVV3-0003KE-4d for submit@debbugs.gnu.org; Tue, 09 Sep 2014 20:11:14 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:49731) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRVV3-0003K8-1F for submit@debbugs.gnu.org; Tue, 09 Sep 2014 20:11:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRVUt-0002IM-P2 for bug-guile@gnu.org; Tue, 09 Sep 2014 20:11:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XRVUk-00037x-Ij for bug-guile@gnu.org; Tue, 09 Sep 2014 20:10:55 -0400 Received: from mail-qc0-x22c.google.com ([2607:f8b0:400d:c01::22c]:65014) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRVUk-00037Y-E1 for bug-guile@gnu.org; Tue, 09 Sep 2014 20:10:46 -0400 Received: by mail-qc0-f172.google.com with SMTP id o8so18203379qcw.17 for ; Tue, 09 Sep 2014 17:10:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=ZAGtRF2oUr9601jkhi3uyu7BZQf5vYnXN0pUoB8WTh8=; b=efuNfoYc5Ts+GCkqZVDrfLblBkkQKItdJRTRfEU1vjJ2p4DeQiYorv8f9ISfWNkwpn MqMfdpgGf4WwDBU8XlM4ujDDjVENesmP0JdrDQMfqA0Ce40vYfHOr7a/IWM2SAI3e9H/ LjNQHetl651IKgqXEJYY2/LPi87dukouIi/MazBX4wcqGuamRhGbbjzwfoaoZ04Dpg61 Mlb1cBkyCiTLhECyBUDmY169WPnB9w93RGSwAMl/WPxKo1YvwTolAW/esMwlJ4V3De1O OkZGKQ+NYyAGphm5z4AIJ8fLPRZbozqa76fh6BTOtxRnNNaMhTpDDCQic8wf/vTJSc0v cZBg== X-Received: by 10.229.59.67 with SMTP id k3mr55776756qch.26.1410307842158; Tue, 09 Sep 2014 17:10:42 -0700 (PDT) Received: from callisto (c-68-81-204-146.hsd1.pa.comcast.net. [68.81.204.146]) by mx.google.com with ESMTPSA id o92sm5127493qgd.0.2014.09.09.17.10.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Sep 2014 17:10:41 -0700 (PDT) From: David Michael To: bug-guile@gnu.org Subject: [PATCH] guile-readline: Use an empty string if HOME is unset Date: Tue, 09 Sep 2014 20:13:33 -0400 Message-ID: <87lhpsbadu.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.8 (---) * guile-readline/ice-9/readline.scm (history-file): When the HOME environment variable is unset, use the empty string in its place. --- Hi, If a Guile program uses the readline module without setting HOME, it will fail due to string-append getting a #f argument. In particular, this necessitates workarounds when starting GNU dmd early in the boot process. To illustrate this, try: guile -c '(use-modules (ice-9 readline))(display "working\n")' And then: env -u HOME \ guile -c '(use-modules (ice-9 readline))(display "working\n")' Let me know if there is a better alternative for handling this case, and I can send another patch. Thanks. David guile-readline/ice-9/readline.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/guile-readline/ice-9/readline.scm b/guile-readline/ice-9/readline.scm index 02e68af..0979fd3 100644 --- a/guile-readline/ice-9/readline.scm +++ b/guile-readline/ice-9/readline.scm @@ -119,7 +119,8 @@ (define-once the-readline-port #f) (define-once history-variable "GUILE_HISTORY") -(define-once history-file (string-append (getenv "HOME") "/.guile_history")) +(define-once history-file + (string-append (or (getenv "HOME") "") "/.guile_history")) (define-public readline-port (let ((do (lambda (r/w) -- 1.9.3 From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 20 10:11:32 2014 Received: (at 18439) by debbugs.gnu.org; 20 Sep 2014 14:11:32 +0000 Received: from localhost ([127.0.0.1]:46793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XVLNr-00056E-5p for submit@debbugs.gnu.org; Sat, 20 Sep 2014 10:11:31 -0400 Received: from world.peace.net ([96.39.62.75]:49244) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XVLNo-000564-6p for 18439@debbugs.gnu.org; Sat, 20 Sep 2014 10:11:28 -0400 Received: from c-98-217-13-77.hsd1.ma.comcast.net ([98.217.13.77] helo=yeeloong.lan) by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1XVLNi-0006VX-6T; Sat, 20 Sep 2014 10:11:22 -0400 From: Mark H Weaver To: David Michael Subject: Re: bug#18439: [PATCH] guile-readline: Use an empty string if HOME is unset References: <87lhpsbadu.fsf@gmail.com> Date: Sat, 20 Sep 2014 10:09:26 -0400 In-Reply-To: <87lhpsbadu.fsf@gmail.com> (David Michael's message of "Tue, 09 Sep 2014 20:13:33 -0400") Message-ID: <87oaual6y1.fsf@yeeloong.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18439 Cc: 18439@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Hi David, David Michael writes: > * guile-readline/ice-9/readline.scm (history-file): When the HOME > environment variable is unset, use the empty string in its place. I would prefer to use "." in its place, instead of the empty string. Otherwise, the patch looks good to me. Can you send an updated patch? Thanks! Mark From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 20 10:43:31 2014 Received: (at 18439) by debbugs.gnu.org; 20 Sep 2014 14:43:31 +0000 Received: from localhost ([127.0.0.1]:46797 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XVLsp-0005ti-9x for submit@debbugs.gnu.org; Sat, 20 Sep 2014 10:43:31 -0400 Received: from mail-qa0-f46.google.com ([209.85.216.46]:43409) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XVLsl-0005tY-Mt for 18439@debbugs.gnu.org; Sat, 20 Sep 2014 10:43:28 -0400 Received: by mail-qa0-f46.google.com with SMTP id f12so3775155qad.5 for <18439@debbugs.gnu.org>; Sat, 20 Sep 2014 07:43:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=pgd+zo8ilZPNgz39f1yKPYx499NGYlfFtDxQrANESX8=; b=Yb8inv5Kv5WB+ydeshEzOZB4Khd2PODejmtu4jOIfjMxZXkgxMaLYcFXmvSB99pB5A Ca0lxWDRUVfQ+EZVnTSFx3KKeaqD9kn27nMJyWrChvxvl4zvX2+NEvV7Di2gU7xsw/dI j2gZyUlgX5phvug7Z2ndVc1Ynm+Ji3BNgie8DmY5V2vGLJirp8klUc2gpzAKuYmtDZrw ajExKN9QDsqaBNXsKsPm3vItStYjodmkTNu3M0g0nSBLGos02XOt4giwXwe8uuC/UZ42 va7z/NAf3fqwK2J6RKgCNiGbwByxw+wBUIGP4M9Ie+3OC+eqI3GOGnmC1ZFfkB7CpzJd gfzQ== X-Received: by 10.140.81.42 with SMTP id e39mr4577050qgd.60.1411224206778; Sat, 20 Sep 2014 07:43:26 -0700 (PDT) Received: from callisto (c-68-81-204-146.hsd1.pa.comcast.net. [68.81.204.146]) by mx.google.com with ESMTPSA id 96sm3743017qgf.20.2014.09.20.07.43.25 for <18439@debbugs.gnu.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Sep 2014 07:43:26 -0700 (PDT) From: David Michael To: 18439@debbugs.gnu.org Subject: [PATCH] guile-readline: Use the current directory if HOME is unset Date: Sat, 20 Sep 2014 10:43:21 -0400 Message-ID: <87r3z6qrna.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 18439 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) * guile-readline/ice-9/readline.scm (history-file): When the HOME environment variable is unset, use the current directory instead. --- guile-readline/ice-9/readline.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/guile-readline/ice-9/readline.scm b/guile-readline/ice-9/readline.scm index 02e68af..df2edaf 100644 --- a/guile-readline/ice-9/readline.scm +++ b/guile-readline/ice-9/readline.scm @@ -119,7 +119,8 @@ (define-once the-readline-port #f) (define-once history-variable "GUILE_HISTORY") -(define-once history-file (string-append (getenv "HOME") "/.guile_history")) +(define-once history-file + (string-append (or (getenv "HOME") ".") "/.guile_history")) (define-public readline-port (let ((do (lambda (r/w) -- 1.9.3 From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 21 23:28:38 2014 Received: (at 18439-done) by debbugs.gnu.org; 22 Sep 2014 03:28:38 +0000 Received: from localhost ([127.0.0.1]:47840 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XVuIn-00047D-VR for submit@debbugs.gnu.org; Sun, 21 Sep 2014 23:28:38 -0400 Received: from world.peace.net ([96.39.62.75]:50478) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XVuIk-00046y-Jc; Sun, 21 Sep 2014 23:28:35 -0400 Received: from c-24-62-95-23.hsd1.ma.comcast.net ([24.62.95.23] helo=yeeloong.lan) by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1XVuIe-0005T0-9U; Sun, 21 Sep 2014 23:28:28 -0400 From: Mark H Weaver To: David Michael Subject: Re: bug#18439: [PATCH] guile-readline: Use the current directory if HOME is unset References: <87lhpsbadu.fsf@gmail.com> <87r3z6qrna.fsf@gmail.com> Date: Sun, 21 Sep 2014 23:26:38 -0400 In-Reply-To: <87r3z6qrna.fsf@gmail.com> (David Michael's message of "Sat, 20 Sep 2014 10:43:21 -0400") Message-ID: <87bnq8l4i9.fsf@yeeloong.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18439-done Cc: 18439-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) severity 18439 wishlist tags 18439 notabug thanks David Michael writes: > * guile-readline/ice-9/readline.scm (history-file): When the HOME > environment variable is unset, use the current directory instead. > --- > guile-readline/ice-9/readline.scm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/guile-readline/ice-9/readline.scm b/guile-readline/ice-9/readline.scm > index 02e68af..df2edaf 100644 > --- a/guile-readline/ice-9/readline.scm > +++ b/guile-readline/ice-9/readline.scm > @@ -119,7 +119,8 @@ > (define-once the-readline-port #f) > > (define-once history-variable "GUILE_HISTORY") > -(define-once history-file (string-append (getenv "HOME") "/.guile_history")) > +(define-once history-file > + (string-append (or (getenv "HOME") ".") "/.guile_history")) > > (define-public readline-port > (let ((do (lambda (r/w) Pushed to the stable-2.0 branch, commit 3a3316e200ac49f0e8e9004c233747efd9f54a04. I'm closing this ticket now. Thanks! Mark From unknown Fri Aug 15 02:04:20 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 20 Oct 2014 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator