I am using (insert "\n")
to insert a newline in a specified buffer. Is this the recommended way to do it? I have seen (terpri)
but cannot get it to make a newline.
(defun fire-clock (bufrn)
"TODO."
(interactive)
(let ( (ss (nth 0 (decode-time))) ; seconds
(mm (nth 1 (decode-time))) ; minutes
(hh (nth 2 (decode-time))) ) ; hours
(with-current-buffer (get-buffer-create bufrn)
(text-mode)
(goto-char (point-min))
(dotimes (i (/ ss 5))
(firefly-ticker-second 'green))
(insert "\n")
(dotimes (i (% ss 5))
(firefly-ticker-second 'blue)) )))
insert
vsterpri
-they don't do the same thing. Ask a specific question about something you tried that you think doesn't work as you expected. Start your recipe fromemacs -Q
. And of course, start by reading the doc forinsert
andterpri
. – Drew Dec 04 '22 at 21:54(insert "\n")
. I do not understandterpri
very well and how to use it after reading the doc. – Dilna Dec 04 '22 at 22:01PRINTCHARFUN
? The doc seems to assume that all users know what things likePRINTCHARFUN
mean. – Dilna Dec 04 '22 at 22:10PRINTCHARFN
is a stream and also tells you what happens if that argument is not provided. In general, doc-strings name arguments in upper case so they can be easily referred to in the succeeding description. – Fran Burstall Dec 04 '22 at 22:46insert
seems to be the appropriate thing to call. If a buffer name is passed, how can I get that buffer toterpri
. What do you think about the use ofterpri
in this instance? – Dilna Dec 04 '22 at 23:14