From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Felix Dietrich Newsgroups: gmane.emacs.help Subject: Re: terminal command with output in current buffer Date: Tue, 20 Jul 2021 14:55:24 +0200 Message-ID: <87eebtf8lf.fsf@sperrhaken.name> References: <87czrip6db.fsf@sperrhaken.name> <877dhqoxw6.fsf@sperrhaken.name> <87tukr3y7f.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4149"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 20 15:07:52 2021 Return-path: Envelope-to: geh-help-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 1m5pTT-0000uo-P6 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 20 Jul 2021 15:07:51 +0200 Original-Received: from localhost ([::1]:49566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5pTS-0002cJ-OO for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 20 Jul 2021 09:07:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51248) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5pHZ-00074W-FH for help-gnu-emacs@gnu.org; Tue, 20 Jul 2021 08:55:33 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.187]:57865) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5pHX-00004u-MP for help-gnu-emacs@gnu.org; Tue, 20 Jul 2021 08:55:33 -0400 Original-Received: from localhost ([89.12.111.241]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MC2o9-1lyRIq0xsj-00CURX for ; Tue, 20 Jul 2021 14:55:29 +0200 X-Provags-ID: V03:K1:awTpT7acoGm+WCJ1NLywoIvCu72n9UwqNDD1C0Vh1t/GD5e+tTU HvkcaBfRTAb8vUDgNCYLml32ULp9cM44WD673T8iy6rFLzolVz9zi3VeN6Ru3g2hordCzyk iRae8H8p9iNgBQqU1JYcMkTqqXb6Q6p1imP/lcJoWK4u8JJTUlMVn9ntdEEX9gt/hhQZ2Cj /V/9YhgYen+HvbPMFGNQA== X-UI-Out-Filterresults: notjunk:1;V03:K0:L7jN+uztLUQ=:/jFqfS7KkBDpIvrIqe4azJ F+m3E5SjvbPSlww2QwGXDr5k9sfRTK3LLEDnzQM91PGeKa30cndJXSfLgU2wuz1GbK+EnZHu4 45qPgaaTVAONW1pipj9VS7ub0u+yyguOVvx2Awe8JyqjKHXTCGGyCZsXln6aWLeE9prkjM9hs x+KOvyle5qQCl9dom8LWU7sroWOEWWLQGKCoEDVBiZ2y1SLIEN2TdNkWR/ogcZdKeW0Wmi+Qn eV05Xaw6F9rYYtc3SwopVQos5pfvZxOOEn+L3fjqWkQxE6uhdg+XZ4WNYsqGzqllmsAhzbOhj I6l+tXCjSvxTHxHUqDP0CDvgGxylSOgm3dIzSwFE9rH9ugRO7lL4Mk3L5h8ETJDEijfA3CHdQ o2O1n2kUCEBP7KYoklwvoXmRIvcdcKYWqFWgnZhrQikZqThYwrSRQZOXksunV4xh1Z8hpZvX+ eqA4hpfLwhZ98pjDJT9ifi5sVdRnYlg9tZrevl7o0rBoHJEcuXQUoAgb16pcGctnqyZCzUruS ZBtP3pUbqomVlr47wagZuF35to1H3Lt6IxAePCJTrg5Bda4LhudwdvyG1fSH90yZ0neZgCoPH KV01C7b7oNpqK/Ek0kQ4rtcn6z1bVVej5NxOZuX1FplRQ3O/kujpkkUZqqtHpknX6Dy77iAJo CaNPsztM06qGW8mESWAcvClLJvaCJOzkNSx2AslPaXDbdGz6j32SdFFSAefdi7PEGHTTQpr2C fvR8jJiqE4WZasZ6akImWG0WWG1gemr5GZRh3TykFwlJTX3dwgRODdrEIxhl3AA7OU9F2HxS Received-SPF: none client-ip=212.227.126.187; envelope-from=felix.dietrich@sperrhaken.name; helo=mout.kundenserver.de 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:131872 Archived-At: Emanuel Berg via Users list for the GNU Emacs text editor writes: > Felix Dietrich wrote: > >> (let ((read-result (read-from-minibuffer "Prompt: "))) >> (if (seq-empty-p read-result) >> (setq read-result "default-value"))) > > What? :P `setq' again... > > (let*((read-result (read-from-minibuffer "Prompt: ")) > (value (if (string=3D "" read-result) > "default-value" > read-result) )) > value) This is what=CA=BCs bothering you the most? ;) I have reread the part of t= he elisp manual about reading text from the minibuffer, and it suggests one =E2=80=9Cdo all minibuffer input as part of reading the arguments for a com= mand, in the =E2=80=98interactive=E2=80=99 specification.=E2=80=9D [1] Not direc= tly applicable to a stand-alone let snippet but relevant in the context of the thread (which involved reading user input for an interactive command). Footnotes: [1] (info "(elisp) Text from Minibuffer") --=20 Felix Dietrich