From unknown Sun Jun 22 20:57:04 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#5928 <5928@debbugs.gnu.org> To: bug#5928 <5928@debbugs.gnu.org> Subject: Status: grep.el: Incorrect processing of host-default settings in grep-compute-defaults Reply-To: bug#5928 <5928@debbugs.gnu.org> Date: Mon, 23 Jun 2025 03:57:04 +0000 retitle 5928 grep.el: Incorrect processing of host-default settings in grep= -compute-defaults reassign 5928 emacs submitter 5928 Christoph severity 5928 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 11 13:01:44 2010 Received: (at submit) by debbugs.gnu.org; 11 Apr 2010 17:01:44 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O10XX-0004wi-Bs for submit@debbugs.gnu.org; Sun, 11 Apr 2010 13:01:43 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O10VS-0004vL-69 for submit@debbugs.gnu.org; Sun, 11 Apr 2010 12:59:34 -0400 Received: from lists.gnu.org ([199.232.76.165]:39906) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1O10VN-0004Xd-K7 for submit@debbugs.gnu.org; Sun, 11 Apr 2010 12:59:29 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O10VN-0002Wv-9m for bug-gnu-emacs@gnu.org; Sun, 11 Apr 2010 12:59:29 -0400 Received: from [140.186.70.92] (port=49952 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O10VL-0002VS-Gb for bug-gnu-emacs@gnu.org; Sun, 11 Apr 2010 12:59:28 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.0 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O10VK-0006Tt-6i for bug-gnu-emacs@gnu.org; Sun, 11 Apr 2010 12:59:27 -0400 Received: from mail-pz0-f198.google.com ([209.85.222.198]:50061) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O10VJ-0006TZ-8P for bug-gnu-emacs@gnu.org; Sun, 11 Apr 2010 12:59:26 -0400 Received: by pzk36 with SMTP id 36so3717054pzk.24 for ; Sun, 11 Apr 2010 09:59:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=0iU64rYvYR1S7gVJZowRmc4gxdIu9uD80tNTLHCbf9U=; b=w6xHKlNETJ5qT6zzc0C/1cNzYV5ZOE6812RspmZxr6tFf34SAGWdGhaw2f04Y4bSZY QJ2YJ7zeUtLg/swdF7EgeGISjXSj9M0w8DXc3IqABdYqf1xGmcAMCgpcUYAgawwsx8xy 74NVUsHXujhGRJSjOqCEIt/AYJPfdf3LMtmjM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=xFbeHDPXmU7BWUzx+GCScRQZPWGb7g4XlafKtMlIfkyr7GybP/5puGxwo46DpsQdWQ 88miW+Wa4Y4g2CKusMIOk1QcHPOGoZ6qODcpGPmcvg1bz8lf/aGny7+evV6GYo/3YkTq 7XG54nub/MevczzX4XHQ/1J0Yv7tRJEBXrEoY= Received: by 10.114.248.20 with SMTP id v20mr2331026wah.65.1271005163538; Sun, 11 Apr 2010 09:59:23 -0700 (PDT) Received: from [192.168.1.4] (97-122-120-123.hlrn.qwest.net [97.122.120.123]) by mx.google.com with ESMTPS id 20sm3243477pzk.7.2010.04.11.09.59.21 (version=SSLv3 cipher=RC4-MD5); Sun, 11 Apr 2010 09:59:22 -0700 (PDT) Message-ID: <4BC1FFE8.6040500@gmail.com> Date: Sun, 11 Apr 2010 10:59:20 -0600 From: Christoph User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: grep.el: Incorrect processing of host-default settings in grep-compute-defaults Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 11 Apr 2010 13:01:42 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) grep.el, bzr revision 99871, line 515: (set setting (or (cadr (assq setting host-defaults)) (cadr (assq setting defaults))))) Value of host-defaults can be nil, e.g. for grep-use-null-device. In this case, cadr returns nil and the other branch of the or is executed, assigning the value from defaults to the setting and effectively discarding the value from host-defaults. The following patch fixes this issue: === modified file 'lisp/progmodes/grep.el' --- lisp/progmodes/grep.el 2010-01-31 21:47:47 +0000 +++ lisp/progmodes/grep.el 2010-04-08 00:11:28 +0000 @@ -513,8 +513,8 @@ grep-find-template grep-find-use-xargs grep-highlight-matches)) (set setting - (or (cadr (assq setting host-defaults)) - (cadr (assq setting defaults))))) + (cadr (or (assq setting host-defaults) + (assq setting defaults))))) (unless (or (not grep-use-null-device) (eq grep-use-null-device t)) (setq grep-use-null-device From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 14 11:34:50 2010 Received: (at 5928) by debbugs.gnu.org; 14 Apr 2010 15:34:50 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O24c6-00016m-5F for submit@debbugs.gnu.org; Wed, 14 Apr 2010 11:34:50 -0400 Received: from pantheon-po33.its.yale.edu ([130.132.50.94]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O24c3-00016f-VK for 5928@debbugs.gnu.org; Wed, 14 Apr 2010 11:34:48 -0400 Received: from furry (dhcp128036014140.central.yale.edu [128.36.14.140]) (authenticated bits=0) by pantheon-po33.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o3EFYgO1005486 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 14 Apr 2010 11:34:42 -0400 Received: by furry (Postfix, from userid 1000) id BAD17C055; Wed, 14 Apr 2010 11:34:42 -0400 (EDT) From: Chong Yidong To: Christoph Subject: Re: grep.el: Incorrect processing of host-default settings in grep-compute-defaults Date: Wed, 14 Apr 2010 11:34:42 -0400 Message-ID: <87pr223v59.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 5928 Cc: 5928@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) > grep.el, bzr revision 99871, line 515: > > (set setting > (or (cadr (assq setting host-defaults)) > (cadr (assq setting defaults))))) > > Value of host-defaults can be nil, e.g. for grep-use-null-device. In > this case, cadr returns nil and the other branch of the or is > executed, assigning the value from defaults to the setting and > effectively discarding the value from host-defaults. > > The following patch fixes this issue: Thanks. The patch looks clearly correct, and I've committed it. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 14 11:34:59 2010 Received: (at control) by debbugs.gnu.org; 14 Apr 2010 15:34:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O24cF-00016x-H4 for submit@debbugs.gnu.org; Wed, 14 Apr 2010 11:34:59 -0400 Received: from pantheon-po25.its.yale.edu ([130.132.50.119]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O24cE-00016s-IY for control@debbugs.gnu.org; Wed, 14 Apr 2010 11:34:59 -0400 Received: from furry (dhcp128036014140.central.yale.edu [128.36.14.140]) (authenticated bits=0) by pantheon-po25.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o3EFYrdo014733 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Wed, 14 Apr 2010 11:34:54 -0400 Received: by furry (Postfix, from userid 1000) id E356AC055; Wed, 14 Apr 2010 11:34:53 -0400 (EDT) From: Chong Yidong To: control@debbugs.gnu.org Subject: close 5928 Date: Wed, 14 Apr 2010 11:34:53 -0400 Message-ID: <87mxx63v4y.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) close 5928 thanks From unknown Sun Jun 22 20:57:04 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 13 May 2010 11:24:03 +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