From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.devel Subject: Re: grep-command: Ignore case if case-fold-search is non-nil Date: Sun, 18 Sep 2016 19:30:20 +0900 (JST) Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Trace: blaine.gmane.org 1474194735 28585 195.159.176.226 (18 Sep 2016 10:32:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 18 Sep 2016 10:32:15 +0000 (UTC) User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: Emacs developers , Tino Calancha To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 18 12:32:11 2016 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 1blZOG-0006Wm-Mb for ged-emacs-devel@m.gmane.org; Sun, 18 Sep 2016 12:32:04 +0200 Original-Received: from localhost ([::1]:49439 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1blZOE-0007gL-Mg for ged-emacs-devel@m.gmane.org; Sun, 18 Sep 2016 06:32:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51971) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1blZNh-0007fy-Aq for emacs-devel@gnu.org; Sun, 18 Sep 2016 06:31:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1blZNd-0002So-6Q for emacs-devel@gnu.org; Sun, 18 Sep 2016 06:31:28 -0400 Original-Received: from mail-pa0-f54.google.com ([209.85.220.54]:34562) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1blZNd-0002SO-0V for emacs-devel@gnu.org; Sun, 18 Sep 2016 06:31:25 -0400 Original-Received: by mail-pa0-f54.google.com with SMTP id wk8so39277983pab.1 for ; Sun, 18 Sep 2016 03:31:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=hYMmKVT8ZTRTdCp2Ea3tO+MaRmyRzUuZvyYBCw3Amng=; b=q++6R/UV5oh3IuxPdvefWoIJRzHNq+b6BGKb+L5wA8BiNHsjZlgtEy8jTJyY/fi2Di KxDvL95pqtXeJjDJEW7AHY0JvJQ5BNJDpCh8oCPeF68J7IbJZS9feaJA8ktWKjwYIWQb M69hngQRsNSqQ2gNgROROBeOE7DRu4GO+hg+isFzNnyhOIO7SQhb/dHgZ69rJolqhLOH dj0GmMLKieuGYRtLTiZF/zIUd32Zv/EC0M0PVk2sdm4QazuHhMMOtIPYusKujDji0q2I 3IYhk2K79MeUeV5pe7NDTd2Ezo58yNXzAnuhCX8dFGfORKPQKhvJOTen2hf0fmqxOoJ6 Wi7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=hYMmKVT8ZTRTdCp2Ea3tO+MaRmyRzUuZvyYBCw3Amng=; b=ImSIw0YN8/d2Hm63UVlcm4dhqzAJMW1KgbhQFOz9nwfdWPuZ0KGLKRuw33loUbtrlQ TzAI0urJQ7la5SRoiPpt88gBLfvFKPXrzalZ8ILsAAotd/86S+HOc0rMODbthdcjysNt PNX7J3QQpjCeSou6pN1UZzuW35jnooYfkQ/RXAgOLp6VrI74pogcMTI4jRw2as+jOaeJ Lq0dst+IFKkOHWtRnCv3DaOuTw/EL/7Gl+JsXkTTxXYZLWfvWlC6QZLSE2Y0XR+SD0A0 8oqYohGn/PJ8OjgPWKI46tSJksxrGbaZlURlbosx91yAVdb6NCV9VXQxSIkOSNM44dfP 9mGQ== X-Gm-Message-State: AE9vXwOXtOvSRdzMqPfdWaX+0YWqalhhFtR7S5BgnLp5pw8UF4qqSq5E/WO77uC2c8qO6w== X-Received: by 10.66.222.202 with SMTP id qo10mr37334141pac.76.1474194624014; Sun, 18 Sep 2016 03:30:24 -0700 (PDT) Original-Received: from calancha-pc (57.92.100.220.dy.bbexcite.jp. [220.100.92.57]) by smtp.gmail.com with ESMTPSA id bl10sm23746429pab.46.2016.09.18.03.30.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Sep 2016 03:30:23 -0700 (PDT) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.220.54 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:207534 Archived-At: On Sun, 18 Sep 2016, Dmitry Gutov wrote: > On 18.09.2016 12:31, Tino Calancha wrote: > >> Do you think `grep-compute-defaults' should add '-i', i.e., ignore case, >> in the default `grep-command' when `case-fold-search' is non-nil? >> Option '-i' is specified by POSIX, do we need to check if `grep-program' >> support it? > > grep-options is used in both grep-template and grep-find-template. > > And they both get "-i" inserted into later, in grep-expand-template. Thank you. Tha's right: `rgrep' and `lgrep' default to case _insensitive_ search; but `grep-find' defaults to case _sensitive_ search. emacs -Q M-: (dired (concat source-directory "/lisp")) RET M-x: lgrep RET undid RET replace.el RET RET ;; Found a match (same for rgrep) M-x: grep-find RET ;; show a case sensitive default command as follows: find . -type f -exec grep --color -nH -e \{\} + I would suggest to be instead: find . -type f -exec grep --color -nHi -e \{\} + that would be consistent with defaults for `rgrep' and `lgrep'. What do you think? Tino