Questions tagged [major-mode]
The mode that determines the editing behavior of Emacs while that buffer is current. The mode line normally shows the name of the current major mode, in parentheses.
298 questions
1 vote
0 answers
32 views
Any reason auto-mode-alist association fails for file extracted from archive-mode file?
My code associates a .crt file to the x509-dwim function with: (add-to-list 'auto-mode-alist '("\\.crt\\'" . x509-dwim)) When I open a .crt X.509 certificate file, the association works ...
1 vote
0 answers
56 views
"dual-mode" helper which opens _both_ .tar.gz _and_ .zip archives confusedly saved under the same file extension (say, `.yuppie`)?
So someone at my company years ago decided it was a good idea to create a company internal package format, say "yuppie" for yunified package. And that can randomly be tgz or zip archives. ...
0 votes
1 answer
264 views
Trying to get treesitter indents to work with multiple languages for a major mode
I am working on a major mode using treesitter as my parser. It's been pretty intuitive but I ran into an issue. When trying to use multiple languages, you have to specify ranges using nodes in the AST ...
0 votes
2 answers
441 views
What to do when a major mode overides keybindings set in doom emacs?
[Edit: I should specify that there are many keybindings in the major mode that overide the desired keybinding. They all start with a whereas I would like a to do something else. I already thought ...
0 votes
1 answer
33 views
Update content of a buffer in side window when a custom mode is on [duplicate]
I have following code which is supposed to clear existing content in a buffer and write new one. (defun display-file-dir (path) (text-mode) (if buffer-read-only (read-only-mode)) (erase-...
2 votes
1 answer
192 views
Mermaid major mode not showing up after installation
I've installed mermaid-mode by using package-install and MPLA but for some reason, it's not showing up when I type it after M-x. (I get Match required). I'm running Doom Emacs. Any clue why this ...
0 votes
1 answer
56 views
change major mode without hiding text or revealing hidden text (for live-coding)
Question I am live-coding. I would like to be able to change the major mode to and from org-mode without un-hiding any of the text that org-mode has hidden. I would switch to a code mode whenever I ...
1 vote
2 answers
4k views
How enable tree-sitter modes (*-ts-mode) that aren't built-in?
My Emacs (29.1) comes with the some tree-sitter modes: c-ts-mode go-ts-mode js-ts-mode ... I downloaded the compiled .dll and they work out of box. However, there are some languages that tree-sitter ...