unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Michael R. Mauger" <michael@mauger.com>
To: Emacs-devel@gnu.org
Subject: Re: sql-interactive-mode not recognising psql prompts
Date: Thu, 11 Feb 2016 17:52:37 -0700 (MST)	[thread overview]
Message-ID: <1455238357865-387533.post@n5.nabble.com> (raw)
In-Reply-To: <AE8A4DBD-EAE5-46F9-95AC-563903EAF0A1@sanityinc.com>

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	other threads:[~2016-02-12  0:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-08  7:54 (unknown) steve
2016-02-08  8:01 ` (unknown) Steve Purcell
2016-02-08 12:56 ` Artur Malabarba
2016-02-08 19:05   ` Re: Steve Purcell
2016-02-08 20:16     ` Re: Artur Malabarba
2016-02-09  8:12       ` sql-interactive-mode not recognising psql prompts Steve Purcell
2016-02-12  0:52         ` Michael R. Mauger [this message]
2016-02-15 12:49           ` Artur Malabarba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1455238357865-387533.post@n5.nabble.com \
    --to=michael@mauger.com \
    --cc=Emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).