Skip to content

Instantly share code, notes, and snippets.

* startup
#+tags: { file buffer window frame }
#+tags: { TODO STARTED DEFERRED DONE }
#+tags: { NNF NDOC NDTR FKOC }
#+tags: { emacs mx-owl2 }
#+tags: { rs rs-env not-rs }
#+tags: { dfa-dg.org mx-dfa.org doc.org }
#+tags: { concept term syntax }
@donlindsay
donlindsay / gist:7384f634dd4ffe80d99d8865b6112a02
Last active December 24, 2016 03:06
semantic processing with rudybot in freenode channel #emacs: subsuming 'like pairs'
* Text of interaction with rudybot:
#+begin_src text
<xk051> rudybot: some days you get the puma. some days the puma gets you.
<rudybot> xk051: is troubled to learn that puma and panther refer to the same
animal, but are different releases of osx
<xk051> rudybot: cougars and mountain lions are the same animal, too. you
never complain about that.
<rudybot> xk051: Mountain lions and cougars are the same thing.
<marcx> yeh
<marcx> most people also don't seem to know that black panther isn't a
~/opt/emacs$ sudo aptitude search webkitgtk
i A libwebkitgtk-1.0-0 - Web content engine library for GTK+
p libwebkitgtk-1.0-0:i386 - Web content engine library for GTK+
p libwebkitgtk-1.0-0-dbg - Web content engine library for GTK+ - debugging symbols
p libwebkitgtk-1.0-0-dbg:i386 - Web content engine library for GTK+ - debugging symbols
i A libwebkitgtk-1.0-common - Web content engine library for GTK+ - data files
v libwebkitgtk-1.0-common:i386 -
i libwebkitgtk-3.0-0 - Web content engine library for GTK+
p libwebkitgtk-3.0-0:i386 - Web content engine library for GTK+
p libwebkitgtk-3.0-0-dbg - Web content engine library for GTK+ - debugging symbols
@donlindsay
donlindsay / gist:7ed85b52a4d2d7e48cfb
Created June 6, 2015 02:33
org-mode mimetype definition for firefox mimeTypes.rdf
<RDF:Description RDF:about="urn:mimetype:text/x-org-mode"
NC:prettyName="Org-Mode file"
NC:value="text/x-org-mode"
NC:editable="true"
NC:description="A file formatted in Emacs Org Mode."
NC:fileExtensions="org"/>
@donlindsay
donlindsay / gist:61554ca8e48cbbd73450
Created June 5, 2015 06:11
Start emacsclient (and daemon, if necessary)
emacsclient -c -a ""
# "" is the equivalent of an environment of ALTERNATE_EDITOR=""
@donlindsay
donlindsay / org-as-json-to-file
Created January 26, 2015 02:42
org-as-json-to-file
(require 'json)
(defun org-as-json-to-file (&optional path)
"Export the current Org-mode buffer as JSON to the supplied PATH."
(interactive "Fwrite to file: ")
(let ((tree (org-element-parse-buffer)))
(org-element-map tree
(append org-element-all-objects org-element-all-elements)
(lambda (el) (org-element-put-property el :parent nil)))
(with-temp-file path
(insert (json-encode tree)))))
@donlindsay
donlindsay / gist:1da587b5a0ad4b1b7484
Created January 12, 2015 19:57
java code block example
*** java code block
:PROPERTIES:
:DATE: 2011-07-19
:END:
#+begin_src java :classname myfirstjavaprog
class myfirstjavaprog
{
public static void main(String args[])
{
System.out.println("Hello World!");
;;; hammertime:
(require 'sawmill-defaults)
;;; startup
(system "/usr/bin/xcompmgr -n &")
(system "/usr/bin/tint2 &")
(system "/usr/local/bin/emacs &")
(define-buffer-button (elisp-eval b
:label "<- Eval"
:prefix ";;")
(save-excursion
(goto-char (button-start b))
(eval-last-sexp nil)))
(define-buffer-button (mxgit-push b
:label "UPLOAD"
:prefix ";;")
(with-current-buffer mx-buttons.el
(goto-char (button-start b))
(cd "~/src/mx-org-rl/")
(interactive-form (
(shell-command "git push origin master" nil)))))