In Elisp this seemingly easy peace of code does not actually move the point.
(with-current-buffer "foo"
(goto-char (point-max)))
AFAIK with-current-buffer
should not restore the point in the target buffer.
If not, then how do I manipulate point in a buffer?
(mapc (lambda (win) (unless (eq (selected-window) win) (with-selected-window win (goto-char (point-min)) (forward-line (1- line))))) (get-buffer-window-list emms-lyrics-buffer nil t))
– Togdolist
instead ofmapc
(marginally faster, and often indents a bit better). – Wesla