emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sql-interactive-mode not recognising psql prompts


From: Michael R. Mauger
Subject: Re: sql-interactive-mode not recognising psql prompts
Date: Thu, 11 Feb 2016 17:52:37 -0700 (MST)

The intent of the default settings is to match the most common cases, so that
unintended consequences are avoided.  If the prompt is set to something
unusual, modifying the setting to handle the specific case:

  (sql-set-product-feature 'postgres :prompt-regexp "^.*=[#>] ")
  (sql-set-product-feature 'postgres :prompt-cont-regexp "^.*[-(][#>] ")

But I'd prefer "^\\(\\w\\|\\s_\\)*=[#>] " and "^\\(\\w\\|\\s_\\)*[-(][#>] "
as :prompt-regexp and :prompt-cont-regexp in sql.el itself.  

Please note "\\s" is an incomplete regexp in Emacs, what you'd want is
"\\s_" (syntax class: Symbol) to get all additional symbol constituent
characters beyond word characters.  ("\\w" == "\\sw")

-- Michael (maintainer sql.el)





--
View this message in context: 
http://emacs.1067599.n5.nabble.com/no-subject-tp386941p387533.html
Sent from the Emacs - Dev mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]