all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Repositioning point to buffer beginning
@ 2022-10-22  2:04 Heime via Users list for the GNU Emacs text editor
  2022-10-22  2:44 ` Emanuel Berg
  2022-10-22  6:50 ` Jean Louis
  0 siblings, 2 replies; 3+ messages in thread
From: Heime via Users list for the GNU Emacs text editor @ 2022-10-22  2:04 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

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))

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-22  6:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-22  2:04 Repositioning point to buffer beginning Heime via Users list for the GNU Emacs text editor
2022-10-22  2:44 ` Emanuel Berg
2022-10-22  6:50 ` Jean Louis

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.