unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#47358: 28.0.50; sql-list-tables: quotes are cumbersome, no need for it; include history
@ 2021-03-24  8:01 Jean Louis
  2021-10-21 21:03 ` Stefan Kangas
  0 siblings, 1 reply; 4+ messages in thread
From: Jean Louis @ 2021-03-24  8:01 UTC (permalink / raw)
  To: 47358


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
⎔ λ 🄯 𝍄 𝌡 𝌚





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#47358: 28.0.50; sql-list-tables: quotes are cumbersome, no need for it; include history
  2021-03-24  8:01 bug#47358: 28.0.50; sql-list-tables: quotes are cumbersome, no need for it; include history Jean Louis
@ 2021-10-21 21:03 ` Stefan Kangas
  2022-06-26 18:38   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Kangas @ 2021-10-21 21:03 UTC (permalink / raw)
  To: Jean Louis; +Cc: Michael Mauger, 47358

Jean Louis <bugs@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?





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#47358: 28.0.50; sql-list-tables: quotes are cumbersome, no need for it; include history
  2021-10-21 21:03 ` Stefan Kangas
@ 2022-06-26 18:38   ` Lars Ingebrigtsen
  2022-07-05  1:17     ` Michael Mauger via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-26 18:38 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Michael Mauger, 47358, Jean Louis

Stefan Kangas <stefan@marxist.se> writes:

> Jean Louis <bugs@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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#47358: 28.0.50; sql-list-tables: quotes are cumbersome, no need for it; include history
  2022-06-26 18:38   ` Lars Ingebrigtsen
@ 2022-07-05  1:17     ` Michael Mauger via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Mauger via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-07-05  1:17 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Stefan Kangas, 47358, Jean Louis

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@MAUGER.COM // FSF and SFConservancy // GNU Emacs sql.el maintainer

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


> Stefan Kangas stefan@marxist.se writes:
>
> > Jean Louis bugs@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





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-07-05  1:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-24  8:01 bug#47358: 28.0.50; sql-list-tables: quotes are cumbersome, no need for it; include history Jean Louis
2021-10-21 21:03 ` Stefan Kangas
2022-06-26 18:38   ` Lars Ingebrigtsen
2022-07-05  1:17     ` Michael Mauger via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).