From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tomas Hlavaty Newsgroups: gmane.emacs.help Subject: Re: Screenshots, frame shots straight from Emacs Date: Tue, 20 Jul 2021 21:44:36 +0200 Message-ID: <87a6mgwz17.fsf@logand.com> References: <87sg1dgbbk.fsf@omarpolo.com> <87pmwhg843.fsf@omarpolo.com> <8735t96mxj.fsf@omarpolo.com> <87pmw961ox.fsf@zoho.eu> <874kcpxln9.fsf@logand.com> <87pmvcdgqg.fsf@t14.reltub.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11576"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Leo Butler Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 20 21:45:27 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5vgE-0002nP-H6 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 20 Jul 2021 21:45:26 +0200 Original-Received: from localhost ([::1]:34672 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5vgD-00008b-CV for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 20 Jul 2021 15:45:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53276) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5vfV-00006b-Ve for help-gnu-emacs@gnu.org; Tue, 20 Jul 2021 15:44:42 -0400 Original-Received: from logand.com ([37.48.87.44]:40080) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5vfU-0001BP-4M for help-gnu-emacs@gnu.org; Tue, 20 Jul 2021 15:44:41 -0400 Original-Received: by logand.com (Postfix, from userid 1001) id 1921219FCDF; Tue, 20 Jul 2021 21:44:38 +0200 (CEST) X-Mailer: emacs 27.2 (via feedmail 11-beta-1 I) In-Reply-To: <87pmvcdgqg.fsf@t14.reltub.ca> Received-SPF: pass client-ip=37.48.87.44; envelope-from=tom@logand.com; helo=logand.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:131897 Archived-At: Hi Leo, On Tue 20 Jul 2021 at 12:42, Leo Butler wrote: > Tomas Hlavaty writes: > >> this one works with plain console emacs: >> https://logand.com/sw/emacs-framebuffer/file/emacs-framebuffer.el.html#l= 755 > > Nice. I have not tried it yet, but I do notice that thanks for your feedback! > https://logand.com/sw/emacs-framebuffer/file/emacs-framebuffer.el.html#l28 > > requires cl. > > Also, when byte-compiling the file, I ran into 3 warnings which are easy > to correct (see attached). I still haven't got it working, but I think > that is due to user error. What Emacs version are you using? In Emacs 27.2, I get 2 warnings: emacs-framebuffer.el:28:1:Warning: cl package required at runtime and In framebuffer-hh:mm:ss: emacs-framebuffer.el:666:38:Warning: reference to free variable =E2=80=98po= sition=E2=80=99 The first one does not break anything. The second one is a bug relevant only for viewing videos on the console from a chosen position. None of them break screenshot functionality. There is /dev/fb0 hardcoded so this might cause problems for some but I actually never experienced any other device. It would be interesting to know, how to properly detect which device is actually used if there are more than one. > -(require 'cl) > +(require 'cl-lib) What is the difference? Why is that needed? Is it it backward compatible? There have been changes to working with cl package for some time, has the dust settled yet? > +(make-variable-buffer-local > + (defvar framebuffer-image-mode-current-page)) > + > (defun framebuffer-draw (x y w h sx sy sw sh file) > (setq file (framebuffer-cache-remote file)) > (let ((format (framebuffer-file-format file))) > @@ -465,8 +468,6 @@ > (defvar framebuffer-image-mode-image-size)) > (make-variable-buffer-local > (defvar framebuffer-image-mode-npages)) > -(make-variable-buffer-local > - (defvar framebuffer-image-mode-current-page)) I seems to be necessary to have these defined before use so I will probably move those to the beginning of the file. I did not get a warning for this. Did you get a warning? > - (format "%d:%02d:%02d" (floor position 3600) (floor (- m s) 60) s= ))))) > + (format "%d:%02d:%02d" (floor sec 3600) (floor (- m s) 60) s))))) Thanks, I'll fix this typo. Tomas