I am using spacemacs-light
theme in Emacs and love it.
In my spacemacs-light theme, some org-files open with bullets not hidden though. In those cases I go to the top of the file and hit C-c C-c
to refresh my org-file. And then I go back to where I was via C-u C-SPC
.
Now I would like to create an elisp function that does this in a single step and map it to a key.[^1] Here is my approach in Elisp:
(defun my-refresh-org-fle ()
(interactive)
(progn
(set-mark-command nil)
(beginning-of-buffer)
(org-ctrl-c-ctrl-c)
(pop-mark)))
But it does not work. It won't go back to where I was.
I guess I haven't quite understood the functions set-mark-command
and pop-mark
. Although I do understand the concept of the mark-ring, and I enjoy using it (love jumping back to where I was prior to jumping to other files).
[^1]: Of course I could start debugging as to why I have this behaviour in spacemacs-theme in Emacs 26.x, but I don't have the time to.