tag:blogger.com,1999:blog-94176483132243912025-01-24T01:23:04.584-07:00The Babbage Filestips, hacks, and musingsbe_slayedhttp://www.blogger.com/profile/02920742528327860445noreply@blogger.comBlogger31125tag:blogger.com,1999:blog-9417648313224391.post-71780625894680160772018-06-07T23:14:00.003-06:002018-06-07T23:14:28.804-06:00Babbage Files moving to new site<div dir="ltr" style="text-align: left;" trbidi="on"> I've created a new site, with new technology. This blog will no longer be updated. Please join me over at the new (Neo-) Babbage Files at <a href="https://babbagefiles.xyz/">https://babbagefiles.xyz</a>.</div> be_slayedhttp://www.blogger.com/profile/02920742528327860445noreply@blogger.com0tag:blogger.com,1999:blog-9417648313224391.post-36529257943769121262017-11-11T15:25:00.000-07:002017-11-11T15:49:30.575-07:00More pdf-tools tricks<div dir="ltr" style="text-align: left;" trbidi="on"> Following a <a href="http://irreal.org/blog/?p=6737">couple of recent postings on pdf-tools</a>, here are a few customisations I've found handy.<br /> <br /> For scanned pdfs, <span style="font-size: 12pt;"><code class="elisp">'pdf-view-auto-slice-minor-mode</code></span> can be useful to turn on. You <a href="https://github.com/politza/pdf-tools/pull/326">might bind it</a> to something like <span style="font-size: 12pt;"><code class="elisp">s a</code></span>. It auto trims the borders for each page of the pdf as it encounters them.<br /> <br /> The following sets up a variety of colour-filter modes (good for night-time viewing, or anytime really that you don't want your eyeballs blasted with blazing white light):<br /> <br /> <pre><code><span style="font-size: 10pt;">;; midnite mode hook (add-hook 'pdf-view-mode-hook (lambda () (pdf-view-midnight-minor-mode))) ; automatically turns on midnight-mode for pdfs (setq pdf-view-midnight-colors '("#ff9900" . "#0a0a12" )) ; set the amber profile as default (see below) (defun bms/pdf-no-filter () "View pdf without colour filter." (interactive) (pdf-view-midnight-minor-mode -1) ) ;; change midnite mode colours functions (defun bms/pdf-midnite-original () "Set pdf-view-midnight-colors to original colours." (interactive) (setq pdf-view-midnight-colors '("#839496" . "#002b36" )) ; original values (pdf-view-midnight-minor-mode) ) (defun bms/pdf-midnite-amber () "Set pdf-view-midnight-colors to amber on dark slate blue." (interactive) (setq pdf-view-midnight-colors '("#ff9900" . "#0a0a12" )) ; amber (pdf-view-midnight-minor-mode) ) (defun bms/pdf-midnite-green () "Set pdf-view-midnight-colors to green on black." (interactive) (setq pdf-view-midnight-colors '("#00B800" . "#000000" )) ; green (pdf-view-midnight-minor-mode) ) (defun bms/pdf-midnite-colour-schemes () "Midnight mode colour schemes bound to keys" (local-set-key (kbd "!") (quote bms/pdf-no-filter)) (local-set-key (kbd "@") (quote bms/pdf-midnite-amber)) (local-set-key (kbd "#") (quote bms/pdf-midnite-green)) (local-set-key (kbd "$") (quote bms/pdf-midnite-original)) ) (add-hook 'pdf-view-mode-hook 'bms/pdf-midnite-colour-schemes)</span> </code></pre> <br /> <br /> This automatically sets pdf-tools to display using the midnight mode amber filter.<br /> You can return to the original/no-filter with "!" (i.e. S-1); set amber filter with "@" (i.e. S-2); set green filter with "#" (i.e. S-3); set the bluish original midnight mode colours with "$" (i.e. S-4). See below for screenshots of these different settings.<br /> <br /> <div class="separator" style="clear: both; text-align: center;"> </div> <br /> <div class="separator" style="clear: both; text-align: center;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDYP1Jqxb_1U1Uwj-D57U-7hmMRPfoXt-ozUKJ72V-zDNWGsaVrjB-cvPwfkH6Zt8fZthvmCqq-cHXM21UwzZwSWkjUWSBq1grpyF0_1ZbMcdGCP_2KlpnIbTKZ8k56j3f7k5WeySEyOE/s1600/pdf-tools-original_white.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="848" data-original-width="1600" height="169" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDYP1Jqxb_1U1Uwj-D57U-7hmMRPfoXt-ozUKJ72V-zDNWGsaVrjB-cvPwfkH6Zt8fZthvmCqq-cHXM21UwzZwSWkjUWSBq1grpyF0_1ZbMcdGCP_2KlpnIbTKZ8k56j3f7k5WeySEyOE/s320/pdf-tools-original_white.png" width="320" /></a></div> <br /> <div class="separator" style="clear: both; text-align: center;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIG-HckbQmE4Bsmg4Q0N-QKAdfZ1jz2GQa0bmxyMlYG2-5lG1fyxUT5fb1ipMvZ-ir0I2p-5AbinFoRkqT5ZKT0OGHjU_x0g9dJTkDYBf3ZafGXb8hgUb0b20YfIlQbB2ysk4bGfub85g/s1600/pdf-tools-crt_amber.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="855" data-original-width="1600" height="171" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIG-HckbQmE4Bsmg4Q0N-QKAdfZ1jz2GQa0bmxyMlYG2-5lG1fyxUT5fb1ipMvZ-ir0I2p-5AbinFoRkqT5ZKT0OGHjU_x0g9dJTkDYBf3ZafGXb8hgUb0b20YfIlQbB2ysk4bGfub85g/s320/pdf-tools-crt_amber.png" width="320" /></a></div> <br /> <div class="separator" style="clear: both; text-align: center;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCY4d7P_YROhN0PaPDc3lM0E92xG6Q99iCUu3DWDv25tFQjuUHccvXmY-PsP7MkFk73PM-JHWqkNl6ra5iI-vNUyR5p9gIkTc9KJKcOsqOq8ALug_jfzEgO2R90lSHwwELb2vqMtHJpk0/s1600/pdf-tools-terminal_green.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="854" data-original-width="1600" height="170" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCY4d7P_YROhN0PaPDc3lM0E92xG6Q99iCUu3DWDv25tFQjuUHccvXmY-PsP7MkFk73PM-JHWqkNl6ra5iI-vNUyR5p9gIkTc9KJKcOsqOq8ALug_jfzEgO2R90lSHwwELb2vqMtHJpk0/s320/pdf-tools-terminal_green.png" width="320" /></a></div> <br /> <div class="separator" style="clear: both; text-align: center;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1uCw1_YC5l-3b5Q9NJgkXgH2cjHcwrvFHm5a_JJ3ALmnx4Su2_HTvIWVwOQ2eqdBL1YbhPG54naD7fNPLPA53qmuK6HYMqpH5ES1nhMVQS8KYyBUJg8_GZWL191nWuoYp18quGtWyYX8/s1600/pdf-tools-midnight_mode.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="853" data-original-width="1600" height="170" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1uCw1_YC5l-3b5Q9NJgkXgH2cjHcwrvFHm5a_JJ3ALmnx4Su2_HTvIWVwOQ2eqdBL1YbhPG54naD7fNPLPA53qmuK6HYMqpH5ES1nhMVQS8KYyBUJg8_GZWL191nWuoYp18quGtWyYX8/s320/pdf-tools-midnight_mode.png" width="320" /></a></div> <br /> <br /> You also probably want to set the <span style="font-size: 12pt;"><code class="elisp">pdf-annot-default-markup-annotation-properties</code></span> color to "#ff0000", as well as the <span style="font-size: 12pt;"><code class="elisp">pdf-annot-default-text-annotation-properties</code></span> color to "#ff0000". This is a colour that is actually visible in the midnight-modes. If you go with the default yellow for markup it will not be easily visible in any of these colour-filter modes.</div> be_slayedhttp://www.blogger.com/profile/02920742528327860445noreply@blogger.com1tag:blogger.com,1999:blog-9417648313224391.post-20740107615189945552017-03-12T20:35:00.000-06:002017-11-11T15:44:11.294-07:00Take Elfeed everywhere: Mobile rss reading Emacs-style (for free/cheap)<div dir="ltr" style="text-align: left;" trbidi="on"> <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <!-- 2017-03-12 Sun 20:21 --> <title></title> <style type="text/css"> <!--/*--><![CDATA[/*><!--*/ .title { text-align: center; margin-bottom: .2em; } .subtitle { text-align: center; font-size: medium; font-weight: bold; margin-top:0; } .todo { font-family: monospace; color: red; } .done { font-family: monospace; color: green; } .priority { font-family: monospace; color: orange; } .tag { background-color: #eee; font-family: monospace; padding: 2px; font-size: 80%; font-weight: normal; } .timestamp { color: #bebebe; } .timestamp-kwd { color: #5f9ea0; } .org-right { margin-left: auto; margin-right: 0px; text-align: right; } .org-left { margin-left: 0px; margin-right: auto; text-align: left; } .org-center { margin-left: auto; margin-right: auto; text-align: center; } .underline { text-decoration: underline; } #postamble p, #preamble p { font-size: 90%; margin: .2em; } p.verse { margin-left: 3%; } pre { border: 1px solid #ccc; box-shadow: 3px 3px 3px #eee; padding: 8pt; font-family: monospace; overflow: auto; margin: 1.2em; } pre.src { position: relative; overflow: visible; padding-top: 1.2em; } pre.src:before { display: none; position: absolute; background-color: white; top: -10px; right: 10px; padding: 3px; border: 1px solid black; } pre.src:hover:before { display: inline;} /* Languages per Org manual */ pre.src-asymptote:before { content: 'Asymptote'; } pre.src-awk:before { content: 'Awk'; } pre.src-C:before { content: 'C'; } /* pre.src-C++ doesn't work in CSS */ pre.src-clojure:before { content: 'Clojure'; } pre.src-css:before { content: 'CSS'; } pre.src-D:before { content: 'D'; } pre.src-ditaa:before { content: 'ditaa'; } pre.src-dot:before { content: 'Graphviz'; } pre.src-calc:before { content: 'Emacs Calc'; } pre.src-emacs-lisp:before { content: 'Emacs Lisp'; } pre.src-fortran:before { content: 'Fortran'; } pre.src-gnuplot:before { content: 'gnuplot'; } pre.src-haskell:before { content: 'Haskell'; } pre.src-java:before { content: 'Java'; } pre.src-js:before { content: 'Javascript'; } pre.src-latex:before { content: 'LaTeX'; } pre.src-ledger:before { content: 'Ledger'; } pre.src-lisp:before { content: 'Lisp'; } pre.src-lilypond:before { content: 'Lilypond'; } pre.src-lua:before { content: 'Lua'; } pre.src-matlab:before { content: 'MATLAB'; } pre.src-mscgen:before { content: 'Mscgen'; } pre.src-ocaml:before { content: 'Objective Caml'; } pre.src-octave:before { content: 'Octave'; } pre.src-org:before { content: 'Org mode'; } pre.src-oz:before { content: 'OZ'; } pre.src-plantuml:before { content: 'Plantuml'; } pre.src-processing:before { content: 'Processing.js'; } pre.src-python:before { content: 'Python'; } pre.src-R:before { content: 'R'; } pre.src-ruby:before { content: 'Ruby'; } pre.src-sass:before { content: 'Sass'; } pre.src-scheme:before { content: 'Scheme'; } pre.src-screen:before { content: 'Gnu Screen'; } pre.src-sed:before { content: 'Sed'; } pre.src-sh:before { content: 'shell'; } pre.src-sql:before { content: 'SQL'; } pre.src-sqlite:before { content: 'SQLite'; } /* additional languages in org.el's org-babel-load-languages alist */ pre.src-forth:before { content: 'Forth'; } pre.src-io:before { content: 'IO'; } pre.src-J:before { content: 'J'; } pre.src-makefile:before { content: 'Makefile'; } pre.src-maxima:before { content: 'Maxima'; } pre.src-perl:before { content: 'Perl'; } pre.src-picolisp:before { content: 'Pico Lisp'; } pre.src-scala:before { content: 'Scala'; } pre.src-shell:before { content: 'Shell Script'; } pre.src-ebnf2ps:before { content: 'ebfn2ps'; } /* additional language identifiers per "defun org-babel-execute" in ob-*.el */ pre.src-cpp:before { content: 'C++'; } pre.src-abc:before { content: 'ABC'; } pre.src-coq:before { content: 'Coq'; } pre.src-groovy:before { content: 'Groovy'; } /* additional language identifiers from org-babel-shell-names in ob-shell.el: ob-shell is the only babel language using a lambda to put the execution function name together. */ pre.src-bash:before { content: 'bash'; } pre.src-csh:before { content: 'csh'; } pre.src-ash:before { content: 'ash'; } pre.src-dash:before { content: 'dash'; } pre.src-ksh:before { content: 'ksh'; } pre.src-mksh:before { content: 'mksh'; } pre.src-posh:before { content: 'posh'; } /* Additional Emacs modes also supported by the LaTeX listings package */ pre.src-ada:before { content: 'Ada'; } pre.src-asm:before { content: 'Assembler'; } pre.src-caml:before { content: 'Caml'; } pre.src-delphi:before { content: 'Delphi'; } pre.src-html:before { content: 'HTML'; } pre.src-idl:before { content: 'IDL'; } pre.src-mercury:before { content: 'Mercury'; } pre.src-metapost:before { content: 'MetaPost'; } pre.src-modula-2:before { content: 'Modula-2'; } pre.src-pascal:before { content: 'Pascal'; } pre.src-ps:before { content: 'PostScript'; } pre.src-prolog:before { content: 'Prolog'; } pre.src-simula:before { content: 'Simula'; } pre.src-tcl:before { content: 'tcl'; } pre.src-tex:before { content: 'TeX'; } pre.src-plain-tex:before { content: 'Plain TeX'; } pre.src-verilog:before { content: 'Verilog'; } pre.src-vhdl:before { content: 'VHDL'; } pre.src-xml:before { content: 'XML'; } pre.src-nxml:before { content: 'XML'; } /* add a generic configuration mode; LaTeX export needs an additional (add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */ pre.src-conf:before { content: 'Configuration File'; } table { border-collapse:collapse; } caption.t-above { caption-side: top; } caption.t-bottom { caption-side: bottom; } td, th { vertical-align:top; } th.org-right { text-align: center; } th.org-left { text-align: center; } th.org-center { text-align: center; } td.org-right { text-align: right; } td.org-left { text-align: left; } td.org-center { text-align: center; } dt { font-weight: bold; } .footpara { display: inline; } .footdef { margin-bottom: 1em; } .figure { padding: 1em; } .figure p { text-align: center; } .inlinetask { padding: 10px; border: 2px solid gray; margin: 10px; background: #ffffcc; } #org-div-home-and-up { text-align: right; font-size: 70%; white-space: nowrap; } textarea { overflow-x: auto; } .linenr { font-size: smaller } .code-highlighted { background-color: #ffff00; } .org-info-js_info-navigation { border-style: none; } #org-info-js_console-label { font-size: 10px; font-weight: bold; white-space: nowrap; } .org-info-js_search-highlight { background-color: #ffff00; color: #000000; font-weight: bold; } .org-svg { width: 90%; } /*]]>*/--> </style> <script type="text/javascript"> /* @licstart The following is the entire license notice for the JavaScript code in this tag. Copyright (C) 2012-2013 Free Software Foundation, Inc. The JavaScript code in this tag is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License (GNU GPL) as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. The code is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU GPL for more details. As additional permission under GNU GPL version 3 section 7, you may distribute non-source (e.g., minimized or compacted) forms of that code without the copy of the GNU GPL normally required by section 4, provided you include this license notice and a URL through which recipients can access the Corresponding Source. @licend The above is the entire license notice for the JavaScript code in this tag. */ <!--/*--><![CDATA[/*><!--*/ function CodeHighlightOn(elem, id) { var target = document.getElementById(id); if(null != target) { elem.cacheClassElem = elem.className; elem.cacheClassTarget = target.className; target.className = "code-highlighted"; elem.className = "code-highlighted"; } } function CodeHighlightOff(elem, id) { var target = document.getElementById(id); if(elem.cacheClassElem) elem.className = elem.cacheClassElem; if(elem.cacheClassTarget) target.className = elem.cacheClassTarget; } /*]]>*///--> </script> </head> <body> <div id="content"> After the demise of <a href="https://en.wikipedia.org/wiki/Google_Reader">Google Reader</a>, I switched for some time to <a href="https://www.newsblur.com/">NewsBlur</a>. Unfortunately, its Android app never worked well for me. And integrating more of my life into Emacs is always desirable, so once I saw there was an <a href="https://github.com/areina/elfeed-cljsrn">Android interface</a> for the fantastic Emacs RSS reader <a href="https://github.com/skeeto/elfeed">Elfeed</a>, I made the switch. <br /> <br /> The tricky thing with the Elfeed Android client is that it wants to connect to <a href="https://github.com/skeeto/elfeed#web-interface">web interface</a> of an instance of Elfeed running inside of Emacs. I could have done with my home computer, but that would require poking a hole through the firewall and in any case would be non-ideal when for instance I was travelling. <br /> <br /> About a month ago I hit upon a cheap (in fact, free) solution for running a remote instance of Emacs running Elfeed that is connectable with the <a href="https://play.google.com/store/apps/details?id=com.elfeedcljsrn">Android app</a>. The VPS provider <a href="https://www.wishosting.com/">Wishosting</a> offers an OpenVZ mini for <a href="https://www.wishosting.com/order/main/packages/VPS/?group_id=2">$4/year</a>, and if you stick a link to Wishosting on your own domain <a href="https://www.wishosting.com/plugin/support_manager/knowledgebase/view/14/how-to-get-openvz-mini-for-free/">you can get it for free</a>. <br /> <br /> On my home desktop, work desktop, and laptop, I have <a href="https://syncthing.net/">Syncthing</a> installed and I use this to keep the Elfeed database in sync between these machines. <br /> <br /> In this blogpost I outline how to add a remote always-on instance of Elfeed running in Wishosting’s OpenVZ mini which also remains in sync with all of the other machines. (I use <a href="https://github.com/remyhonig/elfeed-org">elfeed-org</a> to organise my feeds, and just keep the elfeed.org file in ~/.elfeed/.) Just use Syncthing to keep the ~/.elfeed directory sync’ed between all of the machines (including any VPS’s). <br /> <br /> I set up an Ubuntu 16.04 LTS VPS on Wishosting, and then installed Emacs and <a href="https://www.linuxbabe.com/ubuntu/install-syncthing-ubuntu-16-04-via-official-deb-repository">Syncthing</a>, and that is what I would recommend. <br /> <br /> <b>Steps</b> <br /> <ul class="org-ul"> <li>Create your Ubuntu 16.04 LTS VPS.</li> <li>Make a (non-root) user with superuser capability. Login with this user.</li> <li>Install Emacs and <a href="https://www.linuxbabe.com/ubuntu/install-syncthing-ubuntu-16-04-via-official-deb-repository">Syncthing</a>.</li> <li>Configure Syncthing appropriately. You can <a href="https://docs.syncthing.net/users/firewall.html#remote-web-gui">connect remotely to the Web GUI</a>.</li> <li> Create and save a .emacs file in your user’s ~ with the following contents: <br /> <div class="org-src-container"> <pre class="src src-emacs-lisp">;; package setup here (require 'package) (package-initialize nil) (setq package-enable-at-startup nil) (add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/")) (package-initialize) ;; general add packages to list (let ((default-directory "~/.emacs.d/elpa/")) (normal-top-level-add-subdirs-to-load-path)) ;; make sure 'use-package is installed (unless (package-installed-p 'use-package) (package-refresh-contents) (package-install 'use-package)) ;;; use-package (require 'use-package) ;; Load elfeed (use-package elfeed :ensure t :bind (:map elfeed-search-mode-map ; ("A" . bjm/elfeed-show-all) ; ("E" . bjm/elfeed-show-emacs) ; ("D" . bjm/elfeed-show-daily) ("q" . bjm/elfeed-save-db-and-bury))) (require 'elfeed) ;; Load elfeed-org (use-package elfeed-org :ensure t :config (elfeed-org) (setq rmh-elfeed-org-files (list "~/.elfeed/elfeed.org")) ) ;; Laod elfeed-goodies (use-package elfeed-goodies :ensure t ) (elfeed-goodies/setup) ;; Load elfeed-web (use-package elfeed-web :ensure t ) ;;; Elfeed (global-set-key (kbd "C-x w") 'bjm/elfeed-load-db-and-open) (define-key elfeed-show-mode-map (kbd "j") 'elfeed-goodies/split-show-next) (define-key elfeed-show-mode-map (kbd "k") 'elfeed-goodies/split-show-prev) (define-key elfeed-search-mode-map (kbd "j") 'next-line) (define-key elfeed-search-mode-map (kbd "k") 'previous-line) (define-key elfeed-show-mode-map (kbd "S-SPC") 'scroll-down-command) ;;write to disk when quiting (defun bjm/elfeed-save-db-and-bury () "Wrapper to save the elfeed db to disk before burying buffer" (interactive) (elfeed-db-save) (quit-window)) ;;functions to support syncing .elfeed between machines ;;makes sure elfeed reads index from disk before launching (defun bjm/elfeed-load-db-and-open () "Wrapper to load the elfeed db from disk before opening" (interactive) (elfeed-db-load) (elfeed) (elfeed-search-update--force) (elfeed-update)) (defun bjm/elfeed-updater () "Wrapper to load the elfeed db from disk before opening" (interactive) (elfeed-db-save) (quit-window) (elfeed-db-load) (elfeed) (elfeed-search-update--force) (elfeed-update)) (run-with-timer 0 (* 30 60) 'bjm/elfeed-updater) (setq httpd-port NNNNN) ; replace NNNNN with a port equalling your start port + 10 (or whatever) (elfeed-web-start) </pre> </div> </li> </ul> Note that you’ll need to configure the httpd-port appropriately as per the comment in the elisp above. <br /> <ul class="org-ul"> <li>Then create the following systemd unit at ~/.config/systemd/user/emacs.service:</li> </ul> <div class="org-src-container"> <pre class="src src-sh">[Unit] Description=Emacs: the extensible, self-documenting text editor [Service] Type=forking ExecStart=/usr/bin/emacs --daemon ExecStop=/usr/bin/emacsclient --eval "(kill-emacs)" Restart=always [Install] WantedBy=default.target </pre> </div> <ul class="org-ul"> <li>Enable and start this unit with:</li> </ul> <div class="org-src-container"> <pre class="src src-sh">$ systemctl --user enable --now emacs </pre> </div> <ul class="org-ul"> <li>And then make sure it runs persistently even when you’re not connected to your VPS via ssh (this tripped me up for some time):</li> </ul> <div class="org-src-container"> <pre class="src src-sh"># loginctl enable-linger USERNAME </pre> </div> <ul class="org-ul"> <li>Install the <a href="https://play.google.com/store/apps/details?id=com.elfeedcljsrn&amp;hl=en">Elfeed Android app</a> on your mobile, enter the app’s Settings, and put in whatever your Wishosting ip is plus the port you chose above (NNNNN), e.g. <a href="http://199.39.100.23:54169/">http://199.39.100.23:54169</a>, for the Elfeed web url.</li> <li>That should be it. Now you’ll have access to your rss feed all over the world and Syncthing will ensure that all changes will be propagated to all of your Emacs instances including your VPS. These changes would include adding and deleting rss feeds and marking of posts as ’read’.</li> <li> Note: on my desktops/laptop I use the following setup for Elfeed: <br /> <div class="org-src-container"> <pre class="src src-emacs-lisp">;; Load elfeed (use-package elfeed :ensure t :bind (:map elfeed-search-mode-map ; ("A" . bjm/elfeed-show-all) ; ("E" . bjm/elfeed-show-emacs) ; ("D" . bjm/elfeed-show-daily) ("q" . bjm/elfeed-save-db-and-bury))) (require 'elfeed) ;; Load elfeed-org (use-package elfeed-org :ensure t :config (elfeed-org) (setq rmh-elfeed-org-files (list "~/.elfeed/elfeed.org")) ) ;; Laod elfeed-goodies (use-package elfeed-goodies :ensure t ) (elfeed-goodies/setup) ;; Load elfeed-web (use-package elfeed-web :ensure t ) ;;functions to support syncing .elfeed between machines ;;makes sure elfeed reads index from disk before launching (defun bjm/elfeed-load-db-and-open () "Wrapper to load the elfeed db from disk before opening" (interactive) (elfeed-db-load) (elfeed) (elfeed-search-update--force) (elfeed-update)) ;;write to disk when quiting (defun bjm/elfeed-save-db-and-bury () "Wrapper to save the elfeed db to disk before burying buffer" (interactive) (elfeed-db-save) (quit-window)) ;;; Elfeed (global-set-key (kbd "C-x w") 'bjm/elfeed-load-db-and-open) (define-key elfeed-show-mode-map (kbd ";") 'visual-fill-column-mode) (define-key elfeed-show-mode-map (kbd "j") 'elfeed-goodies/split-show-next) (define-key elfeed-show-mode-map (kbd "k") 'elfeed-goodies/split-show-prev) (define-key elfeed-search-mode-map (kbd "j") 'next-line) (define-key elfeed-search-mode-map (kbd "k") 'previous-line) (define-key elfeed-show-mode-map (kbd "S-SPC") 'scroll-down-command) </pre> </div> <div class="org-src-container"> <pre class="src src-emacs-lisp">;; probably temporary: hack for elfeed-goodies date column: (defun elfeed-goodies/search-header-draw () "Returns the string to be used as the Elfeed header." (if (zerop (elfeed-db-last-update)) (elfeed-search--intro-header) (let* ((separator-left (intern (format "powerline-%s-%s" elfeed-goodies/powerline-default-separator (car powerline-default-separator-dir)))) (separator-right (intern (format "powerline-%s-%s" elfeed-goodies/powerline-default-separator (cdr powerline-default-separator-dir)))) (db-time (seconds-to-time (elfeed-db-last-update))) (stats (-elfeed/feed-stats)) (search-filter (cond (elfeed-search-filter-active "") (elfeed-search-filter elfeed-search-filter) ("")))) (if (&gt;= (window-width) (* (frame-width) elfeed-goodies/wide-threshold)) (search-header/draw-wide separator-left separator-right search-filter stats db-time) (search-header/draw-tight separator-left separator-right search-filter stats db-time))))) (defun elfeed-goodies/entry-line-draw (entry) "Print ENTRY to the buffer." (let* ((title (or (elfeed-meta entry :title) (elfeed-entry-title entry) "")) (date (elfeed-search-format-date (elfeed-entry-date entry))) (title-faces (elfeed-search--faces (elfeed-entry-tags entry))) (feed (elfeed-entry-feed entry)) (feed-title (when feed (or (elfeed-meta feed :title) (elfeed-feed-title feed)))) (tags (mapcar #'symbol-name (elfeed-entry-tags entry))) (tags-str (concat "[" (mapconcat 'identity tags ",") "]")) (title-width (- (window-width) elfeed-goodies/feed-source-column-width elfeed-goodies/tag-column-width 4)) (title-column (elfeed-format-column title (elfeed-clamp elfeed-search-title-min-width title-width title-width) :left)) (tag-column (elfeed-format-column tags-str (elfeed-clamp (length tags-str) elfeed-goodies/tag-column-width elfeed-goodies/tag-column-width) :left)) (feed-column (elfeed-format-column feed-title (elfeed-clamp elfeed-goodies/feed-source-column-width elfeed-goodies/feed-source-column-width elfeed-goodies/feed-source-column-width) :left))) (if (&gt;= (window-width) (* (frame-width) elfeed-goodies/wide-threshold)) (progn (insert (propertize date 'face 'elfeed-search-date-face) " ") (insert (propertize feed-column 'face 'elfeed-search-feed-face) " ") (insert (propertize tag-column 'face 'elfeed-search-tag-face) " ") (insert (propertize title 'face title-faces 'kbd-help title))) (insert (propertize title 'face title-faces 'kbd-help title))))) </pre> </div> </li> </ul> </div> <b>Screenshots:</b> <div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsSlVbi3QKA8JiZAl8y8aNMpjPoUs_1EkCnPds5qNuK0FMw4mDjpiX_jEm5ZVoPGQovdgf8RG0roxvZNZf2a8pxKg75tIx13dGdJ6o8WZG_7EapiYZuJMIOUmN4V98Wgq6FdFtWEgj6g0/s1600/elfeed-desktop.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsSlVbi3QKA8JiZAl8y8aNMpjPoUs_1EkCnPds5qNuK0FMw4mDjpiX_jEm5ZVoPGQovdgf8RG0roxvZNZf2a8pxKg75tIx13dGdJ6o8WZG_7EapiYZuJMIOUmN4V98Wgq6FdFtWEgj6g0/s320/elfeed-desktop.jpg" width="320" height="180" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRZtQ66aWmHODfCLrb1q3oAmhyDcdXg2Q4Kri-RcNXJTeHB6VgEVTJB1CGKl1EYXRGIu1E3H8gijqQdG_ecxHWbZc1zlozibpyTbk8ejPU3NI-6Poudbt5r8JwRxxikS4Ge1pWFPB7fOw/s1600/elfeed-mobile.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRZtQ66aWmHODfCLrb1q3oAmhyDcdXg2Q4Kri-RcNXJTeHB6VgEVTJB1CGKl1EYXRGIu1E3H8gijqQdG_ecxHWbZc1zlozibpyTbk8ejPU3NI-6Poudbt5r8JwRxxikS4Ge1pWFPB7fOw/s320/elfeed-mobile.png" width="180" height="320" /></a></div> [Also posted at <a href="https://www.reddit.com/r/emacs/comments/5z2s75/take_elfeed_everywhere_mobile_rss_reading/">r/emacs</a>] </body> </html></div> be_slayedhttp://www.blogger.com/profile/02920742528327860445noreply@blogger.com0tag:blogger.com,1999:blog-9417648313224391.post-77488346489600582542014-12-21T15:09:00.002-07:002014-12-21T15:36:41.783-07:00Emacs and (synchronised) org-mode on Android<div dir="ltr" style="text-align: left;" trbidi="on"> Running emacs and org-mode under Android. I’m doing this on my Android tablet - it’s not perhaps as useful on a phone, though it’s not unmanageable. <br /> <br /> There used to be an <a href="https://play.google.com/store/apps/details?id=com.zielm.emacs&amp;hl=en">Emacs app</a> for Android in the Google Play store - in fact it’s still there, but the server it used to download its files from is no longer working - and the app was always a bit fiddly to get to work properly. <br /> <br /> Here’s a better way of getting it working: <br /> <ul class="org-ul"> <li>Install <a href="https://play.google.com/store/apps/details?id=org.dyne.zshaolin">ZShaolin</a>, a console terminal emulator (zsh shell) for Android with a number of useful commandline tools like rsync, awk, imagmagick etc. </li> <li>Then install the files from the old Emacs app. They’re no longer accessible via the app from the Play store, but I had saved the files from back when it still worked, and have zipped them up and thrown them on mega: <a href="https://mega.co.nz/#!B4AThKxI!_ImT57mJNirozxna-1SOcNGAzPRr9QacM34jUoPVMgo">https://mega.co.nz/#!B4AThKxI!_ImT57mJNirozxna-1SOcNGAzPRr9QacM34jUoPVMgo</a> </li> <li>Unzip the files from there and place at <i>/sdcard/emacs</i>/ on your device. </li> <li>Then, open up ZShaolin and start a session, and type “emacs”. Voilà. </li> </ul> Now for getting org-mode to work. Org-mode is part of the basic Emacs setup in recent versions of Emacs (including the one above). For some reason, though, at least when I ran it, I had <a href="https://emacs.stackexchange.com/questions/5552/emacs-on-android-org-mode-error-wrong-type-argument-stringp-require-t">trouble turning on org-mode</a>. Here’s the fix: <br /> <ul class="org-ul"> <li>Create a .emacs file (if you don’t have one already) in ~ under ZShaolin and put the following into: </li> </ul> <div class="org-src-container"> <pre class="src src-emacs-lisp">(<span style="color: #fbde2d;">defun</span> <span style="color: deeppink;">load-history-filename-element</span> (file-regexp) <span style="color: #61ce3c;">"Get the first elt of `</span><span style="color: #4c83ff;">load-history</span><span style="color: #61ce3c;">' whose car matches FILE-REGEXP.</span> <span style="color: #61ce3c;"> Return nil if there isn't one."</span> (<span style="color: #fbde2d;">let*</span> ((loads load-history) (load-elt (and loads (car loads)))) (<span style="color: #fbde2d;">save-match-data</span> (<span style="color: #fbde2d;">while</span> (and loads (or (null (car load-elt)) (not (and (stringp (car load-elt)) <span style="color: darkgrey;">; </span><span style="color: darkgrey;">new condition</span> (string-match file-regexp (car load-elt)))))) (setq loads (cdr loads) load-elt (and loads (car loads))))) load-elt)) </pre> </div> That gets org-mode to work as expected. <br /> <div class="figure"> <a href="http://i.imgur.com/fh9YvOc.png"><img alt="fh9YvOc.png" src="http://i.imgur.com/fh9YvOc.png" height="250" width="400" /></a> <br /> <span class="figure-number">Figure 1:</span> Emacing an org file on Android (with ZShaolin)</div> <br /> Now, most likely you will have org-files that you want to keep synchronized. You may already be running <a href="http://mobileorg.ncogni.to/">MobileOrg</a>, with something like a Dropbox synchronisation. Note that the way that the <a href="https://play.google.com/store/apps/details?id=com.matburt.mobileorg">MobileOrg app</a> works, you can’t edit the org files that it uses directly. MobileOrg utilises some sort of database and the changes that it pushes back are done so through the database, so editing the org files that MobileOrg is synched with (say, in Dropbox) won’t result in any changes being propagated back to your other devices. <br /> <br /> So, if you’re running MobileOrg with Dropbox, you’ll need to have a <b>separate</b> Dropbox synchronisation in order to be able to edit org-files in Emacs on Android in a way that allows for propagation of changes from Android to other devices/repositories. <br /> <br /> Here’s a method which allows for editing of org-mode files on Emacs which allows for back-propagation via Dropbox: <br /> <ul class="org-ul"> <li>Create a separate Dropbox synchronisation directory - that is, separate from the one you use for MobileOrg synchronisation. [The way I did this on my Linux desktop was to create a symlink from my “Org folder” in my Documents directory to the “actual” Org directory in my Dropbox folder. In my setup, this directory also synchs with a git repository, so I ended up excluding the hidden .git directory from synching with Dropbox, since I have only a free, very-limited-space Dropbox account.] </li> <li>Open up the Dropbox app on your Android device. Navigate to your new Org directory (not the one you use for MobileOrg). “Open” any of the org files you want to have access to. It doesn’t matter if they successfully open or not - the act of “opening” them gets the Dropbox app to save a local copy which it will keep synchronised with your Dropbox repository. </li> <li>The location for these local files is a path like this: <i>/sdcard/Android/data/com.dropbox.android/files/u87923223/scratch/YourOrgDirectoryName/</i> the u-number part of the path I assume varies from user to user; and of course the final part of the path will depend on what you named your Org folder and files </li> <li>Files in the above path can be opened in Emacs on Android. Any changes you make will be propagated via Dropbox. </li> </ul> Again, this will be perhaps of limited use on a phone — though ZShaolin does have a built-in software keyboard which works very well for Emacs — on a tablet device with a keyboard (I use an Asus tablet) it works pretty well. (Though I haven’t figured out how to remap CAPSLOCK on my tablet to CTRL yet….) </div> be_slayedhttp://www.blogger.com/profile/02920742528327860445noreply@blogger.com2tag:blogger.com,1999:blog-9417648313224391.post-89171459068599849902014-12-20T21:08:00.000-07:002014-12-21T15:57:53.778-07:00In praise of DejaVu (Sans Mono)<div dir="ltr" style="text-align: left;" trbidi="on"> I do the majority of my work in Emacs - from the composition of linguistics articles and chapters, to lecture slides, to keeping track of grades, to email. Much of what I do requires a monospaced font, and much of what I do requires a good Unicode font. Which narrows the range of potential font candidates significantly. And, since I spend so much time looking at it, I would like the font to be aesthetically-pleasing. <br /> After trying many different fonts, at different sizes and so forth, I’ve found that <a href="http://dejavu-fonts.org/wiki/index.php?title=Main_Page">DejaVu</a> <a href="https://en.wikipedia.org/wiki/DejaVu_fonts">Sans</a> Mono is really the only font which meets all of these criteria. It is really a good-looking font too. Here it is in a few different applications: <br /> <div class="figure"> <a href="http://i.imgur.com/sCIoNLO.jpg"><img height="215" src="http://i.imgur.com/sCIoNLO.jpg" width="400" /></a> <br /> <span class="figure-number">Figure 1:</span> DejaVu Sans Mono in mu4e mail</div> <div class="figure"> <a href="https://i.imgur.com/cMMuHWf.png"><img alt="cMMuHWf.png" height="640" src="https://i.imgur.com/cMMuHWf.png" width="535" /></a> <br /> <span class="figure-number">Figure 2:</span> DejaVu Sans Mono in LaTeX doc</div> <div class="figure"> <a href="https://i.imgur.com/ox7g0FF.jpg"><img alt="ox7g0FF.jpg" height="215" src="https://i.imgur.com/ox7g0FF.jpg" width="400" /></a> <br /> <span class="figure-number">Figure 3:</span> DejaVu Sans Mono displaying some Unicode</div> And…it appears to be the same font used in the terminal in <a href="http://jtnimoy.net/workviewer.php?q=178">Tron: Legacy</a>: <br /> <div class="figure"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnyE-5X-E57mbMFV82S6Bvvlwlxhks_zsihTBYF8-gqM-K1Cor-KJ9OMWpDdWXNE2Oxs4DVIGaWToGPfi5Zn7ScLSqaTjcQmQl4yrblMMWZ57Gf3rz3TxTUCEEfMz6EOAbezB3VZlwftI/s1600/TRON_EMACS.JPG""><img alt="TRON_EMACS.JPG" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnyE-5X-E57mbMFV82S6Bvvlwlxhks_zsihTBYF8-gqM-K1Cor-KJ9OMWpDdWXNE2Oxs4DVIGaWToGPfi5Zn7ScLSqaTjcQmQl4yrblMMWZ57Gf3rz3TxTUCEEfMz6EOAbezB3VZlwftI/s1600/TRON_EMACS.JPG" width="400" /></a> <br /> <span class="figure-number">Figure 4:</span> kill -9ing in Tron: Legacy with DejaVu</div> </div> be_slayedhttp://www.blogger.com/profile/02920742528327860445noreply@blogger.com6tag:blogger.com,1999:blog-9417648313224391.post-55098218191545433122012-06-23T01:01:00.001-06:002012-09-30T15:53:09.511-06:00Who uses Linux? (+Emacs, +TeX)<div dir="ltr" style="text-align: left;" trbidi="on"> <div style="text-align: left;" trbidi="on"> <div style="text-align: left;"> <div style="text-align: justify;"> <h3> Some really rough notes. Suggestions welcome. </h3> Notable people who use Linux (with additional notes on Emacs and TeX users), a first draft.<br /> <br /> My rough criterion for determining who counts as "famous": does the person have a Wikipedia entry?&nbsp;</div> <br /> <div style="text-align: justify;"> Presumably many more can be added under "computer-related" (which is why I put it at the bottom). I'm only listing each person once, under most relevant/salient category (otherwise I could, for instance, list Shuttleworth also under an "astronaut" category).<br /> <br /> See also: "<a href="http://usesthis.com/interviews/linux/">The Setup / Linux</a>" and "<a href="http://www.mylinuxrig.com/">My Linux Rig</a>" for more 'prominent' people and their Linux setups.</div> </div> <br /> <h3 style="color: black; text-align: left;"> <u>Political</u></h3> <h4 style="text-align: left;"> <a href="http://falkvinge.net/">Rick Falkvinge</a>, founder of Swedish Pirate Party [<a href="https://en.wikipedia.org/wiki/Rick_Falkvinge">Wikipedia entry</a>]</h4> <ul style="text-align: left;"> <li>Uses an Ubuntu Linux set-up [<a href="http://rick.falkvinge.usesthis.com/">1</a>]</li> </ul> <h4 style="text-align: left;"> Christian Engström, Swedish Pirate Party MEP [<a href="https://en.wikipedia.org/wiki/Christian_Engstr%C3%B6m">Wikipedia entry</a>]</h4> <ul style="text-align: left;"> <li>Seems to use some sort of Ubuntu Linux set-up [<a href="http://www.blogger.com/%20https://christianengstrom.wordpress.com/2010/03/07/installing-ipredator-under-ubuntu-linux-9-10/">1</a>, <a href="https://christianengstrom.wordpress.com/2008/05/20/3g-mobilt-bredband-pa-ubuntu-linux/">2</a>, <a href="https://christianengstrom.wordpress.com/2007/12/16/holland-valjer-oppen-kallkod/">3</a>]</li> <li>Couple of pics with Richard Stallman from 2004 [<a href="http://christianengstrom.files.wordpress.com/2007/10/ce_vilnius_original.jpg">1</a>, <a href="http://christianengstrom.files.wordpress.com/2007/10/ce_riga_original.jpg">2</a>]</li> </ul> <h4 style="text-align: left;"> <a href="http://ameliaandersdotter.eu/">Amelia Andersdotter</a>, Swedish Pirate Party MEP [<a href="https://en.wikipedia.org/wiki/Amelia_Andersdotter">Wikipedia entry</a>]</h4> <ul style="text-align: left;"> <li>Mentions using Arch, Fedora [<a href="http://www.mylinuxrig.com/post/17820200505/the-linux-setup-amelia-andersdotter-eu-parliament">1</a>, <a href="https://www.networkworld.com/community/node/79232">2</a>] </li> <li>Also Emacs and TeX (see above links)</li> </ul> <div style="text-align: left;"> <b><a href="http://vinay.howtolivewiki.com/blog/about">Vinay Gupta</a>, geopolitical risk analyst [Wikipedia entry]</b></div> <ul style="text-align: left;"> <li>uses Ubuntu Linux [<a href="https://twitter.com/leashless/statuses/224616543986782209">1</a>]<b>&nbsp;</b> </li> <li>inventor of <a href="https://en.wikipedia.org/wiki/Hexayurt">Hexayurt</a> [<a href="http://boingboing.net/2011/10/24/tools-to-not-die-with-an-interview-with-vinay-gupta.html">1</a>]</li> </ul> <h3 style="text-align: left;"> <u>Writers</u></h3> <h4 style="text-align: left;"> <a href="http://craphound.com/">Cory Doctorow</a>, blogger, journalist, &amp; sci-fi/fantasy author [<a href="https://en.wikipedia.org/wiki/Cory_doctorow">Wikipedia entry</a>]</h4> <ul style="text-align: left;"> <li>Uses Ubuntu Linux since 2006 [<a href="http://www.guardian.co.uk/technology/2011/may/17/computing-opensource">1</a>, <a href="http://www.linuxjournal.com/magazine/cory-doctorowmdashlinux-guru">2</a>]</li> <li>arguments for copyright reform (videos):</li> <ul> <li><a href="https://www.youtube.com/watch?v=NkBX-981_es">Pwned: How copyright turns us all into IP serfs</a></li> <li><a href="https://www.youtube.com/watch?v=HUEvRyemKSg">The coming war on general computation</a></li> <li><a href="https://www.youtube.com/watch?v=n-jbe4gBbLw">@ the Pirate Party International General Assembly in Prague 2012</a></li> </ul> </ul> <h4 style="text-align: left;"> <a href="http://www.antipope.org/charlie/">Charlie Stross</a>, sci-fi/horror/fantasy author [<a href="https://en.wikipedia.org/wiki/Charlie_Stross">Wikipedia entry</a>]</h4> <ul style="text-align: left;"> <li>formerly the monthly Linux columnist for <a href="https://en.wikipedia.org/wiki/Computer_Shopper_%28UK_magazine%29">Computer Shopper </a></li> <li>uses Linux, but mainly for running server, otherwise Mac [<a href="http://www.antipope.org/charlie/blog-static/2009/01/i_get_mail.html">1</a>, <a href="http://charlie.stross.usesthis.com/">2</a>, <a href="http://www.badlanguage.net/interview-with-sci-fi-author-charles-stross">3</a>]</li> <li>position on piracy: "If you've downloaded unauthorized copies of my books, instead of hitting on a tipjar button, I urge you to buy a (new) copy of one of my books....Your typical book publisher is not like the music or movie industry; they run on thin margins, and they're staffed by underpaid, overworked folk who do it because they love books, not because they're trying to make themselves rich on the back of a thousand ruthlessly exploited artists. I think their effort deserves to be rewarded appropriately..." [<a href="http://www.antipope.org/charlie/blog-static/2009/03/reminder-why-theres-no-tipjar.html">1</a>] </li> </ul> <h4 style="text-align: left;"> <a href="http://www.hipiers.com/">Piers Anthony</a>, fantasy/sci-fi author [<a href="https://en.wikipedia.org/wiki/Piers_anthony">Wikipedia entry</a>]</h4> <ul style="text-align: left;"> <li>switched to Linux in 2000 [<a href="http://www.thepowerbase.com/2011/11/piers-anthony-an-ogre-and-a-penguin/">1</a>, <a href="http://www.hipiers.com/00oct.html">2</a>, <a href="http://www.hipiers.com/01april.html">3</a>, <a href="http://www.hipiers.com/01june.html">4</a>] </li> <li>mentions using a number of different distros, including Ubuntu &amp; Fedora [<a href="http://hipiers.com/11aug.html">1</a>]</li> <li>use of Linux seems at least in part principle-driven [<a href="http://www.hipiers.com/06aug.html">1</a>, <a href="http://www.thepowerbase.com/2011/11/piers-anthony-an-ogre-and-a-penguin/">2</a>]</li> <li>uses LibreOffice [<a href="http://www.hipiers.com/12may.html">1</a>]</li> <li>concerns about piracy:</li> <ul> <li>speaks approvingly of Harlan Ellison's war on piracy (2002-4) [<a href="http://www.hipiers.com/02june.html">1</a>, <a href="http://www.hipiers.com/04aug.html">2</a>]</li> <li>complaints about piracy &amp; Ebay (2010) [<a href="http://www.hipiers.com/10mar.html">1</a>]</li> <li>some recognition of danger of censoring internet: "THE WEEK had an item on Internet piracy of music, books, and movies, and efforts to stop it. I have discussed this here before, but it bears repeating: pirates are thieves who are destroying the ability of creative artists to make a living, myself included; a LOT of my works are chronically stolen. The pirates need to be stopped. The problem is how to do it without censoring free expression itself. I think there does have to be a law, but one carefully crafted to shut down only the pirates." (2012) [<a href="http://www.hipiers.com/12feb.html">1</a>]</li> </ul> </ul> <h4 style="text-align: left;"> <a href="http://www.nealstephenson.com/">Neal Stephenson</a>, sci-fi/speculative fiction author [<a href="https://en.wikipedia.org/wiki/Neal_Stephenson">Wikipedia entry</a>]</h4> <ul style="text-align: left;"> <li>fondness for both Mac &amp; Linux [sources?]</li> <li>author of long essay "<a href="https://en.wikipedia.org/wiki/In_the_Beginning..._Was_the_Command_Line">In the Beginning... Was the Command Line</a>" (1999)</li> <ul> <li><a href="https://github.com/robmadole/beginning_command_line">ebook git repository</a></li> <li><a href="http://www.cryptonomicon.com/beginning.html">zipped plain text file</a></li> <li><a href="http://www.amazon.com/exec/obidos/ASIN/0380815931/beowulfonsteo-20/103-1779062-0455006?creative=125581&amp;camp=2321&amp;link_code=as1">print book from Amazon&nbsp;</a></li> </ul> <li>used Emacs [<a href="http://www.emacswiki.org/emacs/NealStephenson">1</a>] </li> <ul> <li>for which novels? (<i>Cryptonomicon</i>? others?)</li> </ul> <li>stopped using Emacs [<a href="http://www.forbes.com/sites/davidewalt/2011/09/19/neal-stephenson-reamde-video-games/2/">1</a>]</li> <li>plans to start using Emacs (&amp; Linux) again [<a href="http://www.reddit.com/r/Fantasy/comments/vdt11/i_am_neal_stephenson_author_geek_and_now_sword/c53nsh5">1</a>] </li> </ul> <h3 style="text-align: left;"> <u>Actors &amp; film-related</u></h3> <h4 style="text-align: left;"> <a href="http://www.stephenfry.com/">Stephen Fry</a>, actor [<a href="https://en.wikipedia.org/wiki/Stephen_fry">Wikipedia entry</a>]</h4> <ul style="text-align: left;"> <li>big fan of Apple products [<a href="http://www.time.com/time/magazine/article/0,9171,1977113,00.html">1</a>, <a href="http://www.stephenfry.com/2011/10/12/iphone-4s/">2</a>, etc.]</li> <li>but also touts GNU [<a href="http://www.guardian.co.uk/technology/2008/feb/02/opensource.stephenfry">1</a>, <a href="http://www.stephenfry.com/2008/09/01/happy-birthday-to-gnu/">2</a>, <a href="https://www.gnu.org/fry/">3</a>] </li> </ul> <h4 style="text-align: left;"> <a href="http://wilwheaton.typepad.com/">Wil Wheaton</a>, actor [<a href="https://en.wikipedia.org/wiki/Wil_wheaton">Wikipedia entry</a>]</h4> <ul style="text-align: left;"> <li>primarily uses Macs, but also uses Linux [<a href="http://wilwheaton.typepad.com/wwdnbackup/2010/04/wil-wheaton-prime-uses-linux-to-bring-you-evil-wil-wheaton-sitting-in-sheldons-spot.html">1</a>, <a href="http://www.wilwheaton.net/mt/archives/001117.php">2</a>] </li> <li>support for Bittorrent [<a href="http://www.itworld.com/cloud-computing/277540/bittorrent-not-always-piracy-says-wil-wheaton">1</a>] </li> </ul> <div style="text-align: left;"> <b><a href="http://www.asiacarrera.com/">Asia Carrera</a>, adult-film actress [<a href="https://en.wikipedia.org/wiki/Asia_Carrera">Wikipedia entry</a>]</b><b>&nbsp;</b><br /> <ul style="text-align: left;"> <li>early Linux-adopter, ran own website since 1998 [<a href="http://linux.slashdot.org/story/98/01/03/082000/linux-for-non-geeks">1</a>, <a href="http://www.asiacarrera.com/faqs2.html">2</a>]<b> </b></li> </ul> <b><a href="http://www.cindymargolis.com/">Cindy Margolis</a>, model [<a href="https://en.wikipedia.org/wiki/Cindy_Margolis">Wikipedia entry</a>]</b><br /> <ul style="text-align: left;"> <li>apparent Debian user [<a href="http://www.schmehl.info/2005/03/14#day-5.0">1</a>, <a href="http://i.imgur.com/hX5yW.jpg">2</a>]</li> </ul> </div> <h3 style="text-align: left;"> <u>Programmers &amp; computer-related</u></h3> <h4 style="text-align: left;"> Linus Torvalds [<a href="https://en.wikipedia.org/wiki/Linus_torvalds">Wikipedia entry</a>]</h4> <ul style="text-align: left;"> <li>creator of <a href="https://en.wikipedia.org/wiki/Linux">Linux</a></li> <li>used Fedora (2008) [<a href="http://news.oreilly.com/2008/07/linux-torvalds-on-linux-distri.htmlhttp://news.oreilly.com/2008/07/linux-torvalds-on-linux-distri.html">1</a>] </li> <li>switched to openSUSE at some point in 2012(?) [<a href="http://www.quora.com/Linux/What-Linux-distribution-does-Linus-Torvalds-use-on-his-MacBook-Air">1</a>]</li> <li>uses Apple hardware [<a href="http://a2mac.org/2012/05/linus-torvalds-loves-your-macbook-air/">1</a>]&nbsp;</li> <li>uses an Emacs-like editor based on <a href="https://en.wikipedia.org/wiki/MicroEMACS">MicroEMACS</a>, a <a href="https://git.kernel.org/?p=editors/uemacs/uemacs.git;a=summary">customised version of uEmacs/PK</a> </li> </ul> <h4 style="text-align: left;"> <a href="http://www.stallman.org/">Richard Stallman</a> [<a href="https://en.wikipedia.org/wiki/Richard_stallman">Wikipedia entry</a>]</h4> <ul style="text-align: left;"> <li>used <a href="http://www.gnewsense.org/">gNewSense</a>, a <a href="https://www.gnu.org/distros/free-distros.html">fully-free</a> GNU/Linux distribution in 2010 [<a href="http://richard.stallman.usesthis.com/">1</a>] </li> <li>founder of the <a href="https://www.gnu.org/">GNU project</a> (1983) </li> <li>founder of <a href="https://www.fsf.org/">Free Software Foundation</a> (1985) </li> <li>creator of <a href="http://www.gnu.org/software/emacs">Emacs</a> (1976)</li> <li>co-creator of <a href="https://www.gnu.org/software/texinfo/">Texinfo</a>, presupposing knowledge/use of TeX</li> <li>supports <a href="https://en.wikipedia.org/wiki/Copyleft">copyleft </a></li> <ul> <li>one (of many) talks on copyright issues: <a href="https://www.youtube.com/watch?v=SNBMdDaYhZA">@ University of Calgary </a>(2009)</li> <li><a href="https://www.gnu.org/philosophy/misinterpreting-copyright.html">statement on copyright&nbsp;</a></li> <li><a href="https://www.gnu.org/philosophy/pirate-party.html">statement on worries about abolishment of copyright for copyleft</a> (re: Pirate Party platform) </li> </ul> </ul> <h4 style="text-align: left;"> Mark Shuttleworth, programmer, entreprenuer, astronaut [<a href="https://en.wikipedia.org/wiki/Mark_Shuttleworth">Wikipedia entry</a>]</h4> <ul style="text-align: left;"> <li>started the <a href="http://www.ubuntu.com/community">Ubuntu Foundation</a> (2005) for <a href="http://www.ubuntu.com/">Ubuntu Linux</a> development</li> </ul> <h4 style="text-align: left;"> <a href="http://www-cs-faculty.stanford.edu/%7Eknuth/">Donald Knuth</a>, computer scientist &amp; professor [<a href="https://en.wikipedia.org/wiki/Donald_knuth">Wikipedia entry</a>]</h4> <ul style="text-align: left;"> <li>creator of <a href="http://www.tug.org/">TeX</a> typesetting system (1978), upon which <a href="http://www.latex-project.org/">LaTeX</a>, <a href="http://www.luatex.org/">LuaTeX</a> etc. are based </li> <li>uses Ubuntu Linux (as of 2008) [<a href="http://www.informit.com/articles/article.aspx?p=1193856">1</a>]</li> <li>uses Emacs to edit TeX [<a href="http://www.informit.com/articles/article.aspx?p=1193856">1</a>] </li> <li>friends with computer security researcher <a href="https://en.wikipedia.org/wiki/Jacob_Appelbaum">Jacob Appelbaum</a> [<a href="http://laughingsquid.com/jacob-appelbaum-donald-knuth-demonstrate-the-recursive-homeboys-principle/">1</a>]</li> </ul> <h4 style="text-align: left;"> <a href="http://www.americanmcgee.com/">American McGee</a>, game designer [<a href="https://en.wikipedia.org/wiki/American_mcgee">Wikipedia entry</a>]&nbsp;</h4> <ul style="text-align: left;"> <li>&nbsp;switched to Ubuntu Linux (from Windows) with plans to "stay switched" (2006) [<a href="http://www.americanmcgee.com/2006/07/26/wga-and-activation-failures-dont-faze-redmond/">1</a>]</li> </ul> <h4 style="text-align: left;"> John "maddog" Hall, director of <a href="http://www.li.org/"><i>Linux International</i></a> &amp; professor of computer science [<a href="https://en.wikipedia.org/wiki/Maddog">Wikipedia entry</a>]</h4> <ul style="text-align: left;"> <li>runs different Linux distributions depending on employer [<a href="http://www.mylinuxrig.com/post/19511715022/the-linux-setup-jon-maddog-hall-linux">1</a>]</li> </ul> <ul style="text-align: left;"> </ul> </div> <hr /> <h3 style="text-align: left;"> Some Initial Ruminations</h3> <div style="text-align: left;"> <div style="text-align: justify;"> A number of the people above fall into two rough groupings: "technology/gadget-lovers" vs. "ideological-users". So Stephen Fry and Wil Wheaton would fall into the first category, as would perhaps Charlie Stross and even Linus Torvalds. On the ideological side are (of course) Richard Stallman, Cory Doctorow, Piers Anthony, and the Pirate Party MPs. Anthony's position in the latter grouping is interesting, given his position on piracy. Stallman's position is similar to the Pirate MPs in certain respects, but values the legal status of copyleft.</div> <br /> <h3 style="text-align: left;"> What about <a href="https://en.wikipedia.org/wiki/Free_culture_movement">Free Culture</a> proponents?</h3> <div style="text-align: justify;"> What computer setups do Free Culture proponents use? Particularly, I'm wondering about <a href="https://en.wikipedia.org/wiki/Lawrence_Lessig">Lawrence Lessig</a>, founding father of the Free Culture movement (largely based on Stallman's Free Software Foundation) and founder of the <a href="http://creativecommons.org/">Creative Commons licences</a>. <a href="https://en.wikipedia.org/wiki/Nina_Paley">Nina Paley</a> is another prominent Free Culture activist, but I'm pretty sure she's largely (solely?) a Mac user.</div> <div style="text-align: justify;"> <br /></div> <h3 style="text-align: justify;"> Hattrick winners and other random notes</h3> <div style="text-align: justify;"> Amelia Andersdotter, Donald Knuth, and Richard Stallman take hattrick prizes for Linux-Emacs-TeX use. (For an extra bonus, Andersdotter also explicitly mentions use of <a href="http://www.orgmode.org/">org-mode</a> in Emacs.)&nbsp;</div> <div style="text-align: justify;"> <br /></div> <div style="text-align: justify;"> Of course there are various connections between some of the characters mentioned above. For instance, Doctorow releases his novels under Lessig's Creative Common licences; Doctorow &amp; Stross are co-writing a novel [<a href="http://craphound.com/?p=4062">1</a>]; etc.<br /> <br /> In terms of the general public, the actors are (unsurprisingly) probably the best known: I would guess Stephen Fry is the most famous person listed above. </div> <div style="text-align: justify;"> <br /></div> <h4 style="text-align: justify;"> Again, suggestions/additions welcome. </h4> </div> </div> be_slayedhttp://www.blogger.com/profile/02920742528327860445noreply@blogger.com0tag:blogger.com,1999:blog-9417648313224391.post-59973278342137059772012-06-19T12:26:00.000-06:002012-06-20T14:27:43.054-06:00Emacs in the future: after the ice-caps melt<div dir="ltr" style="text-align: left;" trbidi="on"> <div style="text-align: justify;"> Emacs 24.1 is <a href="https://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00164.html">out</a>. I haven't really tried it properly yet. All of the pre-release Emacs 24 snapshots I tried had severe memory-leak problems (at least with my set-up) and the quick try-out of 24.1 I did do revealed that it seems to be incompatible with <a href="http://emacswiki.org/emacs/TwitteringMode">twittering-mode</a>. Since Emacs 23.3 is still working nicely for me, perhaps I'll wait a bit before trying 24.1 seriously.</div> <div style="text-align: justify;"> <br /></div> <div style="text-align: justify;"> Speaking of the future of Emacs, a great quote from <a href="http://www.kieranhealy.org/">sociologist Kieran Healy</a> on <a href="http://kieran.healy.usesthis.com/">The Setup ("usesthis.com") site</a>: </div> <blockquote class="tr_bq"> <div style="text-align: justify;"> Emacs ... will be there when the icecaps melt and the cities drown, when humanity destroys itself in fire and zombies, when the roaches finally achieve sentience, take over, and begin using computers themselves - at which point its various Ctrl-Meta key-chords will seem not merely satisfyingly ergonomic for the typical arthropod, but also direct evidence for the universe's Intelligent Design by some six-legged, multi-jointed God.</div> </blockquote> </div>be_slayedhttp://www.blogger.com/profile/02920742528327860445noreply@blogger.com7tag:blogger.com,1999:blog-9417648313224391.post-68965256140782722692012-04-23T11:55:00.001-06:002012-04-23T11:56:10.344-06:00History as revealed by Google Ngrams, I: UNIX<div dir="ltr" style="text-align: left;" trbidi="on"><div style="text-align: justify;">UNIX was apparently really first discovered in the 18th century, about fifty years before the American War of Independence. However, it wasn't until the 20th century that it gained wide-spread use, when it was repopularised by AT&amp;T.</div><br /> Source: <a href="http://books.google.com/ngrams/graph?content=unix&amp;year_start=1500&amp;year_end=2008&amp;corpus=0&amp;smoothing=3">Google Ngram Viewer</a>.<br /> <br /> <div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdEnwa-7LlhgzO_Exx1kpYBzeoITp4aTymSfJYX89iLHhv6WLTSQ4T_CYpIyEBJeWSZyWEfPyfsFl_Z1Mrl_4NfVIJcDicHtcudChas1QD7Wwm8U0Oyshl7mj6RXj6b0ggXLBgzX5aP0Y/s1600/google_ngram_unix2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="278" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdEnwa-7LlhgzO_Exx1kpYBzeoITp4aTymSfJYX89iLHhv6WLTSQ4T_CYpIyEBJeWSZyWEfPyfsFl_Z1Mrl_4NfVIJcDicHtcudChas1QD7Wwm8U0Oyshl7mj6RXj6b0ggXLBgzX5aP0Y/s400/google_ngram_unix2.jpg" width="400" /></a></div></div>be_slayedhttp://www.blogger.com/profile/02920742528327860445noreply@blogger.com0tag:blogger.com,1999:blog-9417648313224391.post-59847234926916838492012-02-04T12:08:00.000-07:002012-02-04T12:08:27.883-07:00Vote for Emacs and Conkeror in the 2011 LinuxQuestions.org Members Choice Awards<div dir="ltr" style="text-align: left;" trbidi="on">Vote for Emacs in the <a href="https://www.linuxquestions.org/questions/2011-linuxquestions-org-members-choice-awards-95/text-editor-of-the-year-919912/">Text Editor of the Year</a> category and in the <a href="https://www.linuxquestions.org/questions/2011-linuxquestions-org-members-choice-awards-95/ide-web-development-editor-of-the-year-919910/">IDE/Web Development Editor of the Year</a> category.<br /> <br /> Vote for Conkeror in the <a href="https://www.linuxquestions.org/questions/2011-linuxquestions-org-members-choice-awards-95/browser-of-the-year-919887/">Browser of the Year</a> category.</div>be_slayedhttp://www.blogger.com/profile/02920742528327860445noreply@blogger.com0tag:blogger.com,1999:blog-9417648313224391.post-38885984490430459062011-06-07T13:27:00.000-06:002014-12-20T21:35:58.166-07:00Emacs user at work<div dir="ltr" style="text-align: left;" trbidi="on"> <div dir="ltr" style="text-align: left;" trbidi="on"> Despite being designed by a <a href="http://earlcolour.deviantart.com/art/emacs-user-at-work-195326745">Vim user</a>, and despite its implied criticism of Emacs, I still enjoyed this image:<br /> <br /> <div class="separator" style="clear: both; text-align: center;"> <a href="http://www.deviantart.com/download/195326745/emacs_user_at_work_by_earlcolour-d38aj2x.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://i.imgur.com/pznqq35.jpg" height="250" width="400" /></a></div> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <b><span style="font-family: &quot;Courier New&quot;,Courier,monospace;">ashawley</span></b> in the comments below points out the similarity with the 1981 cover of the EMACS Manual:<br /> <div class="separator" style="clear: both; text-align: center;"> <a href="http://www.gnu.org/software/emacs/its-cover.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://www.gnu.org/software/emacs/its-cover.png" height="320" width="320" /></a></div> <br /> <br /></div> <br /></div> be_slayedhttp://www.blogger.com/profile/02920742528327860445noreply@blogger.com3tag:blogger.com,1999:blog-9417648313224391.post-55776036487282688552011-05-21T21:35:00.000-06:002011-05-21T21:36:34.926-06:00rms on apple and brain scans<div dir="ltr" style="text-align: left;" trbidi="on"><div dir="ltr" style="text-align: left;" trbidi="on"><br /> <div style="text-align: justify;">On his <a href="http://stallman.org/rss/rss.xml">RSS stream</a>, <a href="https://secure.wikimedia.org/wikipedia/en/wiki/Richard_stallman">Richard Stallman</a> posted the <a href="http://stallman.org/archives/2011-mar-jun.html#21%20May%202011%20%28Religious%20Reaction%29">following item</a>:</div><blockquote><div class="entry-body"><div><div class="item-body"><div>Some Apple addicts truly worship that company, <a href="http://www.digitaltrends.com/computing/apple-causes-religious-reaction-in-brains-of-fans-say-neuroscientists/" target="_blank"> suggest brain scans</a>. <br /> That must be why they allow it to abuse them so much and don't care.</div></div></div></div></blockquote></div><div style="text-align: justify;">I know a number of Apple fans, and they do tend to have strongly favourable attitudes towards Apple products. (Apple things generally seem to be superior to Microsoft things, but the Apple company doesn't seem any less evil than Microsoft, and Linux is generally superior to both anyway.)</div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;">But I question whether this is a reaction which is actually specific to Apple fans. I imagine my brain scans might show similar reactions to GNU/Linux and <a href="http://www.dina.kvl.dk/%7Eabraham/religion/">Emacs</a>.... (Most Windows/Microsoft users probably wouldn't show similar results, given that it's really just the "default" nowadays.)</div></div>be_slayedhttp://www.blogger.com/profile/02920742528327860445noreply@blogger.com1tag:blogger.com,1999:blog-9417648313224391.post-73420274638417677482011-04-06T13:45:00.000-06:002011-04-06T13:45:16.892-06:00Emacs in Tron<div dir="ltr" style="text-align: left;" trbidi="on"><a href="http://jtnimoy.net/workviewer.php?q=178">JT Nimoy</a> discusses the creation of software art for creating visual effects in the film <a href="https://secure.wikimedia.org/wikipedia/en/wiki/Tron_legacy"><i>Tron: Legacy</i></a>. Additionally, he mentions that:<br /> <div dir="ltr" style="text-align: left;" trbidi="on"><blockquote style="font-family: Georgia,&quot;Times New Roman&quot;,serif;">In Tron, the hacker was not supposed to be snooping around on a network; he was supposed to kill a process. So we went with <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">posix kill</span> and also had him pipe <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">ps</span> into <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">grep</span>. I also ended up using emacs eshell to make the terminal more l33t. The team was delighted to see my emacs performance -- splitting the editor into nested panes and running different modes. I was tickled that I got emacs into a block buster movie. I actually do use emacs irl, and although I do not subscribe to <a href="https://groups.google.com/group/alt.religion.emacs">alt.religion.emacs</a>, I think that's all incredibly relevant to the world of Tron. </blockquote></div><br /> <div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnyE-5X-E57mbMFV82S6Bvvlwlxhks_zsihTBYF8-gqM-K1Cor-KJ9OMWpDdWXNE2Oxs4DVIGaWToGPfi5Zn7ScLSqaTjcQmQl4yrblMMWZ57Gf3rz3TxTUCEEfMz6EOAbezB3VZlwftI/s1600/TRON_EMACS.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="226" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnyE-5X-E57mbMFV82S6Bvvlwlxhks_zsihTBYF8-gqM-K1Cor-KJ9OMWpDdWXNE2Oxs4DVIGaWToGPfi5Zn7ScLSqaTjcQmQl4yrblMMWZ57Gf3rz3TxTUCEEfMz6EOAbezB3VZlwftI/s400/TRON_EMACS.JPG" width="400" /></a></div><br /> <br /> <br /> <u>Links:</u><br /> <a href="http://jtnimoy.net/workviewer.php?q=178">(1) The original article/post by JT Nimoy</a><br /> <a href="http://www.jwz.org/blog/2011/04/emacs-in-tron/">(2) On jwz's blog</a><br /> <a href="http://www.boingboing.net/2011/04/06/how-emacs-got-into-t.html">(3) On boingboing</a><br /> <a href="http://www.reddit.com/r/emacs/comments/ged5p/emacs_in_tron_legacy_three_images/">(4) On reddit </a></div>be_slayedhttp://www.blogger.com/profile/02920742528327860445noreply@blogger.com0tag:blogger.com,1999:blog-9417648313224391.post-34516194666105169122011-04-06T09:24:00.000-06:002011-06-18T20:32:30.050-06:00Tip: Showing blocked syntactic movement in LaTeX with tikz(-qtree)<div dir="ltr" style="text-align: left;" trbidi="on"><div dir="ltr" style="text-align: left;" trbidi="on"><div dir="ltr" style="text-align: left;" trbidi="on">Minimal example showing how to indicate blocked/illegal syntactic movement in LaTeX using the <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">tikz</span> and <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">tikz-qtree</span> packages.<br /> <br /> </div><div><pre><span style="font-size: x-small;">\documentclass{article} \usepackage{tikz} \usepackage{tikz-qtree} \begin{document} \begin{tikzpicture}[baseline,description/.style={fill=white,inner sep=2pt}] \Tree [.A [.B \node(b){b}; ] [.C c [.D d [.E e [.F f [.G g [.H \node(h){h}; ]]]]]]] \draw [dashed, -&gt;, bend left] (h) to node [description] {\LARGE $\times$} (b); \end{tikzpicture} \end{document}</span> </pre></div><br /> <div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0dl9ns7DdT-aEn0GQiqnfjkdgGatk6YozuWnKi4b_wI8WYzbvPs4xM4eHltMMX8UlcT_w0Q7YnptIel3VvX_qBndh39oQLCochYtBbp27Mm6AHbF3mS8IARtHab82kGz4F8Nvjroia-Q/s1600/tikz-qtree-blocked.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0dl9ns7DdT-aEn0GQiqnfjkdgGatk6YozuWnKi4b_wI8WYzbvPs4xM4eHltMMX8UlcT_w0Q7YnptIel3VvX_qBndh39oQLCochYtBbp27Mm6AHbF3mS8IARtHab82kGz4F8Nvjroia-Q/s1600/tikz-qtree-blocked.png" /></a></div><br /> </div><span style="font-size: x-small;">Thanks to Andy Lücking and Alexis Dimitriadis from the <a href="http://heim.ifi.uio.no/%7Edag/ling-tex.html">Ling-TeX mailing list</a>.</span></div>be_slayedhttp://www.blogger.com/profile/02920742528327860445noreply@blogger.com0tag:blogger.com,1999:blog-9417648313224391.post-20862270754692154512011-03-19T13:07:00.000-06:002011-03-19T13:07:46.887-06:00Tip: let Synaptic handle updates to Buuf icon set<div dir="ltr" style="text-align: left;" trbidi="on"><div class="separator" style="clear: both; text-align: center;"><a href="http://gnome-look.org/CONTENT/content-pre2/81153-2.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="250" src="http://gnome-look.org/CONTENT/content-pre2/81153-2.jpg" width="400" /></a></div>If you want the synaptic package manager to keep your <a href="http://gnome-look.org/content/show.php/Buuf?content=81153">Buuf icons</a> up-to-date, you can do so by using the <a href="http://ubuntusatanic.org/installation.php">Ubuntu Satanic Edition repository</a>, as follows:<br /> <div><br /> <br /> 1) add the secure key; in terminal enter:<br /> <pre><span style="font-size: small;">wget -q http://ubuntusatanic.org/ubuntu-se-key.gpg -O- | sudo apt-key add -</span></pre><br /> 2) add the following repository to your system (you could go to Go System-&gt;Administration-&gt;Software Sources-&gt;Other Software-&gt;Add and enter the following APT line:), choose the appropriate version (the following assumes you're using Ubuntu Maverick 10.10):<br /> <pre><span style="font-size: small;">deb http://ubuntusatanic.org/hell maverick main</span></pre><br /> 3) then in the terminal add the Buuf package by entering:<br /> <pre><span style="font-size: small;">sudo apt-get update &amp;&amp; sudo apt-get install buuf-icon-theme</span></pre></div></div>be_slayedhttp://www.blogger.com/profile/02920742528327860445noreply@blogger.com0tag:blogger.com,1999:blog-9417648313224391.post-82079957387552946872011-02-03T16:16:00.000-07:002011-02-05T08:09:41.441-07:00Tunes from an alternative Victorian era: Sunday Driver<div dir="ltr" style="text-align: left;" trbidi="on"><div dir="ltr" style="text-align: left;" trbidi="on"><div style="text-align: justify;"><a href="http://www.sundaydriver.co.uk/">Sunday Driver</a> were formed in the summer of 2000, though lead singer Chandrika "Chandy" Nath had earlier composed some of the songs whilst monitoring ice floes near the South Pole, during a field trip in Antarctica, collecting data for the British Antarctic Survey.</div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;">Chandy has a Ph.D. (in physics, I think), and the band's name "Sunday Driver" derives from the moniker of a gene (SYD) commonly found in mice; and the music mixes Indian (Carnatic) and English folk music, along with early 20th century classical music (Ravel, Glass, etc.) and West End musicals, topped off with a (originally unintentional, I believe) steampunky twist.</div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;">Their first album, "In the City of Dreadful Night", is available here: <a href="http://www.sundaydriver.co.uk/">www.sundaydriver.co.uk</a>. From their own description: "...inspiration from Victorian London and Raj-era Calcutta, the tracks range from hypnotic to bittersweet."</div><br /> In any case, here's...<br /> <br /> <u> A nice sampler:</u><br /> <iframe allowfullscreen="" frameborder="0" height="300" src="http://www.youtube.com/embed/sfHFtt0tqfk?rel=0" title="YouTube video player" width="480"></iframe></div><br /> <u>A few interviews:</u><br /> <ul><li><a href="http://dmp.dreamwidth.org/9727.html">Beyond Victoriana: #10 An Interview with Sunday Driver</a><br /> </li> <li><a href="http://www.steampunkmagazine.com/pdfs/spm7-web.pdf">Libby Bulloff (2010-04-15). "The Brady Bunch of Calcutta 1910 (an interview with Sunday Driver)". Steampunk Magazine #7. p.54</a></li> <li><a href="http://thesteamerstrunk.blogspot.com/2011/01/bombay-to-london-and-back-again.html">"Bombay to London and Back Again: An Interview With Sunday Driver". Steamerstrunk blog.</a> </li> </ul><br /> <u>And a few promotion photos suitable for wallpaper: </u><br /> <div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGvAoDpzLT3xWV1WPzMGY3N_Gx7ccXQkolBPIqS3Ms8cgLcHQNzDOCwWRCWCsGirc3aSnQ-4NiV3T5hvxlP2afs0UQOqz4SHe89SpZj8IlXcI_pMHZuNH8K51JEWXVaBKqy8KQ7XKzWm0/s1600/bandlandscape2.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="254" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGvAoDpzLT3xWV1WPzMGY3N_Gx7ccXQkolBPIqS3Ms8cgLcHQNzDOCwWRCWCsGirc3aSnQ-4NiV3T5hvxlP2afs0UQOqz4SHe89SpZj8IlXcI_pMHZuNH8K51JEWXVaBKqy8KQ7XKzWm0/s320/bandlandscape2.jpg" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUK3KeoNRfjyN0kGTbOryQNsVvO6fIvfqvmwcHZR_j-gHaOs0C1LizV_3n0Cwq-ZI3HYiusVrpIrTWwPx617Bl-FYtPWzujkW2eERQwhPOpPMrSx2zJJrPO-xhDGrV1PqARokIRKO1SbM/s1600/83312554.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUK3KeoNRfjyN0kGTbOryQNsVvO6fIvfqvmwcHZR_j-gHaOs0C1LizV_3n0Cwq-ZI3HYiusVrpIrTWwPx617Bl-FYtPWzujkW2eERQwhPOpPMrSx2zJJrPO-xhDGrV1PqARokIRKO1SbM/s320/83312554.jpg" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWSeKxYcB3Nji6zNDm8twgpb7T1G4Q5H39Gki4hytJBOTpjFmD5sn7EONy7KalJpakZe1QSp3RBM-1RC9iaQV0ZUGWjx9DvzMt7Jw98qiOmcVtuFKLN7LGi_L0fnPVwuSQ34OKW2gIwpA/s1600/Sunday+Driver+Main+Stage.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="218" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWSeKxYcB3Nji6zNDm8twgpb7T1G4Q5H39Gki4hytJBOTpjFmD5sn7EONy7KalJpakZe1QSp3RBM-1RC9iaQV0ZUGWjx9DvzMt7Jw98qiOmcVtuFKLN7LGi_L0fnPVwuSQ34OKW2gIwpA/s320/Sunday+Driver+Main+Stage.jpg" width="320" /></a></div></div>be_slayedhttp://www.blogger.com/profile/02920742528327860445noreply@blogger.com0tag:blogger.com,1999:blog-9417648313224391.post-72929986146063558582011-01-31T12:18:00.000-07:002011-06-16T20:48:57.312-06:00The Indifference Engine - Victorianesque Hiphop<div dir="ltr" style="text-align: left;" trbidi="on"><div style="text-align: justify;">Prof Elemental : a steampunk mad professor with a fondness for adventure, strange animals and the pursuit of a good cuppa.&nbsp; He has a new album out, the delightfully titled <i><a href="http://professorelemental.com/home.cfm">Indifference Engine</a>.</i><br /> <br /> <div class="separator" style="clear: both; text-align: center;"><a href="http://professorelemental.com/home.cfm"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBqH9vXD4kif9-qATeGVCm-d8U4WFkJURPG-WiZlfomIHd-p9D9BvVEcyWTvKYhyphenhyphent4RbGi0BI_lLkVoodEQdJXd46ytUE_J4OaylXXFtOGn3FDK5HW3wm-1i4GTmVUeeMVjntx-ifLK9M/s1600/Professor-Elemental-Album-web-300x300.jpg" /></a></div><br /> <br /> Here's a taste:</div><div style="text-align: justify;"><br /> <b>Cup of Brown Joy:</b><br /> <iframe allowfullscreen="" class="youtube-player" frameborder="0" height="390" src="http://www.youtube.com/embed/eELH0ivexKA?rel=0" title="YouTube video player" type="text/html" width="480"></iframe></div><br /> <b>Fighting Trousers </b>(The beginning of a battle with Mr B?):<br /> <div style="text-align: justify;"><iframe allowfullscreen="" class="youtube-player" frameborder="0" height="300" src="http://www.youtube.com/embed/0iRTB-FTMdk?rel=0" title="YouTube video player" type="text/html" width="480"></iframe></div><div style="text-align: justify;"><br /> </div></div>be_slayedhttp://www.blogger.com/profile/02920742528327860445noreply@blogger.com0tag:blogger.com,1999:blog-9417648313224391.post-60772362526012699322011-01-25T09:28:00.000-07:002011-01-25T09:28:23.556-07:00CPUs (+ALUs) in Minecraft<div dir="ltr" style="text-align: left;" trbidi="on"><div dir="ltr" style="text-align: left;" trbidi="on"><div style="text-align: justify;">Some people have managed to create working CPUs (or ALUs) in Minecraft. They're slow and have little computing power or memory, but I still think it's an interesting case of recursion. Minecraft simulates a physical world, and these are computers created within the confines, and conforming to the rules of that world.</div><br /> In any case, some links to information/videos about creating CPUs (and ALUs) in Minecraft follow.<br /> <b><br /> </b><br /> <b>An 8-bit CPU:</b><br /> <iframe allowfullscreen="" class="youtube-player" frameborder="0" height="255" src="http://www.youtube.com/embed/_WYlBu5V5Ww?rel=0" title="YouTube video player" type="text/html" width="400"></iframe><br /> <br /> And a webpage about it: <a href="http://lazcraft.info/tagged/CPU">http://lazcraft.info/tagged/CPU</a><br /> <br /> (This is the project with most information.)<br /> <br /> </div><div dir="ltr" style="text-align: left;" trbidi="on"><b><br /> </b><br /> <b>A 16-bit CPU:</b><br /> <iframe allowfullscreen="" class="youtube-player" frameborder="0" height="330" src="http://www.youtube.com/embed/7sNge0Ywz-M?rel=0" title="YouTube video player" type="text/html" width="400"></iframe><br /> <br /> Here's the Youtube channel connected with this project: <a href="http://www.youtube.com/user/theinternetftw">http://www.youtube.com/user/theinternetftw</a><br /> <br /> <br /> <b>A 32-bit ALU:</b><br /> <iframe allowfullscreen="" class="youtube-player" frameborder="0" height="330" src="http://www.youtube.com/embed/MMW_jraSjq8?rel=0" title="YouTube video player" type="text/html" width="400"></iframe><br /> <br /> <br /> <div style="text-align: justify;">And, finally, it's not a computer, but a pretty cool implementation of <a href="https://secure.wikimedia.org/wikipedia/en/wiki/Conway%27s_Game_of_Life">Conway's Game of Life</a> in Minecraft:</div><br /> <b>Conway's Game of Life in Minecraft: </b><br /> <iframe allowfullscreen="" class="youtube-player" frameborder="0" height="330" src="http://www.youtube.com/embed/jaoSzCfa9OM?rel=0" title="YouTube video player" type="text/html" width="400"></iframe></div><br /> <br /> Let me know about other CPUs/ALUs etc. in the comments.</div>be_slayedhttp://www.blogger.com/profile/02920742528327860445noreply@blogger.com1tag:blogger.com,1999:blog-9417648313224391.post-70598066720903377362011-01-22T14:41:00.000-07:002011-01-25T09:12:27.486-07:00Clockworks: explanations and videos<div dir="ltr" style="text-align: left;" trbidi="on"><div dir="ltr" style="text-align: left;" trbidi="on"><div style="text-align: justify;">Some interesting/educational videos on the workings of mechanical watches.</div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;">First, from 1949, a video produced by the Hamilton Watch Company:</div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><iframe allowfullscreen="" class="youtube-player" frameborder="0" height="390" src="http://www.youtube.com/embed/OiCPu0SjEW4" title="YouTube video player" type="text/html" width="480"></iframe></div>Source: <a href="http://www.archive.org/details/HowaWatc1949">http://www.archive.org/details/HowaWatc1949</a><br /> <br /> <div style="text-align: justify;">A simple demonstration of the basic design and operation of a watch. The inside "works" are shown in stop-motion animation using giant 7.5 foot, in-line movement, exact and to scale in every detail. [See the <a href="http://www.archive.org/details/HowaWatc1949">source</a> for higher resolution versions.] </div><br /> <div style="text-align: justify;">Second, a beautiful video showing some high resolution video shots of a mechanical pocket watch:</div><object height="225" width="400"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=14846503&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=00ADEF&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=14846503&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=00ADEF&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225"></embed></object><br /> Source: <a href="http://theb-roll.com/day-186-time/">http://theb-roll.com/day-186-time/</a><br /> <br /> [See the <a href="http://theb-roll.com/day-186-time/">source</a> for a description.]<br /> <br /> (More bits on clockworks here: <a href="http://blekko.com/ws/+/beslayed/clockworks">http://blekko.com/ws/+/beslayed/clockworks</a> .) </div></div>be_slayedhttp://www.blogger.com/profile/02920742528327860445noreply@blogger.com0tag:blogger.com,1999:blog-9417648313224391.post-52371739393161816492011-01-20T17:51:00.000-07:002011-01-23T15:45:00.869-07:002D Goggles, Or, The Thrilling Adventures of Lovelace & Babbage: a webcomic<div dir="ltr" style="text-align: left;" trbidi="on"><div style="text-align: justify;">Something which, for some reason, I only came across just now: </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;">A <a href="http://sydneypadua.com/2dgoggles/series/">webcomic consisting of the chronicles of Charles Babbage</a> (the inventor of the first computer, which, alas, was never built---but it might be soon: <a href="http://plan28.org/">see here!</a>) and Ada Lovelace (the first computer programmer) in an alternative world where Ada Lovelace didn't die at age of 36, and where Babbage and Lovelace successfully developed the first computer (giving humanity the necessary technological advantage to repel the alien invasion of 1898) and went on to use their combined powers to fight crime and have thrilling adventures.</div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;">Here's a taste:</div><div class="separator" style="clear: both; text-align: justify;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV4NpZ4eaBOeDXqHJ6H7Tf8Za5YaZcOboL2q1xcT-mVEc63wHxxiX9kClI1oR3EJCNcrCyxMEQU8TAJq80PYY0Cpx-oKcsGHtHPmAVUjzgzKvxZx0j8Hgw-QjvPGWCnSPBHQyXsXw6Ps0/s1600/lovelacepg3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV4NpZ4eaBOeDXqHJ6H7Tf8Za5YaZcOboL2q1xcT-mVEc63wHxxiX9kClI1oR3EJCNcrCyxMEQU8TAJq80PYY0Cpx-oKcsGHtHPmAVUjzgzKvxZx0j8Hgw-QjvPGWCnSPBHQyXsXw6Ps0/s1600/lovelacepg3.jpg" /></a></div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;">See more <a href="http://sydneypadua.com/2dgoggles/series/">here</a>.<br /> <br /> Part of what I really like about this comic is its footnotes. Yes, it has footnotes, references to various primary (and secondary) sources relevant to the comic, like <a href="http://books.google.com/books?id=2T0AAAAAQAAJ&amp;printsec=frontcover#PPA1,M1">Babbage's autobiography</a>. </div></div>be_slayedhttp://www.blogger.com/profile/02920742528327860445noreply@blogger.com0tag:blogger.com,1999:blog-9417648313224391.post-25051259561350725122011-01-15T16:42:00.000-07:002011-06-18T20:32:58.487-06:00LaTeX table manipulation using Emacs/AUCTeX+align.el+rectangular selection<div dir="ltr" style="text-align: left;" trbidi="on"><div style="text-align: justify;">Tables in LaTeX are sometimes somewhat difficult to manage; in particular doing anything with columns---in contrast to most word processors, which allow for the manipulation of columns in certain environments (e.g. tables). However, the text editor Emacs in fact allows for rectangular selections<i> anywhere</i>, which means that using Emacs as an editor for (La)TeX files makes working with tables easier.</div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;">The AUCTeX package for Emacs adds a vast number of useful features; however, it does not automatically format tabular environments. Here I&nbsp; offer some notes on how to deal with LaTeX tables in a Emacs/AUCTeX environment.</div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;">So let's say we have a LaTeX document containing a (big) table, like this:</div><div class="separator" style="clear: both; text-align: justify;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBOnWzu6SzOCAIWDDdP5Ny-afRH8G75AEo9CFBlOnRdbl4dZt7fudrKlZ_WK2e5Rub9NvFWpF_1skH9XnQKgWWA3qv12ykyBU2bs9ws4Bvs7MgSbgiHB5voPpdV78YApQsRC4NiN6LtcU/s1600/pdf-table1.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="310" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBOnWzu6SzOCAIWDDdP5Ny-afRH8G75AEo9CFBlOnRdbl4dZt7fudrKlZ_WK2e5Rub9NvFWpF_1skH9XnQKgWWA3qv12ykyBU2bs9ws4Bvs7MgSbgiHB5voPpdV78YApQsRC4NiN6LtcU/s400/pdf-table1.png" width="400" /></a></div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;">And let's say we want to switch the third and fourth columns. Easily done in a typical word processor, but not necessarily so for a LaTeX document. Let's look at the LaTex .tex source for this table:</div><div class="separator" style="clear: both; text-align: justify;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_HC-kspfMnZ4_TXDwcTWbvQDu-ORlnkcq-jRBHoOI6kNiNMG1w-shBkO4rMJhuEeEqHsesoYt7Zv8RNF1BAUTzsbtYAUG5jd98P2Ah36T1A86IzvOlsFZgUDbmIORfULA4SU2J91t8aI/s1600/emacs-table1.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="196" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_HC-kspfMnZ4_TXDwcTWbvQDu-ORlnkcq-jRBHoOI6kNiNMG1w-shBkO4rMJhuEeEqHsesoYt7Zv8RNF1BAUTzsbtYAUG5jd98P2Ah36T1A86IzvOlsFZgUDbmIORfULA4SU2J91t8aI/s400/emacs-table1.png" width="400" /></a></div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;">A rectangular selection will work only if we have&nbsp; our columns aligned in our source .tex file. The <a href="http://www.emacswiki.org/emacs-se/AlignCommands">align.el package</a> for Emacs is needed here (as of Emacs 22, this functionality is built in). </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;">Place the cursor at the beginning of the tabular environment (in our current example, right below the first <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">\hline </span>command will work), and use the <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">align-current</span> function (press <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">M-x</span> and then type <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">align-current</span> RET):</div><div style="text-align: justify;"><br /> </div><div class="separator" style="clear: both; text-align: justify;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUlgH5PUPRdvNhT61D6OFrx3Ygg9l0flWOI7SCSD49zsEX8WNxbW4IOkAno8kKGWlTApuJUXdEN-S7oMDwD9al9JKRuVDJDkIuTDXYPotBGfDuwwvcvM6e3Ui1Z9TK4ecO62n69BM8zaE/s1600/emacs-aligncurrent.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="79" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUlgH5PUPRdvNhT61D6OFrx3Ygg9l0flWOI7SCSD49zsEX8WNxbW4IOkAno8kKGWlTApuJUXdEN-S7oMDwD9al9JKRuVDJDkIuTDXYPotBGfDuwwvcvM6e3Ui1Z9TK4ecO62n69BM8zaE/s320/emacs-aligncurrent.png" width="320" /></a></div><div style="text-align: justify;"><span style="font-family: &quot;Courier New&quot;,Courier,monospace;"><span style="font-family: inherit;"><span style="font-family: &quot;Courier New&quot;,Courier,monospace;"><span style="font-family: inherit;"><span style="font-family: &quot;Courier New&quot;,Courier,monospace;"><span style="font-family: inherit;">&nbsp;</span></span></span></span></span></span> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;">[Make sure there are no blank lines in your tabular environment; "align-current" will stop when it hits a blank line.]</div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;">If you're working with a large table, as in this example, you still won't be able to see the entire width of the table, so hold down SHIFT and left-click the mouse and choose "Decrease Buffer Text Size" repeatedly until the entire width of the table is visible on your screen (maximizing the Emacs frame to the maximum width of your desktop will be helpful as well...). You should then&nbsp; be able to view the table as so:</div><div style="text-align: justify;"><br /> </div><div class="separator" style="clear: both; text-align: justify;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRFteRmICmU4Y4wjtibdOjGkoV72p4UD-xcCZFR1g7x1Tokbya_DOvkqIc5gAFeWOgBa4ZY1NFfO7-TtnhhYW68f1lMY0aNg4Y41Q-Ol1k6RPCMcS-MotcpFFnox52HPUmirf0GTvv89Q/s1600/emacs-table2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRFteRmICmU4Y4wjtibdOjGkoV72p4UD-xcCZFR1g7x1Tokbya_DOvkqIc5gAFeWOgBa4ZY1NFfO7-TtnhhYW68f1lMY0aNg4Y41Q-Ol1k6RPCMcS-MotcpFFnox52HPUmirf0GTvv89Q/s400/emacs-table2.png" width="400" /></a></div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;">All of our columns are now aligned. Now we need simply to select a rectangular region. There are (at least) two ways of going about doing so. Firstly, the ability to select rectangular regions is a built-in feature of Emacs (see the <a href="http://www.gnu.org/software/emacs/manual/html_node/emacs/Rectangles.html">relevant section of the Emacs manual</a>). Simply select the columnar area (mark it using <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">C-SPC</span>) and press either <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">C-x r r</span> to copy the rectangular area to the register or <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">C-x r k</span> to cut ("kill") the rectangular area and place it in the register. And then use <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">C-x r y</span> to paste ("yank") the copied/cut rectangle into the position you want it (with the cursor in the position of its upper left-hand corner).</div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;">However, if your Emacs has the visible selection turned on (as is the <a href="http://emacs-fu.blogspot.com/2008/12/selections-and-cut-copy-paste-make-it.html">default as of Emacs 23</a>), then it is nicer and easier to be able to see the selected area as a rectangle. One nice option is to use the rectangular selection features of the <a href="http://www.emacswiki.org/emacs/CuaMode">CUA package</a> (a built-in default as of Emacs 22). One of the main functions of the CUA-mode is to change Emacs' copy, kill/cut, and yank/paste keybindings (<span style="font-family: &quot;Courier New&quot;,Courier,monospace;">M-w, C-w, C-y</span>) to the "common"<span style="font-family: &quot;Courier New&quot;,Courier,monospace;"> C-c, C-x, C-v</span>. If you, like me, don't want to change the default Emacs keybindings, then include the following in your .emacs configuration file:</div><div style="text-align: justify;"><br /> </div><pre><span style="font-size: x-small;">(cua-selection-mode t) (setq cua-auto-tabify-rectangles nil)&nbsp;</span></pre><div style="text-align: justify;"><br /> </div><div style="text-align: justify;">[If you do want the "common" keybindings, then use <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">(cua-mode t)</span> in place of <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">(cua-selection-mode t)</span>.]</div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;">With this configuration in place, we can now visibly select rectangular areas, and use the normal copy/kill/yank keybindings to copy, cut, and paste the rectangular selections. In CUA-mode rectangular selections are made using <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">C-RET</span> rather than <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">C-SPC</span>. Here is the rectangular selection in our example:</div><div style="text-align: justify;"><br /> </div><div class="separator" style="clear: both; text-align: justify;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0K9CnI1_GKMFK0l0Mc0ipY-ntVktyHjhLARFdjpyXppoPub1q6GjEsgJilp9iUwRAoiGKLgK9iHIRZsqYNPXdGeqrU_9Qm6-_ByxAD_NtE-1-_PhVcG41Y4W8LNvtb6FGeyZrsiXFn7E/s1600/emacs-table-rectangle.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="137" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0K9CnI1_GKMFK0l0Mc0ipY-ntVktyHjhLARFdjpyXppoPub1q6GjEsgJilp9iUwRAoiGKLgK9iHIRZsqYNPXdGeqrU_9Qm6-_ByxAD_NtE-1-_PhVcG41Y4W8LNvtb6FGeyZrsiXFn7E/s400/emacs-table-rectangle.png" width="400" /></a></div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;">I then kill ("cut") this rectangular area with <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">C-w</span>. And then position the cursor at the point where I want the upper left-hand corner of this rectangular area to be inserted: </div><div class="separator" style="clear: both; text-align: justify;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzBQrKjs6UuEtsMjwneDTRn0TEPywuTkZ5xlmAJ7-TaZVQjicOg8FBwZdR8-oHMS74ty4HmUyAV06Tz3CdPKE2t6vuG-GBPu76lXRaXruIoqJkDTYh073UGNho0CeQlT30BVNfKkPPWJI/s1600/emacs-table-3.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="170" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzBQrKjs6UuEtsMjwneDTRn0TEPywuTkZ5xlmAJ7-TaZVQjicOg8FBwZdR8-oHMS74ty4HmUyAV06Tz3CdPKE2t6vuG-GBPu76lXRaXruIoqJkDTYh073UGNho0CeQlT30BVNfKkPPWJI/s400/emacs-table-3.png" width="400" /></a></div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;">And then yank ("paste") the column in its new position with <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">C-y</span>:</div><div style="text-align: justify;"><br /> </div><div class="separator" style="clear: both; text-align: justify;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8sshTOQMcEo_FX_vScdUuYBVhhwvn4mze6A7Nwk2sMpB9B7F2EYxGJTeqV_jknCiCdGnDR_1kL8VxJ_mVLqCkxhfceSYG3fmfbz-SSk_zFXl_aa6pJSizuxcyFBDsFkCAcmxXJCSuiic/s1600/emacs-table-4.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="136" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8sshTOQMcEo_FX_vScdUuYBVhhwvn4mze6A7Nwk2sMpB9B7F2EYxGJTeqV_jknCiCdGnDR_1kL8VxJ_mVLqCkxhfceSYG3fmfbz-SSk_zFXl_aa6pJSizuxcyFBDsFkCAcmxXJCSuiic/s400/emacs-table-4.png" width="400" /></a></div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;"><br /> </div><div style="text-align: justify;">That's it. Here is the resulting table (with columns 3 and 4 switched):</div><div class="separator" style="clear: both; text-align: justify;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQkN5T6AsNLDsjuqf_kiAIvxGNYemG6RLfYpLwr9iK9yHUM9os7ilBOf7mzqYF2tsQUMOthMxEUcwXNJMaKGePtDqVdvAoYvh_eF8otg6elWj5vEHZdwvP6iJbiAa3vSZ00AonV3cFw84/s1600/pdf-table2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="315" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQkN5T6AsNLDsjuqf_kiAIvxGNYemG6RLfYpLwr9iK9yHUM9os7ilBOf7mzqYF2tsQUMOthMxEUcwXNJMaKGePtDqVdvAoYvh_eF8otg6elWj5vEHZdwvP6iJbiAa3vSZ00AonV3cFw84/s400/pdf-table2.png" width="400" /></a></div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_dtH0e2hyphenhyphen2EtXyzry0XUDqU94MHzhklsE6jbKdC0CX1K4QMLFXz65V64Y_1PHb7D9CL1N6UBqg_Bk8x8leR7c7xTKw6kjzAJAxrgAH_9s8o29YlCzNFrMHxUPFHtv7xpn3gtxI9kRBJE/s1600/pdf-table2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /> </a><br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> Oh, and here is a nice video demonstration of the use of rectangular selection cut-and-pasting (with CUA-mode): <a href="http://www.vimeo.com/1168225?pg=embed&amp;sec=1168225">Emacs Column Editing by Mark Mansour</a>. It doesn't deal with LaTeX, but rather HTML; however, it illustrates the general use.</div>be_slayedhttp://www.blogger.com/profile/02920742528327860445noreply@blogger.com4tag:blogger.com,1999:blog-9417648313224391.post-80132516143145964302011-01-12T07:58:00.000-07:002011-01-13T06:20:31.620-07:00Conkeror - browsing the web, emacs-style<div style="text-align: justify;">As noted <a href="http://babbagefiles.blogspot.com/2010/11/hack-emacs-like-bindings-for.html">below</a>, I've switched from Icecat/Firefox+Pentadactyl/Vimperator to Conkeror. Trying to retool the essentially vi-ish shortcuts to emacs-like shortcuts is rather difficult, and in the end I wasn't able to change some of the shortcuts I wanted to change.&nbsp; Anyway, Conkeror is simply more interesting: more of a from-the-ground-up approach than an add-on approach.</div><br /> <div style="text-align: justify;">This post isn't intending as a general intro to Conkeror; if that's what you're looking for, see <a href="http://conkeror.org/QuickStart">here</a> or <a href="http://craiggles.co.uk/wat.pdf">here</a>, or, if you're running Conkeror, press <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">C-h t</span> (that's <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">Ctrl</span> and <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">h</span> at the same time, release, then <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">t</span>) for a tutorial.</div><br /> <div style="text-align: justify;">Rather like Emacs, Conkeror gets much better than more one personalises/configures it. Some good places to start are on the Conkeror site itself, on <a href="http://conkeror.org/Tips">Tips from Users page</a> and also the <a href="http://emacs-fu.blogspot.com/2010/12/conkeror-web-browsing-emacs-way.html">emacs-fu article "conkeror web browsing the emacs way"</a>.</div><br /> <div style="text-align: justify;">In the same spirit, I offer a number of useful customisations I've adopted, some from the two above-mentioned sources, some from other places (including from suggestions on the <a href="http://news.gmane.org/gmane.comp.mozilla.conkeror">Conkeror mailling list</a>), and some of my own.</div><div style="text-align: justify;"><br /> <b>Some initial things:</b></div><pre><span style="font-size: x-small;">//allow for 'contrib' stuff load_paths.unshift("chrome://conkeror-contrib/content/"); // Mode-line mode_line_mode(true); // auto completion in the minibuffer minibuffer_auto_complete_default = true; url_completion_use_history = true; // should work since bf05c87405 url_completion_use_bookmarks = true; // display the url before going to it in hints mode hints_display_url_panel = true;</span></pre><br /> These are settings taken from here and there. Turning on the mode-line, allowing the url completion (very handy) to access history and bookmarks, and displaying the url of a link (in hints mode).<br /> <br /> <b>Customising the mode-line</b>:<br /> <pre><span style="font-size: x-small;">// FAVICONS require("favicon.js"); add_hook("mode_line_hook", mode_line_adder(buffer_icon_widget), true); read_buffer_show_icons = true; // we'd like to see the # of buffers being loaded add_hook("mode_line_hook", mode_line_adder(loading_count_widget), true); // but really we'd also like to know how many buffers are present and which is the current add_hook("mode_line_hook", mode_line_adder(buffer_count_widget), true); // remove the clock remove_hook("mode_line_hook", mode_line_adder(clock_widget));</span></pre><br /> The first allows for favicons in both mode-line and the <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">C-x b</span> buffer list, the second shows how many buffers are currently still loading, the third shows how many buffers are present and which buffer is the current buffer, the last simply disables the clock. The order of the first three is actually important; this order puts the buffer count on the far left, then the "loading buffer" count, then the favicon, (and then the url of the current buffer).<br /> <br /> <div style="text-align: justify;"><b>Tabs &amp; Mouse</b>:<br /> <pre><span style="font-size: x-small;">// Tabs require("new-tabs.js"); //Open Middle-Clicked Links in New Buffers require("clicks-in-new-buffer.js"); clicks_in_new_buffer_target = OPEN_NEW_BUFFER_BACKGROUND; // Now buffers open in background. //Bind Number Keys to Switch to Buffers 1-10 function define_switch_buffer_key (key, buf_num) { define_key(default_global_keymap, key, function (I) { switch_to_buffer(I.window, I.window.buffers.get_buffer(buf_num)); }); } for (let i = 0; i &lt; 10; ++i) { define_switch_buffer_key(String((i+1)%10), i); }</span></pre>I like having tabs, and the first bit above turns on the tabs, with numbering (but no favicons). I still find it useful to use the mouse from time to time. What's annoying is having to switch from keyboard to mouse or vice-versa. So if I'm using the mouse, I want it to be effective. The second bit above opens new buffers/tabs on middle-clicked links (in background buffers). The last bit allow for quick switching between tabs (the first 10 anyway) using <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">1-10</span> (where 0=10). Other useful things to know (though not dependent on this particular configuration): tabs can be closed directly with right click; you can scroll through your tabs by positioning the mouse pointer on the tab bar and using the mouse wheel.<br /> <br /> <b>External editor</b> <br /> <pre><span style="font-size: x-small;">//set emacs as external editor editor_shell_command = "emacsclient -c"; // view source in your editor. view_source_use_external_editor = true;</span></pre><br /> Set emacs as an external editor (assuming you're <a href="http://emacs-fu.blogspot.com/2009/02/emacs-daemon.html">running emacs as a daemon</a>), etc. </div><div style="text-align: justify;"><br /> <b>Managing/Navigating Tab-Buffers</b><br /> <pre><span style="font-size: x-small;">// redefine C-f as "forwards" and C-b as "backwards" // using F and B (that is Shift+F, Shift+B is actually rather inconvenient since // many other command use Control and so requires shifting fingers) define_key(content_buffer_normal_keymap, "C-f", "forward"); define_key(content_buffer_normal_keymap, "C-b", "back"); // make M-f and M-b switch to next and previous buffers define_key(content_buffer_normal_keymap, "M-f", "buffer-next"); define_key(content_buffer_normal_keymap, "M-b", "buffer-previous"); // redefine l as "follow link" (like f) // (too many of the keys are for the left hand, I like "l" for "link") define_key(content_buffer_normal_keymap, "l", "follow"); // Use M-l to follow link in new background buffer define_key(default_global_keymap, "M-l", "follow-new-buffer-background"); // open url in new background buffer (I can't think of a good keybinding for this) interactive("find-url-new-background-buffer", "Open a URL in a new background buffer", alternates(follow_new_buffer_background, follow_new_window), $browser_object = browser_object_url, $prompt = "Find url");</span></pre><br /> The default keys for navigate forwards and navigate backwards are <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">F</span> and <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">B</span>, respectively. I imagine there are historic reasons behind this (it's <a href="http://www.xemacs.org/Documentation/packages/html/w3_2.html#SEC10">how W3 does it</a>), but I find it annoying to have to switch from Ctrl to Shift (since most of the other keybindings involve Ctrl), so the initial bit above binds <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">C-f </span>and <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">C-b</span> to forwards and backwards (<span style="font-family: &quot;Courier New&quot;,Courier,monospace;">F</span> and <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">B</span> still work too). And I bound <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">M-f </span>and <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">M-b </span>to "move to next tab-buffer", "move to previous tab-buffer", respectively. These seem to me to make sense as extensions of the normal behaviour of <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">C-f</span>, <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">C-b</span>, <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">M-f</span>, <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">M-b</span>, in Emacs. [Note: These bindings don't affect the how these keys behave in text boxes. All of these keys retain their expected Emacs-ish behaviour in text boxes.]<br /> <br /> I prefer using <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">l</span> for following links in hint mode, so that's another binding added above (<span style="font-family: &quot;Courier New&quot;,Courier,monospace;">f</span> still works too). And I added <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">M-l</span> as "follow link in new background buffer" (works like middle-click). <br /> <br /> The last bit is a new command for opening URLs in new background buffers, but I haven't thought of a good keybinding for it so far.<br /> <br /> <b>Yanking</b><br /> <pre><span style="font-size: x-small;">// use M-y to google current selection in new buffer // use M-Y to google current selection in new buffer "double-quoted" // [ref: http://www.mozdev.org/pipermail/conkeror/2009-February/001334.html ] // (See also "**c" for selecting text) interactive("search-clipboard-contents", "Search in Google the content of the X clipboard (the selected text)", "find-url", $browser_object= function(I) { return "g "+ read_from_x_primary_selection(); } ); interactive("search-clipboard-contents-doublequoted", "Search in Google the content of the X clipboard (the selected text) as a fixed string", "find-url", $browser_object= function(I) { return "g \""+ read_from_x_primary_selection()+"\""; } ); define_key(content_buffer_normal_keymap, "M-y", "search-clipboard-contents"); define_key(content_buffer_normal_keymap, "M-Y", "search-clipboard-contents-doublequoted");</span></pre><br /> By default, (outside of text boxes, where, again, Conkeror has the expected Emacs-ish behaviour), <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">M-w</span> copies the selected area. And <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">C-y </span>opens whatever's in the clipboard (I would say kill-ring, but it's not) in the current buffer---assuming that what's in the clipboard is a URL. The above code adds two new commands, performing a Google search on the current clipboard contents, and performing a Google search on the current clipboard contents double-quoted. I bound these to <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">M-y</span>, and <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">M-Y</span>, respectively. <br /> <br /> Oh, in general, adding a <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">C-u </span>prefix results in the command being executed in a new buffer. So <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">C-u M-y </span>performs a Google search on the clipboard contents in a new (focussed) buffer.<br /> <br /> <b>More buffer management/misc. bindings</b><br /> <pre><span style="font-size: x-small;">// make C-c C-c "submit form" define_key(content_buffer_normal_keymap, "C-c C-c", "submit-form"); // make C-x 0 "kill current buffer" define_key(default_global_keymap, "C-x 0", "kill-current-buffer"); // make C-x 1 "kill other buffers" define_key(content_buffer_normal_keymap, "C-x 1", "kill-other-buffers"); // make C-x 2 "duplicate buffer" interactive("duplicate-buffer", "Duplicate buffer", function (I) { browser_object_follow(I.buffer, OPEN_NEW_BUFFER, I.buffer.current_uri.spec); }); define_key(content_buffer_normal_keymap, "C-x 2", "duplicate-buffer");</span></pre><br /> Use <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">C-c C-c</span> to submit forms.<br /> <br /> Now Conkeror doesn't have "windows" in the Emacs-sense. It has buffers/tabs. So the above commands depart somewhat from being truly parallel with Emacs behaviour, since in Emacs these commands all involve window management. But I still find it useful to have some keybinding for these commands, and these make a sort of sense to me. <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">C-x 0</span> closes the current tab-buffer (<span style="font-family: &quot;Courier New&quot;,Courier,monospace;">C-x k </span>is the command for "close buffer" in general; it defaults to the current buffer, but requires another keystroke (Enter)); <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">C-x 1</span> closes all tab-buffers except for the current one; <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">C-x 2 </span>duplicates the current tab-buffer in a new tab.<br /> <br /> <b>Set default download directory</b><br /> <pre><span style="font-size: x-small;">// cwd cwd=get_home_directory(); cwd.append("Downloads"); </span></pre><br /> This sets the default download directory to "~/Downloads". "cwd" is useful, and can be used cross-platform. It gets the "home directory". The last line obviously appends "Downloads" to the home directory location.<br /> <br /> <br /> <b>Misc.</b><br /> <pre><span style="font-size: x-small;">// xkcd add mouse-over text xkcd_add_title = true; // No new window for downloads download_buffer_automatic_open_target=OPEN_NEW_BUFFER_BACKGROUND; // Make sure I don't close by accident add_hook("before_quit_hook", function () { var w = get_recent_conkeror_window(); var result = (w == null) || "y" == (yield w.minibuffer.read_single_character_option( $prompt = "Quit Conkeror? (y/n)", $options = ["y", "n"])); yield co_return(result); }); can_kill_last_buffer = false;</span></pre><br /> Show xkcd mouse-over text on the page below the cartoon (it would be nice to have another way of handling mouse-over text though).<br /> <br /> The second command handles how the download info buffer is handled; here it opens in a new tab rather than opening a new window ("frame" in the Emacs sense).<br /> <br /> The last bits makes sure that if by accident I hit <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">C-x C-c </span>rather than <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">C-x C-v </span>it doesn't close everything without asking me, and then final line disallows killing of the last buffer.<br /> <br /> <b>Webjumps</b><br /> Webjumps are a useful feature of Conkeror. In the mini-buffer, instead of typing a url, one can type a webjump. A number of such webjumps are built-in to Conkeror already. For example, "google emacs" will open a google search for "emacs". Actually, "g emacs" will do the same thing, and that's preferable since it's relatively quick to type. Also, "wikipedia emacs" will open the wikipedia page on "emacs", etc. Conkeror also already has webjumps designed for use with del.icio.us (press <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">C-h i</span> for more info).<br /> <br /> And you can define your own webjumps. <a href="http://conkeror.org/Webjumps">Here's a good page</a> of some other useful webjumps you can add. Webjumps are not limited simply to site names, but can include javascript code as well. Here are a couple relatively simple ones I wrote for adding favourites to Stumbleupon and adding stories to Digg:<br /> <span style="font-size: x-small;"><br /> </span><br /> <pre><span style="font-size: x-small;">// Define add favourite to Stumbleupon define_webjump("astumble","javascript:location.href='http://www.stumbleupon.com/submit?url='+encodeURIComponent(location.href)+'&amp;title='+"+"encodeURIComponent(document.title);"); // Define Digg story define_webjump("adigg","javascript:location.href='http://www.digg.com/submit?url='+encodeURIComponent(location.href);");</span></pre><br /> <br /> And here's a screenshot:<br /> <br /> <div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-ciiwlxojtH1jK8m5rzlNKy4FwXyd14dimZtE-RuXGq0h1nSBKKifcq__nbV7_KWZaweC6Tc6uYgfFJJvmjo1t98d6PNREMVhIFCptJk9xGuG5HeI63hF5Kfbogv9jckCuv7NCXBRSkI/s1600/conkeror-screenshot.png"><img border="0" height="236" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-ciiwlxojtH1jK8m5rzlNKy4FwXyd14dimZtE-RuXGq0h1nSBKKifcq__nbV7_KWZaweC6Tc6uYgfFJJvmjo1t98d6PNREMVhIFCptJk9xGuG5HeI63hF5Kfbogv9jckCuv7NCXBRSkI/s400/conkeror-screenshot.png" width="400" /></a></div><br /> </div>be_slayedhttp://www.blogger.com/profile/02920742528327860445noreply@blogger.com12tag:blogger.com,1999:blog-9417648313224391.post-3611781008272448942010-12-22T17:20:00.000-07:002011-06-07T18:36:38.792-06:00Hack - Emacs calendar: Indian/Nepali/Hindu holidays for 2011Ideally, it would be nice to calculate these automatically for all years (and to be able to convert from Gregorian to Vikram (Bikram) Samvat dates).... But for now, this can be inserted into your .emacs file to display Hindu holidays for 2011:<br /> <br /> <pre><span style="font-size: x-small;">;; Hindu Holidays (North India/Nepal) (setq holiday-other-holidays '( (holiday-fixed 1 14 "Makar Sankranti") (holiday-fixed 2 8 "Vasant Panchami / Saraswati Puja") (holiday-fixed 3 3 "Maha Shivaratri") (holiday-fixed 3 19 "Holi") (holiday-fixed 4 4 "Bikrami Samvat / Hindu New Year [2068]") (holiday-fixed 4 12 "Ram Navmi") (holiday-fixed 4 18 "Hanuman Jayanti") (holiday-fixed 5 6 "Akshaya Tritiya (Akha Teej)") (holiday-fixed 6 15 "Savitri Puja") (holiday-fixed 7 15 "Guru Purnima") (holiday-fixed 8 4 "Naag Panchami") (holiday-fixed 8 12 "Mahalakshmi Vrata") (holiday-fixed 8 13 "Raksha-Bandhan + Janai Purnima") (holiday-fixed 8 22 "Krishna Janmashtami") (holiday-fixed 9 1 "Ganesh Chaturthi") (holiday-fixed 9 9 "Indra Jatra begins") (holiday-fixed 9 11 "Kumari Indra Jatra") (holiday-fixed 9 17 "Indra Jatra ends") (holiday-fixed 9 11 "Teej") (holiday-fixed 9 13 "Pitr-Paksha begins") (holiday-fixed 9 27 "Mahalaya (Pitr-Paksha ends)") (holiday-fixed 9 28 "Navaratri begins") (holiday-fixed 10 3 "Durga Puja begins (Maha Saptami)") (holiday-fixed 10 5 "Navaratri ends") (holiday-fixed 10 6 "Dasain/Dusshera (Vijaya Dashami)") (holiday-fixed 10 11 "Lakshmi Puja (Sharad Purnima)") (holiday-fixed 10 16 "Karwa Chauth") (holiday-fixed 10 25 "Dhan Teras") (holiday-fixed 10 26 "Diwali / Deepavali / Tihar") (holiday-fixed 10 28 "Bhai Dooj") ) )</span></pre><br /> You may want to add other holidays as appropriate, e.g. South Indian holidays; holidays specific to the Punjab, Orissa etc. The format is:<br /> (holiday-fixed <b>numeric-value-of-Gregorian-month</b> <b>numeric-day-of-month</b> "<b>Name-of-Holiday</b>").<br /> <br /> E.g. (holiday-fixed 3 5 "Losar") for the holiday Losar falling on 5th March.be_slayedhttp://www.blogger.com/profile/02920742528327860445noreply@blogger.com2tag:blogger.com,1999:blog-9417648313224391.post-27246521555370277192010-11-17T10:30:00.000-07:002011-01-15T19:13:28.582-07:00Hack: Emacs-like bindings for Pentadactyl<a href="http://dactyl.sourceforge.net/pentadactyl/">Pentadactyl</a> -- the successor of <a href="http://vimperator.org/vimperator">Vimperator</a> -- can speed up your web-use, especially if you're used to using a high-powered editor like <a href="http://www.vim.org/">Vi(m)</a> or <a href="http://www.gnu.org/software/emacs/">Emacs</a>. <br /> <br /> I've started using Emacs a lot recently, because of the brilliant Emacs TeX packages&nbsp; (i.e. <a href="http://www.gnu.org/software/auctex/">AUCTeX</a> and <a href="http://www.gnu.org/software/auctex/reftex.html">RefTeX</a>, <a href="http://www.gnu.org/software/auctex/preview-latex.html">preview-latex</a>, <a href="http://www.gnu.org/software/auctex/manual/auctex/Outline.html#Outline">outline mode</a>), thus I've got used to Emacs-like bindings. <br /> <br /> So, inspired by<a href="http://sysphere.org/%7Eanrxc/j/archives/2009/03/12/vimperator_for_emacs_users/index.html"> anrxc's vimperator bindings</a> (but differing significantly from them in many places): a configuration file for&nbsp; that provides an Emacs-like set of keybindings for Pentadactyl.<br /> <br /> 1) <a href="http://www.jnanam.net/pentadactylemacs/.pentadactylrc">.pentadactyl configuration file</a><br /> 2) <a href="http://www.jnanam.net/pentadactylemacs/pentadactylemacs.pdf">QuickReference 'card' as PDF</a><br /> 3) <a href="http://www.jnanam.net/pentadactylemacs/pentadactylemacs.tex">QuickReference 'card' as TeX</a><br /> 4) <a href="http://www.jnanam.net/pentadactylemacs/pentadactylemacs.html">QuickReference 'card' as HTML&nbsp;</a><br /> <br /> <br /> This is version 1. Comments/suggestions welcome.<br /> <br /> <b>[Edit (2011-Jan-11): With the latest version of Pentadactyl, something seems broken (the mode-line isn't appearing). I don't know if this is something with the configuration or some deeper change to Pentadactyl. However, I've switched to <a href="http://emacs-fu.blogspot.com/2010/12/conkeror-web-browsing-emacs-way.html">Conkeror</a>, so I'm no longer actively updating this config.</b><br /> <br /> <b>See <a href="http://babbagefiles.blogspot.com/2011/01/conkeror-browsing-web-emacs-style.html">this BabbageFiles post, "Browsing the web, Emacs-style - with Conkeror"</a>.] </b><br /> <b>]</b>be_slayedhttp://www.blogger.com/profile/02920742528327860445noreply@blogger.com1tag:blogger.com,1999:blog-9417648313224391.post-47773640435499676422010-10-15T18:31:00.000-06:002010-10-15T18:34:58.505-06:00Linux: More than 1%<a href="http://www.dudalibre.com/gnulinuxcounter?lang=en">We are more than 1%</a>:<br /> <blockquote>With this initiative, we intend to refute the statistics of certain press organizations that ensure that the use of GNU/Linux does not exceed 1% and has not advanced in recent years at the desktop.</blockquote><blockquote>If you want to help us accomplish this goal, please participate in our statistics!</blockquote><div class="separator" style="clear: both; text-align: center;"><a href="http://www.dudalibre.com/gnulinuxcounter?lang=en"><img border="0" src="http://www.dudalibre.com/images/gnu.gif" /></a></div><br /> Link:&nbsp;<a href="http://www.dudalibre.com/gnulinuxcounter?lang=en">http://www.dudalibre.com/gnulinuxcounter?lang=en</a><br /> <br /> <br /> <br /> <span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Interestingly, from the statistics collected on the above site (as of 15 Oct 2010), there are large numbers of Linux users in Poland and Russia.</span>be_slayedhttp://www.blogger.com/profile/02920742528327860445noreply@blogger.com0tag:blogger.com,1999:blog-9417648313224391.post-59304962412256425052010-10-06T10:17:00.000-06:002011-01-23T15:45:30.092-07:00New Babbage Analytical Engine(?)<div dir="ltr" style="text-align: left;" trbidi="on">John Graham-Cumming proposes to build a working version of Babbage's Analytical Engine for public display [<a href="http://radar.oreilly.com/2010/10/the-100-year-leap.html">original article here</a>&nbsp;and <a href="http://plan28.org/">working project page here</a>].<br /> <br /> <div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="http://radar.oreilly.com/460426704_9fbc686a6a_z.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://radar.oreilly.com/460426704_9fbc686a6a_z.jpg" width="300" /></a></div><br /> <br /> There's currently a <a href="http://www.facebook.com/pages/Plan-28/133946159986393">Facebook</a> and <a href="http://twitter.com/plan28/">Twitter</a> page, and a <a href="http://www.pledgebank.com/babbage">Pledgebank</a> page.<br /> <br /> <div class="separator" style="clear: both; text-align: center;"><a href="http://www.i-programmer.info/images/stories/ComputerCreators/Babbage/anaengine.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="312" src="http://www.i-programmer.info/images/stories/ComputerCreators/Babbage/anaengine.jpg" width="400" /></a></div></div>be_slayedhttp://www.blogger.com/profile/02920742528327860445noreply@blogger.com0