help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Print message to buffer unless 'halt is encountered


From: Heime
Subject: Print message to buffer unless 'halt is encountered
Date: Sun, 16 Oct 2022 18:51:11 +0000

Would like to print to buffer BUFR if provided, otherwise to buffer name 
"Gundit".

Furthermore, I want to halt printing when actm matches 'halt

Have begun with this function that sort of does what I want, but I am not there 
yet.

(defun gundit-message (mesg &optional bufr actm)

"Display message except on 'halt symbol."

(when (not (eq 'halt actm))

(if bufr

(with-current-buffer (get-buffer-create bufr)

(org-mode)

(insert mesg))

(princ mesg (get-buffer "Gundit")) )) )

reply via email to

[Prev in Thread] Current Thread [Next in Thread]