From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: just-the-text Emacs frame (was: Emacs as a desktop environment) Date: Sat, 28 May 2011 12:49:59 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <874o4ebtq0.fsf_-_@lifelogs.com> References: <87aaebbndz.fsf@lifelogs.com> <4DDDA5A7.6040109@siege-engine.com> <87boyp5vyi.fsf@lifelogs.com> <87mxi8xq6y.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1306605023 12621 80.91.229.12 (28 May 2011 17:50:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 28 May 2011 17:50:23 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 28 19:50:19 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QQNeU-0000Qv-FE for ged-emacs-devel@m.gmane.org; Sat, 28 May 2011 19:50:18 +0200 Original-Received: from localhost ([::1]:47186 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQNeU-0006Y3-4G for ged-emacs-devel@m.gmane.org; Sat, 28 May 2011 13:50:18 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:37982) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQNeR-0006Xu-PH for emacs-devel@gnu.org; Sat, 28 May 2011 13:50:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQNeQ-0005ft-Ld for emacs-devel@gnu.org; Sat, 28 May 2011 13:50:15 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:55015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQNeQ-0005fk-8U for emacs-devel@gnu.org; Sat, 28 May 2011 13:50:14 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QQNeO-0000Ox-4e for emacs-devel@gnu.org; Sat, 28 May 2011 19:50:12 +0200 Original-Received: from c-67-186-102-106.hsd1.il.comcast.net ([67.186.102.106]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 28 May 2011 19:50:12 +0200 Original-Received: from tzz by c-67-186-102-106.hsd1.il.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 28 May 2011 19:50:12 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 52 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-67-186-102-106.hsd1.il.comcast.net X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:LVGDJx7SR1Kw62Yau/vXmIyFnLw= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:139842 Archived-At: I just want to display some text, nothing else. How about this (based on your code) to show some arbitrary text in a popup (no menus, modeline, etc., just the buffer is visible)? I think it will DTRT whether the frame is shown already or not. I can use this to show the indicators, icons, and status messages. #+begin_src lisp (require 'battery) (require 'timeclock) (defvar popup-info-frame) (defun popup-info-string () (format "%s\n%s\n%s\n%s" (format-time-string "%H:%M %Y-%m-%d" (current-time)) (battery-format battery-echo-area-format (funcall battery-status-function)) (timeclock-status-string) (shell-command-to-string "nmcli -p dev"))) (defun popup-info () (interactive) (popup-info--1 " *popup status*")) (defun popup-info--1 (bufname) (with-current-buffer (get-buffer-create bufname) (make-local-variable 'popup-info-frame) (if (and (boundp 'popup-info-frame) popup-info-frame (member popup-info-frame (frame-list))) (select-frame popup-info-frame) (let ((default-frame-alist '((minibuffer . nil) (width . 20) (border-width . 0) (menu-bar-lines . 0) (tool-bar-lines . 0) (unsplittable . t) (left-fringe . 0)))) (switch-to-buffer-other-frame bufname) (setq popup-info-frame (selected-frame)))) (erase-buffer) (setq mode-line-format nil) (redraw-modeline) (insert (popup-info-string)))) #+end_src Let me know what you think. It supports any number of status buffers by name and behaves correctly even if the frame is closed. Thanks! Ted