[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SOLVED - Re: buffer live, but buffer-live-p gives nil
From: |
Jean Louis |
Subject: |
SOLVED - Re: buffer live, but buffer-live-p gives nil |
Date: |
Thu, 26 Dec 2024 14:12:01 +0300 |
User-agent: |
Mutt/2.2.12 (2023-09-09) |
* Joel Reicher <joel.reicher@gmail.com> [2024-12-26 09:17]:
> Jean Louis <bugs@gnu.support> writes:
>
> > I can clearly see that I have buffer open and with process in it, but
> > this function gives me NIL:
> >
> > (buffer-live-p video-recording-buffer)
>
> Is `video-recording-buffer' a variable or a function? (I'm not familiar with
> any code it might appear in, sorry.)
Variable, thanks, now I got it!
(defun screen-record-switch ()
(interactive)
(cond ((and (process-live-p video-recording-process)
(buffer-live-p (get-buffer video-recording-buffer)))
(switch-to-buffer video-recording-buffer))
(t (rcd-message "There is no recording available."))))
video-recording-buffer ➜ "*Screen Recording*"
It is of course a bit confusing, some functions accept BUFFER-OR-NAME 🤔
and some only OBJECT 📝.
Now I got it, thanks much! Solved! 😊
--
Jean Louis