[Emacro-devel] Re: Emacs Installer for MS Windows (and printing) - a suggestion for ext-progs.el
Brought to you by:
bingalls
From: Bruce I. <ing...@ve...> - 2004-09-11 13:35:12
|
Hmm. I could not find "getfile.exe" that w32-dlgopen.el depends on, anywhere on my Windows system. I would have preferred a more portable solution, but it looks that I will end up writing a statically compiled binary to ship with EMacro. Hopefully, I can have it call the common dialog box, for consistent look & feel. I'm busy these days, but I'll see what I can do. BTW, I put in a patch for IMAP, but cannot test (I just have POP). Perhaps I'll do a beta release of EMacro, before implementing this printing feature. BTW, EMacro already does persistence (aka pickling). Since LISP is an interpreted language, you can just write setq() statements to a file that you load, which is what e-prefs.el does. You can pass these preferences via the command line or .ini file to a binary printing dialog box. Lennart Borgman wrote: >Hi Drew, > >----- Original Message ----- >From: "Drew Adams" <dre...@or...> > > > >>1. I applaud your efforts to try to make Emacs work easier with Windows. I >>hope you will ask for and get help and input from others, because a) the >>problem isn't necessarily easy (if done right) and 2) this project will >> >> >help > > >>in the adoption of Emacs by more Windows users - it will be more likely to >>succeed if you get more input. >> >> > >Thanks, yes, I have seen I need the input from others. I have however kept >some of the efforts in private mails to begin with tosavepeoplestime.And >I have not uploaded the code for the installer yet, because I need to polish >a bit so someone else has a chance to read the code ;-) > > > >>2. Unfortunately, I don't have the resources to be able to help with this >>(test, code). I've looked at your code briefly, but I can't judge it. For >>one thing, I still don't know how to use customize! :). (I still use >>defvar!) >> >> > >There are surely things about customize I do not know about and that I would >like help with. I believe that the developers list is the right place to ask >for help with this, but I do not want to send it there now because RMS which >to get the new release ready. I will try Emacs Wiki after your and Vinicius >comments here. > > > >>3. I'm not sure what you mean by ignoring Windows + Cygwin. >> >> > >I just meant that I do not use this entries in the code for >ext-progs-path-alist. There were special entries for this in pr-path-alist >from where I stole the code. > > > >>4. Previously, I think you had mentioned trying to use the Windows default >>printer, and you wrote some code to take advantage of Windows file >>associations in Emacs. Below is something related from help-gnu-emacs >> >> >(Bruce > > >>Ingallis) about obtaining 1) Window printer info programmatically, and 2) >>letting users use the Windows printer dialog box from Emacs. You might >> >> >want > > >>to hook up with Bruce to work on your project. Something else (somewhat) >>related to that is w32browser-dlgopen.el, based on dlgopen.el by Binu Jose >>Philip. I just uploaded w32browser-dlgopen.el to EmacsWiki >>(http://www.emacswiki.org/elisp/wthreetwobrowser-dlgopen.el). The C source >>code for dlgopen functionality is attached, just in case you can no longer >>find it on the web. >> >> > >Thanks, I have included dlgopen already as a choice in the installer. > >When it comes to the printer choices I fear it is complicated. You normally >in ms windows get a printer dialog where there is an option for choosing the >printer and different options depending on the printer you choose. This >dialog will show up from my w32-print.el (because it is shown by mshtml.dll >which is used by the shell for printing html files). I believe it is also >shown by Ghostview and its relatives. However there is still one problem >(even if one likes these solutions): If you temporarily change the printer >this temporary setting is lost when you print the next time from Emacs. This >is because the temporary setting is set in the subprocess that prints and >this is killed and restarted every time a print job is started from Emacs. > >I do not believe that the suggestion below for finding the list of printers >is useful here. Indeed I do believe that it clutters the user interface for >Emacs on windows since it present the user with a new interface for choosing >printers that is not familiar for ms windows users. Maybe it could be of >help for setting the default printer temporarily but I doubt it. However I >could be wrong of course ;-) > >The problems with the printer choice comes from the fact that the printing >API:s in the GDI interface is not used. If the structure of ps-print.el and >the GDI interface is suffeciently similar it would perhaps be possible to >manage to get this into Emacs by a minor rewrite of ps-print.el (with >something similar to w32::API in perl), but it still requires a whole lot of >work and a very good knowledge of ps-print, PostScript and the GDI API. >However if that was done Ghostview and relatives would no longer be needed >on ms windows for Emacs printing. Then it would of course unfortunately be >different on other os:es. So it would be best to do that kind of thing at >least in concert with a rewrite for GNU/Linux. I guess there is something >similar to the GDI interface. Or there is going to be if GNU/Linux will have >success. Big job ;-( > > > >>5. A final piece of advice (a request), which you are probably following >>anyway: It's best to adopt the Unix philosophy of making small, modular >>stuff that can work together (mix & match) to make bigger stuff, rather >> >> >than > > >>try to provide a global, monolithic "solution" for everthing & everyone. >> >> >The > > >>latter is condemned to be ignored by most users. >> >> > >A very good advice. I started a bit differently but soon realized that I >have to split things so I have done that. However I still want a global >solution at installation. This is going to be a hierarchic solution shown in >a tree and I hope that fulfills both the wish for a global solution and the >wish for small, modular pieces. > >Kind regards, >Lennart > > >>-----Original Message----- >>From: help-gnu-emacs-bounces+drew.adams=ora...@gn... >>[mailto:help-gnu-emacs-bounces+drew.adams=ora...@gn...]On Behalf >>Of Michael Slass >>Sent: Friday, September 10, 2004 3:06 PM >>To: hel...@gn... >>Subject: Re: dialog boxes >> >>Bruce Ingalls <ingallsb@verizon._NO.SPAM_.net> writes: >> >> >> >>>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. >>> >>> >>At the absolute quickest and dirtiest end of the spectrum, you could >>use the list you get from VB to create a list of lists, and use that >>in `completing-read'. >> >>(message "you chose printer %s" >> (completing-read >> "chose a printer: " >> (mapcar >> (lambda (elt) (list elt)) >> ( <list of printers here> )) nil t)) >> >>completing-read will pop-up the "window of possibilities", which I >>think you can mouse-click on to select a choice. >> >>Not exactly what you want, but REALLY fast to implement. -- Mike Slass >> >> > > > > |