From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: dialog boxes Date: Fri, 17 Sep 2004 09:47:29 -0600 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <414B0711.2030901@yahoo.com> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1095436173 25199 80.91.229.6 (17 Sep 2004 15:49:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 17 Sep 2004 15:49:33 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 17 17:49:23 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C8KzD-0003pL-00 for ; Fri, 17 Sep 2004 17:49:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C8L4w-0005eW-EC for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Sep 2004 11:55:18 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 53 Original-X-Trace: news.uni-berlin.de RX9ZwFupGRR9+cXVsBsrhAEMm3GNLyJxZZRzwyUfCyAIsHcG4= User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us Original-Xref: shelby.stanford.edu gnu.emacs.help:125379 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 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.org@gnu.org Xref: main.gmane.org gmane.emacs.help:20734 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:20734 Bruce Ingalls wrote: > I discovered that I can use VBScript to enumerate available printers. > There may even be a way to query the w32 registry via Emacs for the > system default printer. > > I'd like to present users with a dialog box, to choose a printer. > Since Emacs allows certain widgets/Windows controls in Customize > buffers, and Emacs allows popups, can I put radio buttons and/or check > boxes into a popup dialog box? > > Otherwise, some sample code, which makes it easy to populate a Customize > buffer with options and a submit button, to act like a dialog box, would > be appreciated. > > Who knows? Perhaps it will be possible to scan /etc/printcap or > Gnome/KDE settings, to choose a printer at runtime. A long time ago I wrote printers.el, which does exactly that. It needs to be updated to set the printer-name variable, which was introduced in Emacs 20. Google for: From: kevinr@ihs.com (Kevin Rodgers) Subject: printers.el 1.6 Newsgroups: gnu.emacs.sources Date: 1995/08/21 Message-ID: <9508212016.AA04940@airedale.ihsyp> Here's the commentary: ;;;; printers.el -- An interface to `lpstat` (SysV) and /etc/printcap (BSD). ;;; Description: ;;; ;;; Determines the default printer and the list of available printers ;;; from the LPDEST environment variable and the `lpstat` command (SysV) ;;; or from the PRINTER environment variable and the /etc/printcap file ;;; (BSD), and stores them in the `system-printer-default' and `system- ;;; printer-list' variables. ;;; ;;; The list of available printers is used by the `read-printer' ;;; function to provide completion, which is used in turn by the ;;; `set-system-printer-default' command to set the default printer used ;;; by the `lp` (SysV) and `lpr` (BSD) commands. The `set-system-printer- ;;; list' command can be used to re-initialize the list, in case the ;;; system printers have been reconfigured since printers.el was loaded. ;;; ;;; On BSD systems, the `system-printer-field' variable controls whether ;;; all the `|'-separated names for each printer in /etc/printcap are ;;; listed in `system-printers'. -- Kevin Rodgers