Skip to main content

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.

0 votes
0 answers
48 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 ...
Marc Johnson's user avatar
0 votes
2 answers
73 views

before-save-hook not working with use-package and custom mode

I wrote a little derived mode for the kage shader language, it's derived from go-mode (syntax is the same). I also like to use gofmt, but it's just not loading the hook. Here's the mode: (define-...
Tom's user avatar
  • 45
0 votes
2 answers
106 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 ...
userrandrand's user avatar
0 votes
0 answers
19 views

How to put 'viper-change-state-to-emacs function on some hook

I am using viper-mode, which is vi emulator and can be switched to the original emacs mode with viper-change-state-to-emacs, when I edit program files. But, sometimes I want to create some special ...
20 Abbeyroad's user avatar
0 votes
1 answer
21 views

`tab-stop-list` being ignored

Tying to write a new mode, I am stuck at: (define-derived-mode NEWS-mode text-mode "NEWS" "Major mode for NEWS file." (setq tab-stop-list '(2 6 59 65)) (setq indent-tabs-...
emacs drives me nuts's user avatar
0 votes
1 answer
21 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-...
Suren Shrestha's user avatar
1 vote
0 answers
83 views

What is the advantage of major-mode-remap-alist?

I've had this in my init file about forever: (defalias 'perl-mode 'cperl-mode) ;cperl is much nicer Now I learned about major-mode-remap-alist in Emacs 29.1 which I had installed shortly after ...
q.undertow's user avatar
0 votes
0 answers
25 views

Viewing a single mail file in a maildir

Is there any major mode that allows one to properly view a single mail file in a maildir? By "properly" here I mean similar to "big" email clients, like mu4e or gnus, so allowing (...
Alex's user avatar
  • 155
1 vote
0 answers
73 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 ...
shintuku's user avatar
  • 121
0 votes
0 answers
20 views

Haskell Interactive mode - incorrect parsing of crammed code

When using list comprehension without white spaces, all text after vertical bar turns grey. [x| is treated like header of here-document - grey color spans for the rest of the buffer, unless sequence |...
Przemek's user avatar
  • 101
0 votes
0 answers
26 views

Is there a major mode for editing xkb files?

I have a custom keyboard layout I'm often editing. This is a file stored in /usr/share/X11/xkb/symbols/, similar to the other language files there. Since none of these files have an extension Emacs ...
Alexander Praehauser's user avatar
0 votes
1 answer
38 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 ...
Jeffrey Benjamin Brown's user avatar
0 votes
1 answer
41 views

Different outputs from minor-mode depending on major-mode

My minor-mode is inserting text in the current buffer. I want the default format of the text to be different depending on what major-mode the buffer is in, and to allow the user to override this ...
pelle's user avatar
  • 1
0 votes
2 answers
2k 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 ...
Lai Yu-Hsuan's user avatar
0 votes
1 answer
31 views

set the correct major mode for script files based on interpreter

I want to make a function that will set the correct major mode based on the interpreter used for a script. I don't want to include extensions in my scripts (because that can be annoying if making cli ...
Hackerman's user avatar

15 30 50 per page
1
2 3 4 5
20