unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* buffer live, but buffer-live-p gives nil
@ 2024-12-25 14:05 Jean Louis
  2024-12-25 19:06 ` Michael Heerdegen via Users list for the GNU Emacs text editor
  2024-12-26  6:17 ` Joel Reicher
  0 siblings, 2 replies; 4+ messages in thread
From: Jean Louis @ 2024-12-25 14:05 UTC (permalink / raw)
  To: Help GNU Emacs

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)

It is a mystery, but how is that possible? 🤔

Jean Louis




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

* Re: buffer live, but buffer-live-p gives nil
  2024-12-25 14:05 buffer live, but buffer-live-p gives nil Jean Louis
@ 2024-12-25 19:06 ` Michael Heerdegen via Users list for the GNU Emacs text editor
  2024-12-26  6:17 ` Joel Reicher
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Heerdegen via Users list for the GNU Emacs text editor @ 2024-12-25 19:06 UTC (permalink / raw)
  To: help-gnu-emacs

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)
>
> It is a mystery, but how is that possible? 🤔

It's a mystery to everyone since you forgot to tell what value you had
assigned to that variable...

Michael.




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

* Re: buffer live, but buffer-live-p gives nil
  2024-12-25 14:05 buffer live, but buffer-live-p gives nil Jean Louis
  2024-12-25 19:06 ` Michael Heerdegen via Users list for the GNU Emacs text editor
@ 2024-12-26  6:17 ` Joel Reicher
  2024-12-26 11:12   ` SOLVED - " Jean Louis
  1 sibling, 1 reply; 4+ messages in thread
From: Joel Reicher @ 2024-12-26  6:17 UTC (permalink / raw)
  To: Jean Louis; +Cc: Help GNU Emacs

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

Regards,

        - Joel



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

* SOLVED - Re: buffer live, but buffer-live-p gives nil
  2024-12-26  6:17 ` Joel Reicher
@ 2024-12-26 11:12   ` Jean Louis
  0 siblings, 0 replies; 4+ messages in thread
From: Jean Louis @ 2024-12-26 11:12 UTC (permalink / raw)
  To: Joel Reicher; +Cc: Help GNU Emacs

* 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



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

end of thread, other threads:[~2024-12-26 11:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-25 14:05 buffer live, but buffer-live-p gives nil Jean Louis
2024-12-25 19:06 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-12-26  6:17 ` Joel Reicher
2024-12-26 11:12   ` SOLVED - " Jean Louis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).