Questions tagged [minor-mode]

provides optional features that users may enable or disable independently of the choice of major mode. Minor modes can be enabled individually or in combination with other modes.

Filter by
Sorted by
Tagged with
14
votes
3answers
653 views

How do you update a minor mode definition as you develop it?

I started coding a minor mode to provide some keybindings. My initial attempt had a typo: (define-minor-mode borked-mode "A mode defined with a broken key binding" nil nil '(([b] . 'previous-...
8
votes
2answers
980 views

How to activate semantic-mode for specific major modes only?

I've seen this question a lot. But none of the replies fixed my issue: the minor mode stays on in others modes. So far, I have tried: (use-package stickyfunc-enhance :config ;; (add-to-list '...
2
votes
1answer
251 views

Mode local variables

I frequently use file-local variables, but after writing some minor modes I find the need to implement mode-based behavior. Let's say I want to define a variable errors-list-regexp that varies ...
2
votes
0answers
489 views

No numpy, scipy, sympy and matplotlib minor-modes?

Python scientific libs are immensily popular for the last decade or so. However googling and "melping" for its emacs minor-modes reveals nothing. Basically I need just syntax highlighting. Do you ...
2
votes
0answers
220 views

Issue with python mode in 24.5 on Mac OSX Yosemite: python-rx missing?

I installed Emacs 24.5 using homebrew $ brew install emacs and the Emacs-Live package collection. Most things work really well, but I'd like to get a python IDE going in emacs (so I don't have to ...
1
vote
1answer
492 views

How to set a rule for the order of minor-mode-map-alist

Suppose we have 3 mode, one such rule is like key map for mode 1 should always come before mode 2, and mode 3 should always come before mode 1, finally mode 3 should always come before other minor ...
2
votes
1answer
525 views

Make all text of a given face invisible

Is there a straightforward way to make all text with a given face invisible? I don't believe I can make invisibility be intrinsic to the face, but can I perhaps specify a minor mode that makes sure ...
7
votes
3answers
3k views

global-auto-revert-mode doesn't seem to work?

My init file includes (setq global-auto-revert-mode t) and I can confirm it's true with C-h v. But I still have to manually revert all my files with revert-buffer whenever I change git branches. I ...
2
votes
1answer
134 views

How to detect if current major-mode supports which-function and semantic/find?

I am implementing a feature to automatically generate a bookmark name by extracting information from the current context. Many packages provide such info. For example which-func (through (which-...
18
votes
3answers
4k views

Get list of active minor modes in buffer

How get a list of active minor modes in current buffer? Docs (info "(elisp)Minor Mode Conventions") say: Define a variable whose name ends in ‘-mode’. We call this the "mode variable&...
0
votes
1answer
165 views

Tie a minor-mode to a particular major mode

I'm writing an extension to a major mode (coq-mode) that adds extra features, plus a few keybindings. To makes it easy to disable or redefine these keybindings, I packaged them in a keymap. That ...
8
votes
1answer
699 views

Is there a 'caps-lock-mode' for those of us who've rebound the key?

Rebinding your caps-lock key to control is a popular thing to do (though there are arguments against it, even if a bit pedantic). However, the language I find a lot of my time in uses runs of ...
0
votes
0answers
54 views

What completion modes am I using?

I do not curate my .emacs and packages very effectively. Right now I have an issue where, when working in the Ruby, I type def[space] and then magically two end lines appear. Obviously I have managed ...
5
votes
2answers
1k views

Can I add highlighting in a minor mode?

I'm trying to understand minor modes with the goal of adding a minor mode for Jinja2 syntax highlighting (from jinja2-mode) to stuff like YAML. I'm running into problems though. When following a ...
5
votes
1answer
1k views

Turn off fringes in text-mode

How do I turn off fringes in text-mode? The closest I've gotten is this: (add-hook 'text-mode-hook (lambda () (set-fringe-mode '(0 . 0)))) But that turns off fringes ...
8
votes
2answers
1k views

Disable hl-line-mode only for eshell and ansi-term

I have global-hl-line-mode setup in my init file: (use-package hl-line :init (global-hl-line-mode 1)) Is it possible to disable it when I am in eshell and ansi-term? I tried adding a hook like ...
1
vote
3answers
302 views

detect minor mode activation [closed]

Is there a way to detect when a minor mode is turned on. For web-mode, I would like to know when indent-tabs-mode is turned on. Please note that what I need is to detect this when the user has begun ...
4
votes
1answer
604 views

How to look up documentation for a minor mode?

I just decided that I should try the outline-minor-mode for showing and hiding Emacs lisp defun definitions in an Emacs Lisp file. So I typed M-x outline-minor-mode and then I would like to get an ...
0
votes
0answers
457 views

normal-erase-is-backspace-mode does not work over ssh when included in .emacs

In my .emacs file I have the following line: (normal-erase-is-backspace-mode) to change <backspace> to backwards delete and ^H to help over the terminal. Unfortunately when I use emacs with -...
2
votes
1answer
644 views

Global minor mode not global?

I am trying to write a global minor mode. The following illustrates my problem: (define-minor-mode global-foo-mode :global t :lighter " FOO") then run M-x global-foo-mode The message displayed is ...
4
votes
0answers
55 views

How to do searches in MediaWiki mode?

How to do searches in MediaWiki mode? If I instead do searches in Web browser, and then copy the URI of the page into Emacs, it sort of defeats the purpose of using Emacs as and MediaWiki power ...
3
votes
1answer
378 views

How to learn the stroke order of a kanji (or kana) character using Emacs

As a devoted Emacs user and a Japanese beginner learner, I've been using the Emacs' Japanese input method quite a lot during recent months. However, I've been looking for a way to leverage Emacs' ...
5
votes
1answer
1k views

(setq yas-snippet-dirs …) not working

I am unable to set up yasnippet the way I want to set it up. I only want to use yasnippet for a particular set of modes, so I don't want to use yas-global-mode. I only want to use my own snippets, ...
7
votes
3answers
1k views

How to make electric-pair-mode buffer local?

I would like electric-pair-mode to be enabled only in the buffers where I am editing, say, Emacs Lisp. But it seems that electric-pair-mode is a "global minor mode": if it is activated in one buffer, ...
34
votes
3answers
7k views

Is there an Emacs mode which highlights differences from the committed version?

One feature that Xcode has which I think is pretty neat is a "Comparison" mode, which continually shows differences between the current buffer and the most recent commit. Is there anything like this ...
1
vote
1answer
248 views

Line break/word wrap setup for writing a book/journal

I've just started learning Org-Mode and have comes across the issue of unending lines while journalling. All the different minor modes for line breaking and word wrapping have me confused. I want ...
12
votes
1answer
1k views

Disable minor mode in all open buffers

Often I have many buffers open and, for whatever reason, I no longer wish to use a particular minor mode with them. Is there currently a built-in way to disable a particular minor mode for all open ...
29
votes
3answers
8k views

Proper way to enable minor mode

I have foo-mode and would enable bar-minor-mode for it. So which way is more common and preferable? A (add-hook 'foo-mode-hook 'bar-minor-mode) B (add-hook 'foo-mode-hook (lambda () ...
8
votes
1answer
723 views

Enabling a minor mode with a file-local variable prop line

The first line of a plain-text file reads: # -*- eval: (auto-revert-tail-mode 1); -*- Yet Emacs does not enable auto-revert-tail-mode after opening this file. What is wrong?
26
votes
9answers
8k views

Hide list of minor modes in mode-line

I use quite a few minor modes and usually I know which minor mode is enabled in every major mode. If I really want to see the full list, I can run C-h v minor-mode-list. At the same time, my mode ...
0
votes
1answer
95 views

Is there a mode for phpBB?

I'm using the "It's all Text" addon for Firefox so I can edit textarea's in Emacs. As I spend some time on a phpBB forum, I was wondering if there is an Emacs mode for phpBB with it's syntax of using [...
50
votes
5answers
11k views

How to override major mode bindings

Sometimes my global keybindings are overridden by a major mode. An easy example is the following setting in my init file (global-set-key (kbd "C-j") 'newline-and-indent) But annoyingly this ...
23
votes
1answer
6k views

Synchronized scrolling in two windows

Is there a way to reflect the navigation commands in the current window in another visible window. I have two related LaTeX files displayed in two windows and would like to scroll through them ...

1 2
3