From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Mauger Newsgroups: gmane.emacs.bugs Subject: bug#24646: [PATCH] Complete the name of PostgreSQL databases Date: Mon, 7 Nov 2016 04:03:27 +0000 (UTC) Message-ID: <1356767530.1331843.1478491407910@mail.yahoo.com> References: <1476006914.21082.0@smtp.gmail.com> <1477224054.3087.0@smtp.gmail.com> <960375478.674241.1477259422133@mail.yahoo.com> <1478443615.12208.0@smtp.gmail.com> Reply-To: Michael Mauger NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1478491531 11179 195.159.176.226 (7 Nov 2016 04:05:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 7 Nov 2016 04:05:31 +0000 (UTC) Cc: "alex@gnu.org" , "24646@debbugs.gnu.org" <24646@debbugs.gnu.org> To: Simen =?UTF-8?Q?Heggest=C3=B8yl?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 07 05:05:26 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c3bBF-0008OP-BX for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 Nov 2016 05:05:09 +0100 Original-Received: from localhost ([::1]:50925 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3bBI-0004Pt-9p for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Nov 2016 23:05:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3bBB-0004OU-UX for bug-gnu-emacs@gnu.org; Sun, 06 Nov 2016 23:05:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c3bB8-0006Tg-Ey for bug-gnu-emacs@gnu.org; Sun, 06 Nov 2016 23:05:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60210) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c3bB8-0006SB-BW for bug-gnu-emacs@gnu.org; Sun, 06 Nov 2016 23:05:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c3bB7-0000zP-IX for bug-gnu-emacs@gnu.org; Sun, 06 Nov 2016 23:05:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Mauger Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Nov 2016 04:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24646 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 24646-submit@debbugs.gnu.org id=B24646.14784914433728 (code B ref 24646); Mon, 07 Nov 2016 04:05:01 +0000 Original-Received: (at 24646) by debbugs.gnu.org; 7 Nov 2016 04:04:03 +0000 Original-Received: from localhost ([127.0.0.1]:47376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c3bAB-0000y4-CQ for submit@debbugs.gnu.org; Sun, 06 Nov 2016 23:04:03 -0500 Original-Received: from nm21-vm6.bullet.mail.ne1.yahoo.com ([98.138.91.114]:56010) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c3bA9-0000xa-FW for 24646@debbugs.gnu.org; Sun, 06 Nov 2016 23:04:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1478491435; bh=ZU+7gLdMm1eJUR0XVdYZULL94DEBKPqi/YRdlOg0YN4=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:From:Subject; b=JATZ4djAzINA+tyVcAzZ3wM7lFj5jxn4F6KGBNF9n/VGlybhkmK3ChWm0Hmg8jG3vNhJurJEWa+tR3ymCDU6uNqiNF1Z2p/qEsx9ayCqbPTL82kW6mmGJLT3dYIm8Tnz6Kjt5eYYlAUa9Oun34GcDu0F0uyQ174ok+8+Sd845YBBJeVGEFje7kecuhx9sB7FCrU88CPJ9qXDavVd/F3hpm+vI4k7Xe+cQ8nwAOWL1dAjQGOOW2/r3446a/3FZPbeMmxDjwSSxwjgvNuX3utcn4nuzZSYeYnf9pIvqLn1ASkX/IdlRRv06UWxDnl1SrxYm6vU+nUchHaHoXeP7MYGPA== Original-Received: from [98.138.226.178] by nm21.bullet.mail.ne1.yahoo.com with NNFMP; 07 Nov 2016 04:03:55 -0000 Original-Received: from [98.138.226.162] by tm13.bullet.mail.ne1.yahoo.com with NNFMP; 07 Nov 2016 04:03:55 -0000 Original-Received: from [127.0.0.1] by omp1063.mail.ne1.yahoo.com with NNFMP; 07 Nov 2016 04:03:55 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 557666.34151.bm@omp1063.mail.ne1.yahoo.com X-YMail-OSG: x41c6SsVM1nS360_7DK2zASMKXNTa3azGYXMBnuk6F7P7wTbn_G_DhLa9hKOMFH gsju47tssxtjCexbgr9mmpAIwkamOiDpPoDTOJWJgU9MMgTjRUGhQFHfR8TAG_gkBgLzNWr_b3Q0 JHWIuqM8ue9cc1Q8joIcV7VXB6j9M89qQAXo2WuwC5TOXT8Er.bJ80c4IGcI7cVkYSE33Sbldt4k nA6_Rlfpa1ifroeJJBjuYDFWROwhIfpCwPRkI7ctNg293l7ZhGxULnT7yS6Q2XSO5_jJQ6Rpqlvu tYBhsGzhZoPPGRcNPoWim02lHS9UPz5_f1i8q.b9YuySl0Uk4bq_7vH0WHiU265QNZdaTyO4ktg8 aZpN5fYqElpLSv0STC6IPUF0eV.7fWXSGvGo9FW_O23vVCfZNvWx3lbr5gobxuWo79kef5yrlprG dl.n52PzhlbBAYMiidvUonW.lEeAUq6PHzKVpbMPZE4UnXMYuq8iZcGAfp3F1YJUKkOI_grJBEDc hQUUsNlRlwMecZC18ZKcMhrbYetCXzVz1WNRXF2NF04vGRYCHmP43t8xJBBpGMJIVCw-- Original-Received: from jws200202.mail.ne1.yahoo.com by sendmailws128.mail.ne1.yahoo.com; Mon, 07 Nov 2016 04:03:55 +0000; 1478491435.187 In-Reply-To: <1478443615.12208.0@smtp.gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:125409 Archived-At: On Sunday, November 6, 2016 9:47 AM, Simen Heggest=C3=B8yl wrote: >On Sun, Oct 23, 2016 at 11:50 PM, Michael Mauger =20 >wrote: >> In the meantime, I'll review your patch and test further; I'll get=20 >> back to you if I have any issues. > >Thanks, Michael. Did you get a chance to test it yet? If it saves you >time, I can install the patch once you're happy with it. > > >-- Simen Several comments: * Rather than hard-coding "psql", please use `sql-postgres-program' which c= an be customized to locate the psql executable. * The "psql -l" command should also use the "-X,--no-psqlrc" option to avoi= d a configuration file overriding the field separator and changing the outp= ut format * Rather than `(substring row (match-beginning 1) (match-end 1))' use `(mat= ch-string 1 row)' * Return the nreverse of the result list so that the completion list is in = the same order as psql lists them. * `dolist' can specify the return value rather than having a separate expre= ssion after the loop. That is, (dolist (row (process-lines ...) (nreverse r= es)) ...)) is equivalent to (dolist (row (process-lines ...)) ...) (nrevers= e res) * I'm concerned about the change to the `completing-read' call in `sql-get-= login-ext'. Rather than `nil', I'd suggest `confirm' so that if the value i= sn't in the list, it must be confirmed. * If the REQUIRE-MATCH parameter should really be something other than `t',= then possibbly we should add another keyword :completion-required whose va= lue would be used in the `completing-read' call (default to `t' to preserve= current functionality). * Thank you including the test module. I need to expand automated testing s= ignificantly and I appreciate your efforts to kickstart the effort and sham= e me to action :). I greatly appreciate your submission but think we need to tighten up the co= de a bit before we commit it to the code base.