After googling around a bit, I saw a few suggestion that trie to fix the path in emacs, but I think a better approach is to launch emacs from within bash so it inherits the bash environment.
Here is my attempt using vbscript:
Set WinScriptHost = CreateObject("WScript.Shell")
strCmd = "C:\cygwin\bin\bash --login -c '/usr/local/bin/emacsclient -c -a /usr/local/bin/emacs.exe"
If WScript.Arguments.Count = 1 Then
'strCmd = strCmd & " " &"""" & WScript.Arguments(0) & """'"
strCmd = strCmd & "'" 'close single quote
Set WinScriptHost = Nothing
Save that script somewhere and then make a Windows Shortcut to it but incle the wscript.exe in the target:
I had this problem where prints to our CUPS-PDF printer sometimes failed to be processed on the server. The job would disappear as though it has been printed but nothing else would happen. Printing from the same application to a Windows based PDF printer, and then printing the resulting PDF via Adobe Acrobat to the CUPS PDF printer would work fine. Printing the same PDF via Sumatra PDF to CUPS-PDF would also fail.
Further investigation revealed that the resulting print job files would differ. The jobs that fail looked like they contained a lot of binary data but the ones that succeeded looked like normal PDF files.
Then I discovered this entry in the Windows Event Viewer:
The document XXXX, owned by jason, failed to print on printer \\server\PDF. Try to print the document again, or restart the print spooler.
Data type: NT EMF 1.008. Size of the spool file in bytes: 2555904. Number of bytes printed: 0. Total number of pages in the document: 1. Number of pages printed: 0. Client computer: \\CLIENT. Win32 error code returned by the print processor: 0. The operation completed successfully.
Googleing that error took me to this RPi forum which had a solution buried down near the bottom. Thanks to Chemirocha for that tip. This bug has been plaguing me for a few years on and off!
Every so often I need to make a bootable USB stick in Windows 7 (64 bit) of a debian installer iso. For some reason my googling usually does not reveal a simple solution for this.
I asked on #debian on the OFTC network and got various suggestions. The first suggestions were to use win32 compiled variants of dd or rawwrite. The problem is that there seems to be multiple versions of these tools out there and the ones I tried all seemed to have issues of one sort or another, mostly to do with dd complaining that it would not run on 64 bit Windows. My other issue is that they are command line based. Not that I mind using the command line but it does feel fiddly when all you want to do is get on with writing the image to the USB stick so you can install Debian.
Next I came up with unetbootin. This looks promising and seems to work but it does some very strange rewriting of the boot menus you get on the resulting USB stick. I was confused by the menus when I first saw it and I’m sure novice users would have no idea what to do.
Finally dvs on #debian suggested win32diskimager. This is exactly what I wanted. A point and click solution.
Select the DVD image you want. If the file’s extension is .iso you’ll need to change the filter from *.img;*.IMG to *.* in order to see the file. Then select the Device you want to write to. Hit Write and go and have a cup of tea while it writes the ISO to the USB stick.
Then, install the very nice tool apt-cyg which makes package management much easier in cygwin.
Then to save yourself lots of agony of trying to work out which cygwin packages you need to install to be able to compile emacs, here is the list of all the packages I have installed. It may be a little bit of overkill but it will save you time. I obtained the list like this:
git clone git://git.savannah.gnu.org/emacs.git
./configure --with-w32# to ditch gtk and the concomitant gtk bug, thanks jlfmake
git clone git://git.savannah.gnu.org/emacs.git
./configure --with-w32 # to ditch gtk and the concomitant gtk bug, thanks jlf
If make is successful, test the build by running emacs from the src directory:
If that worked ok, you can:
Setting up your home
I like my cygwin home directory to be the same as windows %USERPROFILE% so I set the environment variable HOME=%USERPROFILE%.
Set up a shortcut to launch emacs
Make a shortcut to c:\cygwin\bin\run.exe on your desktop, and rename it to emacs.
Edit the shortcut to:
Target: C:\cygwin\bin\run.exe /usr/local/bin/emacsclient "-c" "-a" "/usr/local/bin/emacs.exe" #
Start in: %USERPROFILE%
The target part makes sure emacs launches a new window whether or not its already running. If it is already running and as a server, it will create a new frame connected to the server.
The start in part makes sure the new instance’s default-directory is your home directory which I think makes most sense for when you are launching from a shortcut.
Drop the shortcut onto your start menu. You should now be able to launch emacs from the start menu, or by pressing the Windows key and typing emacs.
I have been getting very confused between the mouse wheel scroll directions in Windows 7 and Mac OS X Lion. As I consider OS X to be the future, I decided to try and flip the mouse wheel scroll direction in Windows.
Turns out there is a registry setting to do this: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\HID\????\????\Device Parameters
Set the value of FlipFlopWheel to 1
You need to find the USB enumeration values (shown above as ????). You can get those by going to the Mouse Control Panel, click on the hardware tab and click Properties. then in the Details tab of the HID-compliant mouse Properties window, look at the Device Instance Path property. It will be something like: HID\VID_046D&PID_C049&MI_00\7&25DD4DC&0&0000
This is quite well documented on superuser.com and there is even a link to a little .exe that automates the whole process for you. Although I have not tried it so I can’t vouch for it.
I have tried a number for desktop search programs like google desktop search and copernic, but none of them were any good for finding files and thats precicely what I wanted to use them for. I just found this great app, locate for win32. It does exactly what I was looking for. Get it here.