From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#61667: 29.0.60; Failure to redisplay Date: Tue, 18 Apr 2023 03:28:16 +0300 Message-ID: <9873eea7-a782-bf25-90a6-7f41f123f01a@yandex.ru> References: <04d7cb31-684c-07c0-ee7b-503514fc1a85@yandex.ru> <87sfeozn8f.fsf@yahoo.com> <87o7pczlsq.fsf@yahoo.com> <43d50d6a-1eb0-cd42-0479-3f9d4d74904a@yandex.ru> <87ilfkyorf.fsf@yahoo.com> <8f4df0d7-eb1a-379a-db03-314f2c93743b@yandex.ru> <87a60vztad.fsf@yahoo.com> <14405ac4f8f101c35628@heytings.org> <60c92936-2a75-a254-145a-6a0a1656a645@yandex.ru> <8eda4f1e-233e-4963-1b1d-75945eca01d4@yandex.ru> <874jr2y7qk.fsf@yahoo.com> <66e8b8a4-fa14-800e-659c-d8db1134d71a@yandex.ru> <83r0skbc20.fsf@gnu.org> <23d8f88d-c694-faa0-93f6-1a282443b27d@yandex.ru> <83cz44asoz.fsf@gnu.org> <7d0c9615-a5ae-651d-dab5-ba767454b7bf@yandex.ru> <834jpfby3t.fsf@gnu.org> <1f68a588-8db1-40e6-8f62-f5032a759725@app.fastmail.com> <83zg77agcn.fsf@gnu.org> <57ea9d35-e64e-4cfb-b39f-370a02742884@app.fastmail.com> <83wn2babyq.fsf@gnu.org> <108c97ff-419c-8ef4-f0d0-1417df4bd37e@yandex.ru> <83pm839rai.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26523"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Cc: luangruo@yahoo.com, 61667@debbugs.gnu.org, gregory@heytings.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 18 02:29:29 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1poZDq-0006iA-Fc for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Apr 2023 02:29:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1poZDU-0007Pn-GE; Mon, 17 Apr 2023 20:29:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1poZDT-0007PR-2R for bug-gnu-emacs@gnu.org; Mon, 17 Apr 2023 20:29:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1poZDS-0006Bl-PX for bug-gnu-emacs@gnu.org; Mon, 17 Apr 2023 20:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1poZDS-00053I-AP for bug-gnu-emacs@gnu.org; Mon, 17 Apr 2023 20:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Apr 2023 00:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61667 X-GNU-PR-Package: emacs Original-Received: via spool by 61667-submit@debbugs.gnu.org id=B61667.168177770819379 (code B ref 61667); Tue, 18 Apr 2023 00:29:02 +0000 Original-Received: (at 61667) by debbugs.gnu.org; 18 Apr 2023 00:28:28 +0000 Original-Received: from localhost ([127.0.0.1]:57216 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1poZCu-00052V-1h for submit@debbugs.gnu.org; Mon, 17 Apr 2023 20:28:28 -0400 Original-Received: from forward500c.mail.yandex.net ([178.154.239.208]:50692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1poZCr-00052I-Cf for 61667@debbugs.gnu.org; Mon, 17 Apr 2023 20:28:27 -0400 Original-Received: from mail-nwsmtp-smtp-production-main-92.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-92.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:131b:0:640:f0f5:0]) by forward500c.mail.yandex.net (Yandex) with ESMTP id 5C2495EB9F; Tue, 18 Apr 2023 03:28:23 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-92.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id KSP7Xs4DXeA0-q6hJJNO5; Tue, 18 Apr 2023 03:28:22 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1681777702; bh=l8rgIeSPCOkCbmhsLfyubSZUZP+Qj5SzW7AanJGkHoI=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=H9k1JcobQb4dnEjPJkHcRyRYIvCWLkl16hoJkJZR6oC1pZ7g76rfUGBJAJ5KaYYew 4tXoy2N6+Wr7Zi1teE4fYBcF8V8/EjewI5jXkwyJdB1x+0afPscgiw8sWdVDMnK4dn za/dXNA+46gXLFm9ribji7WRJyKo5X3FaKp/XoEY= Authentication-Results: mail-nwsmtp-smtp-production-main-92.myt.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id 6E56627C005B; Mon, 17 Apr 2023 20:28:20 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 17 Apr 2023 20:28:20 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdeljedgfeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegughhuthhovheshigrnhguvgigrdhruheqnecuggftrfgrth htvghrnheptdffgeegkeelteevtdekleethfeftdduvdegkedtkedujefhfedtveeftdff udevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hguhhtohhvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqddufeeffeelleeh hedvqddvleegjeejjeejiedqughguhhtohhvpeephigrnhguvgigrdhruhesfhgrshhtmh grihhlrdgtohhm X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 17 Apr 2023 20:28:18 -0400 (EDT) Content-Language: en-US In-Reply-To: <83pm839rai.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:260199 Archived-At: On 17/04/2023 05:27, Eli Zaretskii wrote: >> Date: Mon, 17 Apr 2023 00:17:45 +0300 >> Cc: luangruo@yahoo.com, 61667@debbugs.gnu.org, gregory@heytings.org >> From: Dmitry Gutov >> >> I was kind of expecting xargs to know MS-Windows' command line limits, >> i.e. from its manual: >> >> The largest allowed >> value is system-dependent, and is calculated as >> the argument length limit for exec, less the size of your environment, >> less 2048 bytes of headroom. ... xargs automatically adapts to tighter >> constraints. > > Suggest to take this up with the developers of GNU Findutils. I imagine they'd prefer a report from somebody using the platform, who can follow up with details and so on. Anyway, if the bug is there, we can of course work around it. Does this work? BTW, it seems like grep-compute-defaults should also insert '-s 10000' somewhere when xargs is used. Or is it usually not used on Windows? diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index d77024136d0..10b32fa629d 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -1820,16 +1820,22 @@ xref-matches-in-directory ;; Ripgrep gets jumbled output, though, even with --line-buffered. ;; But Grep seems to be stable. Even without --line-buffered. (defcustom xref-search-program-alist - '((grep - . - ;; '-s' because 'git ls-files' can output broken symlinks. - "xargs -0 grep --null -snHE -e ") - (ripgrep - . - ;; '!*/' is there to filter out dirs (e.g. submodules). - "xargs -0 rg --null -nH --no-heading --no-messages -g '!*/' -e " - ) - (ugrep . "xargs -0 ugrep --null -ns -e ")) + (let ((xargs-max-chars + (and (memq system-type '(windows-nt ms-dos)) + "-s 10000 "))) + `((grep + . + ;; '-s' because 'git ls-files' can output broken symlinks. + ,(concat "xargs -0 " xargs-max-chars "grep --null -snHE -e ")) + (ripgrep + . + ;; '!*/' is there to filter out dirs (e.g. submodules). + ,(concat "xargs -0 " + xargs-max-chars + "rg --null -nH --no-heading --no-messages -g '!*/' -e ")) + (ugrep + . + ,(concat "xargs -0 " xargs-max-chars "ugrep --null -ns -e ")))) "Association list mapping program identifiers to command templates. Program identifier should be a symbol, named after the search program.