logo
down
shadow

emacs: how to set the default database type for a sql file in SQL mode


emacs: how to set the default database type for a sql file in SQL mode

By : user2952689
Date : November 19 2020, 01:01 AM
seems to work fine SQL mode has sql-set-product function which is used to set the product.
C-h f sql-set-product RET lists the details of the function.
code :
sql-set-product is an interactive compiled Lisp function.

(sql-set-product PRODUCT)

Set `sql-product' to PRODUCT and enable appropriate highlighting.
(sql-set-product 'postgres)
M-x sql-set-product RET mysql RET
-- -*- mode: sql; sql-product: mysql; -*-


Share : facebook icon twitter icon
Setup for emacs org-mode outside .emacs file

Setup for emacs org-mode outside .emacs file


By : Rachelle Alexa
Date : March 29 2020, 07:55 AM
This might help you Ryan McGeary describes what I think is a good way to organize emacs startup files.
Update:
Make emacs run in console mode (-nw) by default

Make emacs run in console mode (-nw) by default


By : Robert Bilderbach
Date : March 29 2020, 07:55 AM
This might help you On my Debian testing, alias emacs='emacs -nw' followed by emacs opens Emacs in the terminal. And, in the same session, emacs23-x opens Emacs with the GUI.
Emacs: Set writeroom mode as default

Emacs: Set writeroom mode as default


By : user2710929
Date : March 29 2020, 07:55 AM
I wish this help you So now that you've provided a link (albeit in your other question), I can see that the library provides a global minor mode which only turns itself on for a specific configurable set of major modes.
The following will redefine the function which makes that decision, so that if the writeroom-major-modes is nil (empty list), it will turn on for any major mode.
code :
(eval-after-load 'writeroom-mode
  '(defun turn-on-writeroom-mode ()
     "Turn on `writeroom-mode'.
This function activates `writeroom-mode' in a buffer if that
buffer's major mode is a member of `writeroom-major-modes',
or derived from one of those modes.

If `writeroom-major-modes' is nil, activate `writeroom-mode'
in ALL buffers."
     (when (or (not writeroom-major-modes)
               (apply 'derived-mode-p writeroom-major-modes))
       (writeroom-mode 1))))
(global-writeroom-mode 1)
Add hook to default mode when using emacs -q -l

Add hook to default mode when using emacs -q -l


By : Jamal Basha
Date : March 29 2020, 07:55 AM
This might help you The following analysis is based on startup.el of the master branch: https://github.com/emacs-mirror/emacs/blob/master/lisp/startup.el
As I understand the question, it seeks an answer as to when the command line option -l aka --load FILE is run as compared to when the *scratch* buffer is initialized with the initial-major-mode that by default is lisp-interaction-mode.
How can I override the default mode file in Emacs?

How can I override the default mode file in Emacs?


By : David C
Date : March 29 2020, 07:55 AM
I wish this help you Looking at Emacs Wiki, I noticed there was no "t" at the end of the "load-path", so I removed that and it started working. The "t" above may be the origin of the problem. What is very strange is that the misbehaviour in cc-mode I was trying to get around has also disappeared. The above "t" may have caused some sort of other errors. See emacswiki.org/emacs/LoadPath for the Emacs Wiki page.
I found this page: gnu.org/software/emacs/manual/html_node/elisp/…. It says Normally, if element is added, it is added to the front of symbol, but if the optional argument append is non-nil, it is added at the end. It seems I was adding at the end. I'm not sure why that broke cc-mode so horribly, since it was working until I switched to emacs 25.2 a few days ago. It's now working well.
shadow
Privacy Policy - Terms - Contact Us © ourworld-yourmove.org