[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Repositioning point to buffer beginning
From: |
Heime |
Subject: |
Repositioning point to buffer beginning |
Date: |
Sat, 22 Oct 2022 02:04:55 +0000 |
I am printing a list in a buffer, calling it many times with
(viewer (people "World" 'beg)
(viewer (animals "World" 'beg)
(viewer (places "World" 'beg)
The problem is that if I place point somewhere in the World buffer, point
is not repositioned at the beginning of the buffer everytime viewer is called.
--------------------
(defun viewer (list bufrn &optional pos)
"Shows list details in buffer BUFRN."
(setq actm (or actm 'end))
(with-current-buffer (get-buffer-create bufrn)
(if (eq actm 'beg) (beginning-of-buffer) (end-of-buffer)))
(princ (format "%s\n" list) (get-buffer bufrn)))
(if (eq actm 'beg) (beginning-of-buffer) (end-of-buffer))))
(pop-to-buffer bufrn))
- Repositioning point to buffer beginning,
Heime <=