Hi
After
thinking about learning elisp for years, today I've tried my
first script. First I made some macros that worked as I
intended, and then using this tutorial of Protesilaos
I was able to transform those macros into elisp code.
https://protesilaos.com/codelog/2022-01-31-learning-emacs/
(thanks
a lot)
My situation: I am using Protesilaos' package logos, and I would like to add to it something (a hook?): to mark the position where my eyesight must go. Example:
My problems:
My
code:
(defun posicion1 ()
(interactive)
(next-line 1)
(beginning-of-visual-line)
(forward-char 6)
)
(defun
posicion2 ()
(interactive)
(forward-char 23)
)
(defun posicion3 ()
(interactive)
(end-of-visual-line) ;;C-e
(backward-char 7)
)
(define-key global-map (kbd "1") #'posicion1)
(define-key global-map (kbd "2") #'posicion2)
(define-key global-map (kbd "3") #'posicion3)
Additional
problem: I don't know how to recover keys 1, 2 and 3 to their
normal functioning, right now I can't type 1, 2 or 3 on my
Emacs. xD
I think it could be interesting to use just SPC, instead of 1, 2 and 3. Maybe it could be done using conditionals, like in this not-working example:
(defvar posicion
(defun posicion1 ()
(interactive)
(next-line 1)
(beginning-of-visual-line)
(forward-char 6)
(setq posicion 1)
)
(defun
posicion2 ()
(interactive)
(forward-char 23)
(setq posicion 2)
)
(define-key global-map (kbd "SPC") #'salto)
Any help, advice, warning, or menace are welcome.
Best regards :-)