From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sebastien Vauban Newsgroups: gmane.emacs.bugs Subject: bug#19251: 24.4; LANG not applied in shell command Date: Tue, 02 Dec 2014 10:57:21 +0100 Organization: Sebastien Vauban Message-ID: <867fyatlvi.fsf@example.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1417514312 13508 80.91.229.3 (2 Dec 2014 09:58:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 2 Dec 2014 09:58:32 +0000 (UTC) To: 19251-ubl+/3LiMTaZdePnXv/OxA@public.gmane.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Tue Dec 02 10:58:25 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XvkDx-0008Mv-Fw for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Dec 2014 10:58:25 +0100 Original-Received: from localhost ([::1]:35860 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvkDw-00023C-Vo for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Dec 2014 04:58:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvkDj-0001qk-N5 for bug-gnu-emacs-mXXj517/zsQ@public.gmane.org; Tue, 02 Dec 2014 04:58:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XvkDa-0002dT-Ml for bug-gnu-emacs-mXXj517/zsQ@public.gmane.org; Tue, 02 Dec 2014 04:58:11 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54195) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvkDa-0002dP-KZ for bug-gnu-emacs-mXXj517/zsQ@public.gmane.org; Tue, 02 Dec 2014 04:58:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XvkDa-0001Kg-8i for bug-gnu-emacs-mXXj517/zsQ@public.gmane.org; Tue, 02 Dec 2014 04:58:02 -0500 X-Loop: help-debbugs-mXXj517/zsQ@public.gmane.org Resent-From: Sebastien Vauban Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs-mXXj517/zsQ@public.gmane.org Resent-Date: Tue, 02 Dec 2014 09:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs-mXXj517/zsQ@public.gmane.org X-GNU-PR-Message: report 19251 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs-mXXj517/zsQ@public.gmane.org Original-Received: via spool by submit-ubl+/3LiMTaZdePnXv/OxA@public.gmane.org id=B.14175142755105 (code B ref -1); Tue, 02 Dec 2014 09:58:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 Dec 2014 09:57:55 +0000 Original-Received: from localhost ([127.0.0.1]:51408 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XvkDS-0001KF-Q0 for submit-ubl+/3LiMTaZdePnXv/OxA@public.gmane.org; Tue, 02 Dec 2014 04:57:55 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:51230) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XvkDQ-0001K6-VE for submit-ubl+/3LiMTaZdePnXv/OxA@public.gmane.org; Tue, 02 Dec 2014 04:57:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XvkDH-0002LO-KV for submit-ubl+/3LiMTaZdePnXv/OxA@public.gmane.org; Tue, 02 Dec 2014 04:57:52 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:54785) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvkDH-0002LK-ID for submit-ubl+/3LiMTaZdePnXv/OxA@public.gmane.org; Tue, 02 Dec 2014 04:57:43 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52868) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvkDB-00016L-Ct for bug-gnu-emacs-mXXj517/zsQ@public.gmane.org; Tue, 02 Dec 2014 04:57:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XvkD5-0002Jo-9T for bug-gnu-emacs-mXXj517/zsQ@public.gmane.org; Tue, 02 Dec 2014 04:57:37 -0500 Original-Received: from dd5e0353a.access.telenet.be ([213.224.53.58]:12122 helo=mail.missioncriticalit.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvkD5-0002Jb-33 for bug-gnu-emacs-mXXj517/zsQ@public.gmane.org; Tue, 02 Dec 2014 04:57:31 -0500 Original-Received: from MUNDANEUM.i-did-not-set--mail-host-address--so-tickle-me (unknown [10.10.10.51]) by mail.missioncriticalit.com (Postfix) with ESMTPS id 0EFE1500A23 for ; Tue, 2 Dec 2014 10:57:29 +0100 (CET) X-Url: Under construction... X-Archive: encrypt User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (windows-nt) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit-ubl+/3LiMTaZdePnXv/OxA@public.gmane.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs-mXXj517/zsQ@public.gmane.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Xref: news.gmane.org gmane.emacs.bugs:96792 Archived-At: Hello, I'm trying to automate the update of some Git project with: --8<---------------cut here---------------start------------->8--- (defun config-update () "Update config." (interactive) (message "Updating config...") (cd config--directory) (let ((ret (shell-command-to-string "LANG=3Den_US git pull --rebase"))) (if (string-match "Already up-to-date." ret) (message "Configuration already up-to-date.") (princ ret) (message "Configuration updated.")))) --8<---------------cut here---------------end--------------->8--- On my machine (Windows 8 with Cygwin), that works as expected. On one friend's machine (some Linux variant), whatever the answer of `git pull' (something new or nothing new), he will always have the impression that the project has just been updated: =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 Updating config... =E2=94=82 La branche courante master est =C3=A0 jour. =E2=94=82=20 =E2=94=82 Configuration updated. =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 This is because my function looks for the string "Already up-to-date" in Git's output, and his output is in French -- while I forced LANG to en_US. So, why is LANG not respected in `shell-command-to-string'? Best regards, Seb --=20 Sebastien Vauban