unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Jean Louis <bugs@gnu.support>
To: Joel Reicher <joel.reicher@gmail.com>
Cc: Help GNU Emacs <help-gnu-emacs@gnu.org>
Subject: SOLVED - Re: buffer live, but buffer-live-p gives nil
Date: Thu, 26 Dec 2024 14:12:01 +0300	[thread overview]
Message-ID: <Z206AfGW-o-ss2ev@lco2> (raw)
In-Reply-To: <861pxvdl3m.fsf@gmail.com>

* 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



      reply	other threads:[~2024-12-26 11:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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   ` Jean Louis [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z206AfGW-o-ss2ev@lco2 \
    --to=bugs@gnu.support \
    --cc=help-gnu-emacs@gnu.org \
    --cc=joel.reicher@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).