From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#16005: inferior-lisp and filenames with spaces Date: Thu, 15 Jul 2021 10:00:23 +0200 Message-ID: <87tukwknvs.fsf@gnus.org> References: <5298F8AD.5020606@earthlink.net> <87zguop2du.fsf@gnus.org> <83czrk6p1r.fsf@gnu.org> <877dhsm4ra.fsf@gnus.org> <838s286nts.fsf@gnu.org> <87y2a8kp9h.fsf@gnus.org> <835yxc6mwu.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28145"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 16005@debbugs.gnu.org, sdlitvin@earthlink.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 15 10:01:26 2021 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 1m3wJC-0007CG-QV for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Jul 2021 10:01:26 +0200 Original-Received: from localhost ([::1]:48164 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3wJB-0003wQ-Os for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Jul 2021 04:01:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40950) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3wIo-0003oi-3I for bug-gnu-emacs@gnu.org; Thu, 15 Jul 2021 04:01:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35162) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m3wIn-00076u-Qk for bug-gnu-emacs@gnu.org; Thu, 15 Jul 2021 04:01:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m3wIn-0007dP-Lv for bug-gnu-emacs@gnu.org; Thu, 15 Jul 2021 04:01:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Jul 2021 08:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16005 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 16005-submit@debbugs.gnu.org id=B16005.162633603529293 (code B ref 16005); Thu, 15 Jul 2021 08:01:01 +0000 Original-Received: (at 16005) by debbugs.gnu.org; 15 Jul 2021 08:00:35 +0000 Original-Received: from localhost ([127.0.0.1]:46705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3wIM-0007cP-Q2 for submit@debbugs.gnu.org; Thu, 15 Jul 2021 04:00:35 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:54042) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3wIK-0007cB-QW for 16005@debbugs.gnu.org; Thu, 15 Jul 2021 04:00:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=yMTocUDKCgsalAsYtShBrlFDqk+pJc6V/Ne3olGH9Wc=; b=lVgl4u34ZkFt1fnKFv/3PhQdh2 xn0MKs3U016debSvV4HelEUnhmqTH+YC0VXmOmz+VBAIRReyGtYjKYWCfP1blVZ9izkUn09NCPrww 2aR0nwH5d4X0TNXezI3jHUOmTZr7Xs16T8AwMXOrc4bwhqboyAfZsaKB2FplF8YEl1Qk=; Original-Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3wIB-0005iG-Iz; Thu, 15 Jul 2021 10:00:26 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAIVBMVEUHBgQhHRcmIhtj WU9vZFlYT0YzLSZLQjqGe3JEPDP///+xykQdAAAAAWJLR0QKaND0VgAAAAlwSFlzAAAK8AAACvAB Qqw0mAAAAAd0SU1FB+UHDwccBIRLYxYAAAEMSURBVDjLvZOxasNADIalgA3dJKeQNb6hWU1osocS 6FgoGbo1Ga5kDvET5AW6FPq2uTub+KTzDR0aDeas75d0kmWA/zACHvezqZlSP7MhwDrxIzs1EnKi r7osVaLvpUga3GJzQFbB4Z4yF2cAxiBuMgaiOudAdKkE4O2lzgBVnP4OgIa0MYAAGg2gBxvdbD9R fNMAunMZAMqZ+GfhwUR8jwigEREhVdEs3Kb4NVJW7F4vNOzFYNPnl/NGgi74fXVcPn4KEGqU29P6 CUn24UWTj4Pdz8UQu5GWrVOzWsUAvl3T+kZeVx54706KOOVDy3XSmxfOWkMpcPb1kwPWjLkBf+18 FIC14379l93BrgCCGkwpEGsWAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIxLTA3LTE1VDA3OjI4OjA0 KzAwOjAwbvJEUgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMS0wNy0xNVQwNzoyODowNCswMDowMB+v /O4AAAAASUVORK5CYII= X-Now-Playing: Mr. Jones's _Sounds For The Mute_: "Continuous Sounds" In-Reply-To: <835yxc6mwu.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 15 Jul 2021 10:45:05 +0300") 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" Xref: news.gmane.io gmane.emacs.bugs:210013 Archived-At: Eli Zaretskii writes: >> Which is why I wondered whether we had a function to split based on >> shell(ish) syntax, which would be the optimal solution here... > > I think split-string-and-unquote is the only one that comes close. If > someone wants to emulate the shells we support, patches are welcome > (and then there will still be the problem to know the exact shell > which is being targeted in each use case). That's true. However, this reminded me that we do have pretty good completion in `M-!', so I thought we must have some tokenisation support somewhere, and indeed: `shell--parse-pcomplete-arguments' seems to fit the bill here. So adding a `shell-split-string' by wrapping that function seems like it should be possible. I'll poke some more at it; it doesn't quite seem to handle \ as expected in all circumstances. It handles "" and '' fine, as far as I can tell: 'foo"bar' zot -> (("foo\"bar" "zot") 1 11) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no