From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Angelo Graziosi Newsgroups: gmane.emacs.devel Subject: Re: Visiting a set of files listed in a file Date: Sat, 9 Apr 2022 13:29:51 +0200 (CEST) Message-ID: <1433095891.1760627.1649503791059@mail1.libero.it> References: <912809244.1719139.1649496689299@mail1.libero.it> <83sfqm8tlx.fsf@gnu.org> <1363320088.1756370.1649499336798@mail1.libero.it> <83r1668rqw.fsf@gnu.org> <1652965113.1759397.1649502113677@mail1.libero.it> <83lewe8qcb.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20487"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 09 13:31:43 2022 Return-path: Envelope-to: ged-emacs-devel@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 1nd9Jd-00059O-Jd for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Apr 2022 13:31:41 +0200 Original-Received: from localhost ([::1]:34522 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nd9Jc-0008PC-0h for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Apr 2022 07:31:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41484) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nd9Hw-0007ZN-ON for emacs-devel@gnu.org; Sat, 09 Apr 2022 07:29:57 -0400 Original-Received: from smtp-18-i2.italiaonline.it ([213.209.12.18]:56969 helo=libero.it) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nd9Hu-0007Xm-5A for emacs-devel@gnu.org; Sat, 09 Apr 2022 07:29:55 -0400 Original-Received: from oxapps-32-142.iol.local ([10.101.8.188]) by smtp-18.iol.local with ESMTPA id d9Hrn1e0JuFKJd9Hrn7vCl; Sat, 09 Apr 2022 13:29:51 +0200 x-libjamoibt: 1601 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=libero.it; s=s2021; t=1649503791; bh=wDi1owCTpudIzJMd7uC6HYVlhcLuMLvyv7nKNw9QHFU=; h=From; b=fb4kmbEiiEzT7rc0t7aagtVdW2eyf6H4AYtI+76nz46rSzzS8v037tSXmQwePuA2a N+BzhUtEpRwJ9+Qflk7fD2ufrNm3kRFvAFNeOWs98wFrpFyTLmyosJ7t7+YJkJesKl i6AWJhzBOZPglyoX7kiA3V+c691k6gxikfp4F6aLXBbji71CzJUHrWQfDSZoM4tOSH 5a4QnRf1ALl+4zQTVkZQS3gqye5F4DOln0U+UPwuZX7TQiEcQa2UBNGPjHNhRphJd+ WQBAxR1lLvk6EYp3dhM2XruFCz/vJ9dIvqv2UOeOmvZ9O5KM083ANZ3Ys+asD1uaKf SfyL2ODb+8X0g== X-CNFS-Analysis: v=2.4 cv=LZH5VhTi c=1 sm=1 tr=0 ts=62516e2f cx=a_exe a=d5mb8ohLb9DErTKtnJ5n9A==:117 a=_dJfLzpt0bebRXjD:21 a=tjL3SZ24MMMA:10 a=IkcTkHD0fZMA:10 a=FPHzXidCtEMA:10 a=mDV3o1hIAAAA:8 a=uPZiAMpXAAAA:8 a=tXNp_sQbAAAA:8 a=qz3-4IIsjNmO68AjW7oA:9 a=QEXdDO2ut3YA:10 a=YYyvhrfdFPbuadpVEpuk:22 a=_FVE-zBwftR9WsbkzFJk:22 In-Reply-To: <83lewe8qcb.fsf@gnu.org> X-Priority: 3 Importance: Normal X-Mailer: Open-Xchange Mailer v7.10.5-Rev39 X-Originating-IP: 87.21.196.97 X-Originating-Client: open-xchange-appsuite x-libjamsun: t/YHNZMt3Oy7neKT3B/Zh6TF3qBXjSKN x-libjamv: j7C/rYRW60c= X-CMAE-Envelope: MS4xfGdN1NzRfgq+GVkGZZwHNmbFxy0vJbuyTm4m6UXUK+PMOifYMwe1e6/GwSvitkPkxMGkPLPCKMltMbft7530QHxVSydGKIU95afHEE24INORSsnMxB5i hmBr3AsSv4LO4YAInddRO0tzIBCk85mA0KinKd5g68MLrsJDwYRCJaP7Hf5sEAgM0JrCBUujd0skXR5IVw+UwUb+abHHpvLwGexFn2+EjYqZJQJq74TBfWGW Received-SPF: pass client-ip=213.209.12.18; envelope-from=angelo.g0@libero.it; helo=libero.it X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:288021 Archived-At: > Il 09/04/2022 13:10 Eli Zaretskii ha scritto: > > > > Date: Sat, 9 Apr 2022 13:01:53 +0200 (CEST) > > From: Angelo Graziosi > > Cc: emacs-devel@gnu.org > > > > > On Windows, you write a batch file that converts the file's contents > > > into a list of file names, then invokes Emacs with that list of file > > > names. > > > > It's not very practical... > > Why not? you need to write the batch file only once. > > > > > If I run the above from MSYS2 shell there is a mismatch with the HOME directory and consequently where Emacs reads the init file and where it saves the desktop file.. > > > > > > What do you mean by "mismatch with HOME directory"? > > > > For MSYS2 the HOME is /home/USER (C:\msys2inst\home\USER) for Emacs the HOME is in APPDATA\Roaming, or not? > > No, not if you define HOME in the environment. Then Emacs will follow > it no matter how you invoke it. > > > In any case I found this discussion: https://stackoverflow.com/questions/43225925/windows-cmd-pass-output-of-one-command-as-parameter-to-another > > > > from which I deduced this command: > > > > for /F "usebackq delims=" %A in (`type list-of-buffers`) do C:\\Emacs\bin\emacs.exe %A > > > > With it I have to close Emacs N times (it restarts automatically), where N is the number of file listed. The thing is just _tedious - epsilon_.. > > Yes, there's a lot of garbage advice on the Internet. Granted, that > is not what I meant. See "set /?" for one way of doing that. Following this discussion: https://superuser.com/questions/516999/passing-output-from-a-dos-command-as-arguments-to-another-command the best I was able to do is this: @echo off Setlocal EnableDelayedExpansion set fls= for /f "delims=" %%A in ('type list-of-buffers') do set fls=!fls! %%A C:\LocalApps\Emacs\bin\emacs.exe %fls% Anyway, I think that the best thing is for Emacs to equip itself with this feature...