GNU bug report logs -
#22596
25.1.50; Broken prompt-regexp for sql-postgres
Previous Next
Reported by: Steve <steve <at> sanityinc.com>
Date: Mon, 8 Feb 2016 07:43:02 UTC
Severity: normal
Tags: fixed, patch
Found in version 25.1.50
Fixed in version 26.1
Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 22596 in the body.
You can then email your comments to 22596 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22596
; Package
emacs
.
(Mon, 08 Feb 2016 07:43:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Steve <steve <at> sanityinc.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 08 Feb 2016 07:43:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I'm using a database with a name like "blah_dev", and sql-mode doesn't
detect my prompt in a recent snapshot build of Emacs, started with -Q.
The :prompt-regexp for postgres in sql.el is "^\\w*=[#>] ", and in
sql-interactive-mode buffers it seems that "_" is not considered a word
character.
It seems like "\\w" should be replaced with a match which doesn't depend
on the current syntax table, e.g. "[[:alpha:]_]".
In GNU Emacs 25.1.50.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F1507))
of 2016-01-22 built on builder10-9.porkrind.org
Windowing system distributor 'Apple', version 10.3.1404
Configured using:
'configure --with-ns '--enable-locallisppath=/Library/Application
Support/Emacs/${version}/site-lisp:/Library/Application
Support/Emacs/site-lisp''
Configured features:
NOTIFY ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS
Important settings:
value of $LC_CTYPE: en_US.UTF-8
value of $LANG: en_US
locale-coding-system: utf-8
Major mode: Help
Minor modes in effect:
magit-auto-revert-mode: t
global-git-commit-mode: t
async-bytecomp-package-mode: t
company-quickhelp-mode: t
shell-dirtrack-mode: t
global-company-mode: t
company-mode: t
global-flycheck-mode: t
diff-auto-refine-mode: t
auto-compile-on-load-mode: t
auto-compile-on-save-mode: t
ipretty-mode: t
global-rinari-mode: t
rinari-minor-mode: t
global-whitespace-cleanup-mode: t
guide-key-mode: t
hes-mode: t
global-page-break-lines-mode: t
page-break-lines-mode: t
delete-selection-mode: t
cua-mode: t
show-paren-mode: t
global-undo-tree-mode: t
undo-tree-mode: t
global-auto-revert-mode: t
electric-pair-mode: t
savehist-mode: t
desktop-save-mode: t
winner-mode: t
ido-ubiquitous-mode: t
ido-everywhere: t
recentf-mode: t
global-anzu-mode: t
anzu-mode: t
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
global-prettify-symbols-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
buffer-read-only: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
Recent messages:
Type M-x delete-other-windows to delete the help window.
Quit
Subword mode enabled in current buffer
Subword mode disabled in current buffer
200 matches (limit reached) [3 times]
194 matches
Quit [5 times]
uncompressing sql.el.gz...done
Mark saved where search started
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug sendmail re-builder align face-remap
cua-rect rect hippie-exp sql-indent sql move-dup character-fold misearch
multi-isearch gitconfig-mode conf-mode wgrep-ag wgrep grep vc-hg ag
find-dired browse-url org-capture bookmark linum magit-blame magit-stash
magit-bisect magit-remote magit-commit magit-sequence magit magit-apply
magit-wip magit-log magit-diff smerge-mode magit-core magit-autorevert
magit-process magit-popup magit-mode magit-git crm magit-section
magit-utils git-commit log-edit message rfc822 mml mml-sec epg
mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log with-editor
async-bytecomp async tramp-sh debug cal-iso diary-lib diary-loaddefs
hl-line org-agenda descr-text smex company-quickhelp pos-tip haml-mode
markdown-mode textile-mode css-mode cursor-sensor js2-imenu-extras
js2-mode js cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles
cc-align cc-engine cc-vars cc-defs checkdoc tramp-cache tramp
tramp-compat tramp-loaddefs trampver view tabify vc-bzr vc-src vc-sccs
vc-svn vc-cvs vc-rcs diff-hl-dired mmm-sample mmm-mode mmm-univ
mmm-class tidy rainbow-mode color mmm-erb mmm-region mmm-utils tagedit
sgml-mode cap-words superword subword robe url-http tls gnutls url-auth
url-gw puny url url-proxy url-privacy url-expand url-methods url-history
url-cookie url-domsuf url-util mailcap org-element org-rmail org-mhe
org-irc org-info org-gnus org-docview doc-view image-mode dired-sort
dired+ image-dired image-file dired-x dired-aux dired dired-loaddefs
org-bibtex bibtex org-bbdb org-w3m ob-sqlite ob-sh shell ob-ruby
ob-python ob-octave ob-ledger ob-latex ob-gnuplot ob-dot ob-ditaa ob-R
org-clock org org-macro org-footnote org-pcomplete org-list org-faces
org-entities noutline outline org-version ob-emacs-lisp ob ob-tangle
ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint ob-core ob-eval
org-compat org-macs org-loaddefs format-spec cal-menu calendar
cal-loaddefs sh-script executable yaml-mode company-oddmuse
company-keywords company-etags company-gtags company-dabbrev-code
company-dabbrev company-files company-capf company-cmake company-xcode
company-clang company-semantic company-eclim company-template
company-css company-nxml company-bbdb company-robe company disp-table
vc-git vc-darcs xml package-build mm-decode mm-bodies mm-encode
mail-parse rfc2231 rfc2047 rfc2045 ietf-drums flycheck-package lisp-mnt
flycheck find-func subr-x elisp-slime-nav etags xref project redshank
skeleton rainbow-delimiters aggressive-indent highlight-quoted
highlight-symbol diff-hl vc-dir ewoc vc vc-dispatcher diff-mode
bug-reference paredit-everywhere paredit goto-addr init init-locales
init-local session sanityinc-tomorrow-bright-theme
color-theme-sanityinc-tomorrow server jka-compr init-ledger init-dash
init-misc init-common-lisp init-clojure-cider init-clojure init-slime
init-lisp cl-lib-highlight auto-compile packed ipretty pp init-paredit
init-sql init-rails rinari json map jump inflections findr
ruby-compilation which-func imenu pcomplete inf-ruby compile comint
ansi-color ruby-mode smie init-ruby-mode derived init-elm init-haskell
init-python-mode init-haml init-css init-html init-nxml init-org
init-php init-javascript easy-mmode init-erlang erlang-start init-csv
init-markdown init-textile init-crontab init-compile init-github
init-git init-darcs init-vc init-fci init-whitespace
whitespace-cleanup-mode whitespace init-editing-utils guide-key s popwin
dash highlight-escape-sequences whole-line-or-region page-break-lines
delsel cua-base paren undo-tree diff autorevert filenotify elec-pair
init-mmm mmm-auto mmm-vars mmm-compat init-fonts init-sessions savehist
desktop frameset init-windows windmove switch-window quail winner ring
init-company init-hippie-expand init-ido ido-ubiquitous
ido-completing-read+ cus-edit cus-start cus-load ido seq init-recentf
recentf tree-widget wid-edit init-flycheck init-ibuffer ibuf-macs
init-uniquify init-grep init-isearch diminish anzu thingatpt init-dired
init-gui-frames init-osx-keys edmacro kmacro init-themes init-xterm
init-frame-hooks init-exec-path exec-path-from-shell init-elpa fullframe
finder-inf rx slime-autoloads info package epg-config url-handlers
url-parse auth-source eieio byte-opt bytecomp byte-compile cl-extra
cconv eieio-core cl-macs eieio-loaddefs gnus-util mm-util help-fns
help-mode easymenu mail-prsvr password-cache url-vars init-site-lisp
cl-seq cl gv cl-loaddefs pcase cl-lib init-utils init-compat
init-benchmarking advice time-date mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win ucs-normalize
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame 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 charscript case-table epa-hook jka-cmpr-hook help
simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button
faces cus-face macroexp files text-properties overlay sha1 md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote kqueue cocoa ns multi-tty make-network-process emacs)
Memory information:
((conses 16 1405822 192319)
(symbols 48 72361 1)
(miscs 40 10028 9847)
(strings 32 195944 214186)
(string-bytes 1 5887053)
(vectors 16 94095)
(vector-slots 8 2228073 154483)
(floats 8 1325 2291)
(intervals 56 25797 431)
(buffers 976 157))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22596
; Package
emacs
.
(Mon, 08 Feb 2016 07:56:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 22596 <at> debbugs.gnu.org (full text, mbox):
Patch sent to emacs-devel list.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22596
; Package
emacs
.
(Mon, 08 Feb 2016 08:04:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 22596 <at> debbugs.gnu.org (full text, mbox):
From 8f2be35bec54b752708281776f96c991903245d2 Mon Sep 17 00:00:00 2001
From: Steve Purcell <steve <at> sanityinc.com>
Date: Mon, 8 Feb 2016 20:47:43 +1300
Subject: [PATCH] Safer prompt-regexp for postgres/vertica in
sql-interactive-mode
Fixes issue 22596, whereby "_" is now not considered a word constituent
character in sql-interactive-mode, so prompts like "foo_dev# " are not
correctly detected.
---
lisp/progmodes/sql.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index fd59f46..90c8dfe 100644
--- a/lisp/progmodes/sql.el
+++ b/lisp/progmodes/sql.el
@@ -462,9 +462,9 @@ sql-product-alist
:list-all ("\\d+" . "\\dS+")
:list-table ("\\d+ %s" . "\\dS+ %s")
:completion-object sql-postgres-completion-object
- :prompt-regexp "^\\w*=[#>] "
+ :prompt-regexp "^[[:alpha:]_]*=[#>] "
:prompt-length 5
- :prompt-cont-regexp "^\\w*[-(][#>] "
+ :prompt-cont-regexp "^[[:alpha:]_]*[-(][#>] "
:input-filter sql-remove-tabs-filter
:terminator ("\\(^\\s-*\\\\g$\\|;\\)" . "\\g"))
@@ -514,9 +514,9 @@ sql-product-alist
:sqli-comint-func sql-comint-vertica
:list-all ("\\d" . "\\dS")
:list-table "\\d %s"
- :prompt-regexp "^\\w*=[#>] "
+ :prompt-regexp "^[[:alpha:]_]*=[#>] "
:prompt-length 5
- :prompt-cont-regexp "^\\w*[-(][#>] ")
+ :prompt-cont-regexp "^[[:alpha:]_]*[-(][#>] ")
)
"An alist of product specific configuration settings.
--
2.7.1
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22596
; Package
emacs
.
(Tue, 09 Feb 2016 08:19:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 22596 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Updated patch is attached, following discussion on emacs-devel. (I have a CA on file, btw.)
[0001-Safer-prompt-regexp-for-postgres-vertica-in-sql-inte.patch (application/octet-stream, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22596
; Package
emacs
.
(Tue, 23 Feb 2016 04:03:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 22596 <at> debbugs.gnu.org (full text, mbox):
Steve Purcell <steve <at> sanityinc.com> writes:
> Fixes issue 22596, whereby "_" is now not considered a word constituent
> character in sql-interactive-mode, so prompts like "foo_dev# " are not
> correctly detected. Rather than piggy-back on the symbol table, we
> explicitly match against alphanumeric chars or "_".
>
> In the general case, almost any characters are valid in a PostgreSQL
> database name, so we must choose between matching .reasonable. database
> names with a tight regexp, or matching all allowable names with a
> permissive regexp which would likely match all sorts of other buffer
> text. This commit follows the former approach.
[...]
> - :prompt-regexp "^\\w*=[#>] "
> + :prompt-regexp "^[[:alnum:]_]*=[#>] "
> :prompt-length 5
> - :prompt-cont-regexp "^\\w*[-(][#>] "
> + :prompt-cont-regexp "^[[:alnum:]_]*[-(][#>] "
This looks reasonable to me, but I'm not an SQL mode user, so I can't
really test it. Does anybody have an objection to this change?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22596
; Package
emacs
.
(Sun, 24 Apr 2016 06:47:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 22596 <at> debbugs.gnu.org (full text, mbox):
This is still broken for me - would somebody mind applying the patch please?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22596
; Package
emacs
.
(Sun, 24 Apr 2016 11:46:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 22596 <at> debbugs.gnu.org (full text, mbox):
Steve Purcell <steve <at> sanityinc.com> writes:
> This is still broken for me - would somebody mind applying the patch please?
Applied now.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) fixed.
Request was from
Lars Magne Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sun, 24 Apr 2016 11:46:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 25.2, send any further explanations to
22596 <at> debbugs.gnu.org and Steve <steve <at> sanityinc.com>
Request was from
Lars Magne Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sun, 24 Apr 2016 11:46:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22596
; Package
emacs
.
(Sun, 24 Apr 2016 21:05:01 GMT)
Full text and
rfc822 format available.
Message #30 received at 22596 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/html, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 23 May 2016 11:24:04 GMT)
Full text and
rfc822 format available.
bug unarchived.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 04 Dec 2016 02:50:09 GMT)
Full text and
rfc822 format available.
bug Marked as fixed in versions 26.1.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 04 Dec 2016 02:50:10 GMT)
Full text and
rfc822 format available.
bug No longer marked as fixed in versions 25.2.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 04 Dec 2016 02:50:10 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 01 Jan 2017 12:24:27 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 174 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.