unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* smart indentation for SQL files
@ 2017-05-03  9:12 Alex Harsanyi
  2017-05-03 21:32 ` Stefan Monnier
  2017-05-04  0:55 ` Clément Pit-Claudel
  0 siblings, 2 replies; 8+ messages in thread
From: Alex Harsanyi @ 2017-05-03  9:12 UTC (permalink / raw)
  To: emacs-devel

Hello,

A while ago, I posted on this mailing list about a SQL indentation
package that I wrote.  The package provides indentation for SQL files,
similar to how cc-mode works, it even allows customizing the
indentation rules.  The current sql.el mode only provides syntax
highlighting.

You can find the package here:

    https://github.com/alex-hhh/emacs-sql-indent

and the previous discussion here:

    https://lists.gnu.org/archive/html/emacs-devel/2015-12/msg00943.html

Could this package be considered for inclusion in sql.el or as an ELPA package?

I have already signed papers for contributing to Emacs.

Best Regards,
Alex.



^ permalink raw reply	[flat|nested] 8+ messages in thread
* smart indentation for SQL files
@ 2015-12-21 11:42 Alex Harsanyi
  2015-12-22  5:39 ` John Wiegley
  0 siblings, 1 reply; 8+ messages in thread
From: Alex Harsanyi @ 2015-12-21 11:42 UTC (permalink / raw)
  To: emacs-devel

Hello,

About 10 years ago I had to edit many SQL files and the sql-mode that shipped
with GNU Emacs did not provide any smart indentation.  At the time, I wrote a
small indentation package, which I used for several months but never released
publicly.

Shortly after, I changed jobs and didn't have to look at SQL files again until
recently. I noticed that the SQL indentation support is still missing from
Emacs and to my surprise my old code worked just fine.

I cleaned up the old code a bit, added suport for indenting WITH statements
and uploaded it to Github at:

    https://github.com/alex-hhh/emacs-sql-indent

The code is similar to cc-mode, in that it separates the "parsing" of the SQL
code from the indentation and the indentation rules can be modified by the
user to conform to local indentaiton guidelines or preferences.

I think this code would be a nice addition to sql.el.

Best Regards,
Alex.



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

end of thread, other threads:[~2017-05-04 10:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-03  9:12 smart indentation for SQL files Alex Harsanyi
2017-05-03 21:32 ` Stefan Monnier
2017-05-04 10:15   ` Alex Harsanyi
2017-05-04  0:55 ` Clément Pit-Claudel
  -- strict thread matches above, loose matches on Subject: below --
2015-12-21 11:42 Alex Harsanyi
2015-12-22  5:39 ` John Wiegley
2015-12-23 12:27   ` Alex Harsanyi
2015-12-23 17:35     ` John Wiegley

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).