From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rob Sargent Newsgroups: gmane.emacs.help Subject: Re: sql-postgres connect using URL Date: Fri, 28 Oct 2022 06:42:02 -0600 Message-ID: <4096c4b1-4490-d8ec-77a8-723e08dae624@xmission.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25166"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 28 14:42:46 2022 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 1ooOhA-0006Iz-UG for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 28 Oct 2022 14:42:44 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooOgj-0001OO-6r; Fri, 28 Oct 2022 08:42:17 -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 1ooOgg-0001NF-HS for help-gnu-emacs@gnu.org; Fri, 28 Oct 2022 08:42:14 -0400 Original-Received: from out01.mta.xmission.com ([166.70.13.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooOge-00062r-72 for help-gnu-emacs@gnu.org; Fri, 28 Oct 2022 08:42:13 -0400 Original-Received: from in02.mta.xmission.com ([166.70.13.52]:36136) by out01.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1ooOgX-009Jop-9m for help-gnu-emacs@gnu.org; Fri, 28 Oct 2022 06:42:05 -0600 Original-Received: from [155.98.131.0] (port=4715 helo=[10.128.56.136]) by in02.mta.xmission.com with esmtpa (Exim 4.93) (envelope-from ) id 1ooOgW-00GrvW-LL for help-gnu-emacs@gnu.org; Fri, 28 Oct 2022 06:42:04 -0600 Content-Language: en-CA In-Reply-To: X-XM-SPF: eid=1ooOgW-00GrvW-LL; ; ; mid=<4096c4b1-4490-d8ec-77a8-723e08dae624@xmission.com>; ; ; hst=in02.mta.xmission.com; ; ; ip=155.98.131.0; ; ; frm=rsargent@xmission.com; ; ; spf=softfail X-XM-AID: U2FsdGVkX19qFuIDiYn+Gr40X5xyKXRjKmuYpc8rB/8= X-SA-Exim-Connect-IP: 155.98.131.0 X-SA-Exim-Mail-From: rsargent@xmission.com X-SA-Exim-Version: 4.2.1 (built Sat, 08 Feb 2020 21:53:50 +0000) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Received-SPF: pass client-ip=166.70.13.231; envelope-from=rsargent@xmission.com; helo=out01.mta.xmission.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "help-gnu-emacs" Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:140464 Archived-At: On 10/28/22 01:05, Jean Louis wrote: > * Rob Sargent [2022-10-28 08:37]: >> But question becomes How to stop emacs from prompting for all the usual args >> (host, etc). > I have just tried this and it opens buffer straight without asking: > > (let ((buffer (generate-new-buffer "*PostgreSQL*"))) > (apply #'make-comint-in-buffer "psql" buffer "psql" nil) > (switch-to-buffer buffer)) > > You can make function out of it. I also use ~/.pgpass if it matters. > > `apply' is there if you wish to replace the last `nil' with `psql' > arguments. > That does look promising!  Thank you.