Skip navigation

Tag Archives: cygwin

I picked a neat trick at to cancel a command from the shell with “C-q C-c RET” if I need to interrupt a process in a remote shell opened via tramp (only with my windows laptop which I run with cygwin and emacs

Until now, without it, I found it very frustrating for example trying to cancel a heredoc inside a shell: due to some obscure reason, typing “C-c C-c(comint-interrupt-job) rather than get me back at the shell prompt, would kill the connection with the message “Process shell interrupt”.

Again though this alternative is only necessary to me when connected to remote hosts using the windows version of emacs, it’s a sweet discovery nonetheless.

For those that haven’t had the chance to use it, wget is a powerful gnu application that allow to retrieve content non interactively from the web, which makes it ideal to an array of sys-admin tasks. It gets a bit hard to tame so much power and you need to craft the outcome by carefully picking inside the command options. Something practical, like downloading the entire or partial content from inside a folder and its sub-folder, for example, requires a couple of parameters to be passed so not to get confused by the unintuitive way the program goes about retrieving upper-level directories along with the desired stuff.
When you specify the recursive option (-r) to address a site path like you would reasonably expect to get every content from that point down the directory tree (much in the fashion that cp -rf would do it, coping all in the hierarchy below) but given the weird behavior of fetching other directories above, the extra option ‘–no-parent’ proves essential.

Along with those two I normally include a couple of extra parameters:

:: ‘-nv; (or ‘–no-verbose‘) that turns off verbose output, without being completely quiet, which means that errors messages and basic information still get printed;

:: ‘-nH‘ (‘or –no-host-directories‘) that disable the generation of host-prefixed directories. By default, invoking wget with ‘-r’ will create a structure of directories beginning with

The hypothetical example then will look something like:

wget -r -np -nv -nH

After upgrading Cygwin I couldn’t use the clipboard when working remotely through ssh until I found that the trick was to call an xterm with the right parameter:
"XWin -clipboard -multiwindow"

(I also had previously checked the option “Quick Edit Mode” inside Cygwin properties, which you access right-clicking the top bar and selecting properties. When I tried that alone, as I read would, it didn’t work for me. This is trivial to experts but worth knowing for beginners. )

Also to remember, the way to paste something into an xterm window in *nix is to use the middle button.