Picon

Simple question about emacs

Sorry,
I don't know if I'm writing on the right mailing list.
I only have a general question about Emacs and when I tryed
to read the documentation I drowned in the ocean of manuals.
I'm only a superficial user of Emacs, also because I don't
know where to start learning more (apart the tutorial).
My problem is very simple: I would like that a key sequence 
(like CTRL-c c) should write this text "\v{c}" (i.e. the
Latex command for the slovenian c), and similar for 
CTRL-c SHIFT-c -> \v{C}. Can I use ALT GR-c instead?
I also would like that this definition should be permanent,
i.e. defined in my .emacs file.
Sorry for my stupid question!

--

-- 
Agostino.Manzato <at> osmer.fvg.it
Kai Großjohann | 28 Nov 14:27
Picon

Re: Simple question about emacs

"Agostino.Manzato <at> osmer.fvg.it" <agostino.manzato <at> osmer.fvg.it> writes:

> I don't know if I'm writing on the right mailing list.
> I only have a general question about Emacs and when I tryed
> to read the documentation I drowned in the ocean of manuals.

General requests for help should be directed to the gnu.emacs.help
newsgroup.

> I'm only a superficial user of Emacs, also because I don't
> know where to start learning more (apart the tutorial).
> My problem is very simple: I would like that a key sequence 
> (like CTRL-c c) should write this text "\v{c}" (i.e. the
> Latex command for the slovenian c), and similar for 
> CTRL-c SHIFT-c -> \v{C}. Can I use ALT GR-c instead?
> I also would like that this definition should be permanent,
> i.e. defined in my .emacs file.
> Sorry for my stupid question!

(defun insert-slovenian-c ()
  "Insert \v{c}."
  (interactive)
  (insert "\\v{c}"))
(global-set-key (kbd "C-c c") 'insert-slovenian-c)

Maybe you would like this only in LaTeX mode, then I suggest the
following instead of the global-set-key statement.

(require 'latex)
(define-key LaTeX-mode-map (kbd "C-c c") 'insert-slovenian-c)
(Continue reading)


Gmane