GNU bug report logs - #47358
28.0.50; sql-list-tables: quotes are cumbersome, no need for it; include history

Previous Next

Package: emacs;

Reported by: Jean Louis <bugs <at> gnu.support>

Date: Wed, 24 Mar 2021 08:04:01 UTC

Severity: wishlist

Found in version 28.0.50

To reply to this bug, email your comments to 47358 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#47358; Package emacs. (Wed, 24 Mar 2021 08:04:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jean Louis <bugs <at> gnu.support>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 24 Mar 2021 08:04:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jean Louis <bugs <at> gnu.support>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; sql-list-tables: quotes are cumbersome, no need for it;
 include history
Date: Wed, 24 Mar 2021 11:01:46 +0300
When executing C-c C-l t in sql-interactive-mode then tables are
completed with quotes like "activities" instead of just activities.

It would be good not to use quotes, it is more usable that
way. Internally the table could require quotes to be called, but for
user to complete a string or name of table should not be necessary.

Additionally I propose to include history for the function
sql-list-tables as calling tables' definitions may be frequent with some
users, and other mini buffer entries are not relevant to it.


In GNU Emacs 28.0.50 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo version 1.17.4, Xaw scroll bars)
 of 2021-03-22 built on protected.rcdrun.com
Repository revision: cb5d1fe1aa9f280d60fcb33b58fc83ace3d95081
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12010000
Configured using:
 'configure --with-x-toolkit=lucid'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY
PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM
LUCID ZLIB

Important settings:
  value of $LC_ALL: en_US.UTF-8
  value of $LANG: de_DE.UTF-8
  value of $XMODIFIERS: @im=exwm-xim
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(qp sql view thingatpt comint ansi-color ring help-mode pp shadow sort
mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml
mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json map text-property-search time-date subr-x seq
byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
cairo x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 84154 15485)
 (symbols 48 7968 0)
 (strings 32 24332 1708)
 (string-bytes 1 815850)
 (vectors 16 21618)
 (vector-slots 8 944822 223378)
 (floats 8 32 62)
 (intervals 56 5201 26)
 (buffers 992 17))

-- 
Thanks,
Jean Louis
⎔ λ 🄯 𝍄 𝌡 𝌚




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47358; Package emacs. (Thu, 21 Oct 2021 21:04:02 GMT) Full text and rfc822 format available.

Message #8 received at 47358 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Jean Louis <bugs <at> gnu.support>
Cc: Michael Mauger <mmauger <at> protonmail.com>, 47358 <at> debbugs.gnu.org
Subject: Re: bug#47358: 28.0.50; sql-list-tables: quotes are cumbersome, no
 need for it; include history
Date: Thu, 21 Oct 2021 14:03:05 -0700
Jean Louis <bugs <at> gnu.support> writes:

> When executing C-c C-l t in sql-interactive-mode then tables are
> completed with quotes like "activities" instead of just activities.
>
> It would be good not to use quotes, it is more usable that
> way. Internally the table could require quotes to be called, but for
> user to complete a string or name of table should not be necessary.
>
> Additionally I propose to include history for the function
> sql-list-tables as calling tables' definitions may be frequent with some
> users, and other mini buffer entries are not relevant to it.

I'm copying in the sql.el maintainer here.  Michael, could you please take a
look at the above feature request?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47358; Package emacs. (Sun, 26 Jun 2022 18:39:02 GMT) Full text and rfc822 format available.

Message #11 received at 47358 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: Michael Mauger <mmauger <at> protonmail.com>, 47358 <at> debbugs.gnu.org,
 Jean Louis <bugs <at> gnu.support>
Subject: Re: bug#47358: 28.0.50; sql-list-tables: quotes are cumbersome, no
 need for it; include history
Date: Sun, 26 Jun 2022 20:38:32 +0200
Stefan Kangas <stefan <at> marxist.se> writes:

> Jean Louis <bugs <at> gnu.support> writes:
>
>> When executing C-c C-l t in sql-interactive-mode then tables are
>> completed with quotes like "activities" instead of just activities.
>>
>> It would be good not to use quotes, it is more usable that
>> way. Internally the table could require quotes to be called, but for
>> user to complete a string or name of table should not be necessary.
>>
>> Additionally I propose to include history for the function
>> sql-list-tables as calling tables' definitions may be frequent with some
>> users, and other mini buffer entries are not relevant to it.
>
> I'm copying in the sql.el maintainer here.  Michael, could you please take a
> look at the above feature request?

I'm not very familiar with sql.el, but if I read the code correctly,
`C-c C-l t' just outputs the data the SQL server spits back at us?  So
if you're using PostgreSQL, I guess that means that that's how
PostgreSQL formats the CREATE TABLE statement.

But I may be mistaken -- perhaps Michael has some comments here.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47358; Package emacs. (Tue, 05 Jul 2022 01:19:02 GMT) Full text and rfc822 format available.

Message #14 received at 47358 <at> debbugs.gnu.org (full text, mbox):

From: Michael Mauger <mmauger <at> protonmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Stefan Kangas <stefan <at> marxist.se>, 47358 <at> debbugs.gnu.org,
 Jean Louis <bugs <at> gnu.support>
Subject: Re: bug#47358: 28.0.50;
 sql-list-tables: quotes are cumbersome, no need for it; include history
Date: Tue, 05 Jul 2022 01:17:59 +0000
Lars, your analysis was correct--they value is merely inserted into whatever command the dialect uses to display the table structure and relies upon the underlying command interpreter's rules.  I understand the desire to not make typing of the double quotes required even if they are required in the underlying command then being consistent with what the underlying parser requires is not particularly onerous. The handling of the double quotes becomes a challenge when the underlying cli does not accept the same table-name syntax as the "list tables" command requires.

I am playing around with completion (and the insertion of enclosing dquotes when required) in code and in the minibuffer but that'll be a little while before that is ready. I'll take a look at the smaller bugs first and move on to this. I do use sql-mode every day (I was a predominantly Oracle user for many years, but PostgreSQL and a little MS SQL Server and SQLite have become my current emphasis).

--
MICHAEL <at> MAUGER.COM // FSF and SFConservancy // GNU Emacs sql.el maintainer

------- Original Message -------
On Sunday, June 26th, 2022 at 2:38 PM, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:


> Stefan Kangas stefan <at> marxist.se writes:
>
> > Jean Louis bugs <at> gnu.support writes:
> >
> > > When executing C-c C-l t in sql-interactive-mode then tables are
> > > completed with quotes like "activities" instead of just activities.
> > >
> > > It would be good not to use quotes, it is more usable that
> > > way. Internally the table could require quotes to be called, but for
> > > user to complete a string or name of table should not be necessary.
> > >
> > > Additionally I propose to include history for the function
> > > sql-list-tables as calling tables' definitions may be frequent with some
> > > users, and other mini buffer entries are not relevant to it.
> >
> > I'm copying in the sql.el maintainer here. Michael, could you please take a
> > look at the above feature request?
>
>
> I'm not very familiar with sql.el, but if I read the code correctly,
> `C-c C-l t' just outputs the data the SQL server spits back at us? So
> if you're using PostgreSQL, I guess that means that that's how
> PostgreSQL formats the CREATE TABLE statement.
>
> But I may be mistaken -- perhaps Michael has some comments here.
>
> --
> (domestic pets only, the antidote for overdose, milk.)
> bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 1 year and 304 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.