[Purdue-pm] for Emacs users

Mark Daniel Ward mdw at purdue.edu
Mon Aug 31 10:38:18 PDT 2015

Dear Mark,

I'm an emacs fanatic too.  Thanks for sharing this information!


On 8/31/15 12:54 PM, Mark Senn wrote:
> Do any Purdue Perl Mongers besides me use Emacs?
> Following my signature (i.e., "-mark") is some stuff I recently added to
> my .emacs file to make using Perl 6 easier.
> The "Package path and loading." stuff will automatically get and install
> smart-compile and smarter-compile packages.  (Don't have to get packages
> manually when using a new computer.)
> The "smarter-compile configuration" stuff is used to set up Emacs so it
> will process files that end in ".p6" with "/usr/new/bin/perl".
> The global-set-key commands are used so I can type Control-C Control-C
> to smarter-compile it and confirm that I want to use "/usr/new/bin/perl6".
> The Emacs window is split into two parts automatically and the program is run
> in the other window.  After that, Control-C Control-R recompiles it using
> the same Perl 6 executable.  I'm looking into packages that read the
> she-bang line of the file and do the right thing.
> I'm an ergonomic nut.  I use a TypeMatrix 2020 keyboard in Dvorak mode
> now.  See
>      http://www.typematrix.com/shop/
> "C" is where "I" is on normal QWERTY keyboards; "R" is where "O" is on
> normal QWERTY keyboards so the key sequences above are easy to type.  My
> hands are too big to use a Typematrix 2030 keyboard comfortably.  I have
> an ErgoDox kit I need to assemble (see
> https://www.massdrop.com/buy/infinity-ergodox?mode=guest_open) and
> ordered a a Keyboardio Model 01 that should come next year (see
> http://shop.keyboard.io---wish it were made out of plastic instead of
> wood, but I think only wood is available).  If you're interested in these
> let me know and I'll bring them to a meeting after assembled and received.
> -mark
> ; Package path and loading.
> ; See https://truongtx.me/2013/01/07/emacs-package-manager/
> ;;; Emacs is not a package manager, and here we load its package manager!
> (require 'package)
> (dolist (source '(("marmalade" . "http://marmalade-repo.org/packages/")
>                    ("elpa" . "http://tromey.com/elpa/")
>                    ("melpa" . "http://melpa.milkbox.net/packages/")
>                    ))
>    (add-to-list 'package-archives source t))
> (package-initialize)
> ;;; Required packages
> ;;; everytime emacs starts, it will automatically check if those packages are
> ;;; missing, it will install them automatically
> (when (not package-archive-contents)
>    (package-refresh-contents))
> (defvar tmtxt/packages
>    '(smart-compile smarter-compile))
> (dolist (p tmtxt/packages)
>    (when (not (package-installed-p p))
>      (package-install p)))
> ; smarter-compile configuration
> ; See https://marmalade-repo.org/packages/smarter-compile
> ; M-x recompile just does the last command as last time without prompting.
> (require 'smarter-compile)
> (add-to-list
> 'smart-compile-alist
>   '("\\.p6\\'"   .   "/usr/new/bin/perl6 %f"))
> (global-set-key "\C-c\C-c" 'smarter-compile)
> (global-set-key "\C-c\C-r" 'recompile)
> _______________________________________________
> Purdue-pm mailing list
> Purdue-pm at pm.org
> http://mail.pm.org/mailman/listinfo/purdue-pm

More information about the Purdue-pm mailing list