[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LaTeX-math-list: Binding on key sequences?
From: |
Ikumi Keita |
Subject: |
Re: LaTeX-math-list: Binding on key sequences? |
Date: |
Sat, 10 Jul 2021 19:33:50 +0900 |
>>>>> Heiko Schröder <heikos@online.de> writes:
> This is the contents of my .emacs (after snip). Aftwards (after snap)
> there is the output of TeX-submit-bug-report
> on the function eval-after-load as well.
The following init.el works for me, i.e., after restarting emacs 27.1 on
windows 10 and typing C-x C-f abc.tex RET, key sequence "# g a" inserts
"\alpha" in newly created buffer.
The only differences from the contents you sent is that I commented out
(load-file "~/.emacs.d/macros/mymacros")
and
(diary)
, as well as I restrict the value of package-selected-packages to just
`auctex'. (Private function definitions and key customization over "C-c
LETTER" aren't relevant here.)
It's very unlikely that `diary' is related to this issue, I
guess something in your "~/.emacs.d/macros/mymacros" causes problem.
Please test with the following init file first. I.e.,
(1) Backup your current ".emacs"
(2) Save the following contents as ".emacs" (or ".emacs.d/init.el")
(3) Restart emacs
(4) Open some LaTeX document
(5) Type "# g a" and see what happens.
If that inserts "\alpha", then it's sure that
"~/.emacs.d/macros/mymacros" is problematic.
Regards,
Ikumi Keita
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(LaTeX-math-list '((97 "alpha" "Greek Lowercase" 945)))
'(inhibit-startup-screen t)
'(package-archives
'(("gnu" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")))
'(package-selected-packages '(auctex)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
(setq LaTeX-math-abbrev-prefix "#")
(setq TeX-electric-sub-and-superscript t)
(setq TeX-insert-braces nil)
(setq LaTeX-electric-left-right-brace t)
;; (load-file "~/.emacs.d/macros/mymacros")
(eval-after-load "latex"
'(progn
;; Remove default <g> binding.
(setq LaTeX-math-default
(delq (assq ?g LaTeX-math-default) LaTeX-math-default))
;; Clear and remake keymap.
(setq LaTeX-math-keymap (make-sparse-keymap))
(setq LaTeX-math-list
'(("g a" "alpha" "Greek Lowercase" 945)))
(LaTeX-math-initialize)
;; Bind new keymap.
(define-key LaTeX-math-mode-map
(LaTeX-math-abbrev-prefix) LaTeX-math-keymap)))
;(diary)
Re: LaTeX-math-list: Binding on key sequences?, Arash Esbati, 2021/07/14
Re: LaTeX-math-list: Binding on key sequences?, Ikumi Keita, 2021/07/15
Re: LaTeX-math-list: Binding on key sequences?, Arash Esbati, 2021/07/16
Re: LaTeX-math-list: Binding on key sequences?, Ikumi Keita, 2021/07/16
Re: LaTeX-math-list: Binding on key sequences?, Arash Esbati, 2021/07/18