Cannot get initial state to evil in BSelect mode
Hello, I use reftex when doing LaTeX, and one very nice thing is the way it deals with bibliographic entries. Unfortunately, when I want to select a bib entry, I'm by default in normal mode. Looking at the mode line, I see the current mode is "BSelect", so I tried adding this to my .emacs: (evil-set-initial-state 'bselect-mode 'emacs) I must be doing something wrong as it does not trigger. What should I do to be in emacs mode by default in a BSelect buffer? Thanks, Alan
Hi Alan, Alan Schmitt <[email protected]> writes:
I use reftex when doing LaTeX, and one very nice thing is the way it deals with bibliographic entries. Unfortunately, when I want to select a bib entry, I'm by default in normal mode. Looking at the mode line, I see the current mode is "BSelect", so I tried adding this to my .emacs:
(evil-set-initial-state 'bselect-mode 'emacs)
Well it seems to be the wrong name (`reftex-select-bib-mode' being the right one): ,---- | (define-derived-mode reftex-select-bib-mode fundamental-mode "BSelect" | "Major mode for selecting a citation key in a LaTeX document. | ... `---- Try (evil-set-initial-state 'reftex-select-bib-mode 'emacs) Good Luck, Michael
On 23 févr. 2012, at 12:20, Michael Markert wrote:
Well it seems to be the wrong name (`reftex-select-bib-mode' being the right one):
,---- | (define-derived-mode reftex-select-bib-mode fundamental-mode "BSelect" | "Major mode for selecting a citation key in a LaTeX document. | ... `----
Try
(evil-set-initial-state 'reftex-select-bib-mode 'emacs)
It works great, thanks. How could I have found this? Is there a way to see what the actual current major mode is? Thanks, Alan
M-x describe-mode lists all currently active modes. Titus On Thu, Feb 23, 2012 at 2:19 PM, Alan Schmitt <[email protected]> wrote:
On 23 févr. 2012, at 12:20, Michael Markert wrote:
Well it seems to be the wrong name (`reftex-select-bib-mode' being the right one):
,---- | (define-derived-mode reftex-select-bib-mode fundamental-mode "BSelect" | "Major mode for selecting a citation key in a LaTeX document. | ... `----
Try
(evil-set-initial-state 'reftex-select-bib-mode 'emacs)
It works great, thanks. How could I have found this? Is there a way to see what the actual current major mode is?
Thanks,
Alan _______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
-- Titus von der Malsburg DFG Research Group 868: Mind and Brain Dynamics Dept. of Linguistics, University of Potsdam http://www.ling.uni-potsdam.de/~malsburg/
On 23 févr. 2012, at 14:28, Titus von der Malsburg wrote:
M-x describe-mode lists all currently active modes.
Thanks, there is a lot of very useful information there. Unfortunately it says the major mode name is BSelect, and never mentions reftex-select-bib-mode. I guess looking at the code may be the only option. Alan
Alan Schmitt <[email protected]> writes:
It works great, thanks. How could I have found this? Is there a way to see what the actual current major mode is?
There's the `major-mode' variable. ,----[ C-h v major-mode RET ] | major-mode is a variable defined in `C source code'. | Its value is message-mode | Original value was fundamental-mode | Local in buffer *unsent wide reply to Alan Schmitt*; global value is text-mode | | Automatically becomes buffer-local when set in any fashion. | | Documentation: | Symbol for current buffer's major mode. | The default value (normally `fundamental-mode') affects new buffers. | A value of nil means to use the current buffer's major mode, provided | it is not marked as "special". | | When a mode is used by default, `find-file' switches to it before it | reads the contents into the buffer and before it finishes setting up | the buffer. Thus, the mode and its hooks should not expect certain | variables such as `buffer-read-only' and `buffer-file-coding-system' | to be set up. | | You can customize this variable. | | [back] `---- Either you "parse" the value out of the description or you enter `major-mode' in `eval-expression' (M-:) to get the symbol. Michael
participants (3)
-
Alan Schmitt -
Michael Markert -
Titus von der Malsburg