jawabiscuit / .emacs.d Goto Github PK
View Code? Open in Web Editor NEWMy unbelievably cool and nerdy emacs settings
My unbelievably cool and nerdy emacs settings
Installation errors on linux machine that does not have dash.
GNU Emacs 24.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.22.10) of 2017-09-20 on c1bm.rdu2.centos.org
Initial startup fails if custom.el doesn't exist.
Haven't noticed til now sane-defaults.el is in defuns when it should be in settings.
;; This config requires packages hosted by melpa
(require 'package)
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
(not (gnutls-available-p))))
(proto (if no-ssl "http" "https")))
;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
(add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
(when (< emacs-major-version 24)
;; For important compatibility libraries like cl-lib
(add-to-list 'package-archives '("gnu" . (concat proto "://elpa.gnu.org/packages/")))))
(package-initialize)
;; (defun myorg-update-parent-cookie ()
;; (when (equal major-mode 'org-mode)
;; (save-excursion
;; (ignore-errors
;; (org-back-to-heading)
;; (org-update-parent-todo-statistics)))))
;; (defadvice org-kill-line (after fix-cookies activate)
;; (myorg-update-parent-cookie))
;; (defadvice kill-whole-line (after fix-cookies activate)
;; (myorg-update-parent-cookie))
;; (setq org-directory "~/Dropbox/org")
;; (setq org-default-notes-file (concat org-directory "/notes.org"))
(define-key global-map (kbd "M-<f6>") 'org-capture)
;; keep track of when a certain TODO item was finished
(setq org-log-done 'time)
;; record a note along with the timestamp
;; (setq org-log-done 'note)
;; Active Babel languages
(with-eval-after-load 'org
(org-babel-do-load-languages
'org-babel-load-languages
'((R . t)
(C . t)
(python . t)
)))
;; Pretty bullets :) instead of ugly asterisks :(
(use-package org-bullets
:init
(add-hook 'org-mode-hook #'org-bullets-mode)
)
;; Hide leading asterisks and indent correctly
(setq org-hide-leading-stars t)
;; Use syntax highlighting in source blocks while editing
(setq org-src-fontify-natively t)
;; Make TAB act as if it were issued in a buffer of the language's
;; major mode.
(setq org-src-tab-acts-natively t)
;; When editing a code snippet, use the current window rather than
;; popping open a new one (which shows the same information).
(setq org-src-window-setup 'current-window)
;; Quickly insert a block of elisp
(add-to-list 'org-structure-template-alist
'("el" "#+BEGIN_SRC emacs-lisp\n?\n#+END_SRC"))
;; TODO: Enable spell-check in org-mode
; (add-hook 'org-mode-hook 'flyspell-mode)
;; This blog was really helpful figuring structure templates out
;; https://blog.aaronbieber.com/2016/11/23/creating-org-mode-structure-templates.html
;; Create a new structure template
(add-to-list 'org-structure-template-alist
(list "p" (concat ":PROPERTIES:\n"
"?\n"
":END:")))
(add-to-list 'org-structure-template-alist
(list "py" (concat "#+BEGIN_SRC python\n"
"?\n"
"#+END_SRC")))
;; Html export options template
(add-to-list 'org-structure-template-alist
(list "eh" (concat ":EXPORT_FILE_NAME: ?\n"
":EXPORT_TITLE:\n"
":EXPORT_OPTIONS: toc:nil html-postamble:nil num:nil")))
;; Org mode header options template
(add-to-list 'org-structure-template-alist
(list "o" (concat "#+OPTIONS: title:nil toc:nil ^:nil num:nil\n"
"#+STARTUP: content indent\n"
"#+STARTUP: hidestars\n"
"#+AUTHOR: Jonas Avrin\n"
"#+TITLE: \n"
"#+SUBTITLE: \n"
"#+DESCRIPTION: \n")))
;; Jekyll post front matter
(add-to-list 'org-structure-template-alist
(list "j" (concat "@@html:---\n"
"layout: post\n"
"title: ?\n"
"date: \n"
"category: \n"
"---\n"
"@@\n")))
;; GTD TODO keywords and hide logs
(setq org-todo-keywords
'((sequence "ACTION" "INCUBATE" "DEFERRED" "REFERENCE" "WAITING(w@)" "|" "DONE" "DELEGATED" "CATEGORIZED(c@)" "ARCHIVE")))
(setq org-log-into-drawer 1)
;; GTD fast tag selection
(setq org-tag-alist '(("gtd" . ?G)
(:startgroup)
("engage" . ?N) ;; Day to day engagement
("review" . ?R) ;; Periodic review
("someday" . ?S) ;; Someday maybe project list
(:endgroup)
;; Three Models for making action choices
;; 1 - The Four-Criteria Model for choosing actions in the moment
("context" . ?C)
;; 1 - Context : are you in the right space to do this action?
(:startgroup)
("@home" . ?h) ("@work" . ?w) ("@anywhere" . ?a)
(:endgroup)
("sub_context" . ?X)
(:startgroup)
("office" . ?1) ("outside" . ?2) ("garage" . ?3)
("kitchen" . ?4) ("bathroom" . ?5) ("storage" . ?6)
(:endgroup)
("status" . ?B)
(:startgroup)
;; ("status" . ?X))
("online". ?o) ("offline" . ?O)
(:endgroup)
("type" . ?E)
(:startgroup)
("meeting" . ?m) ("discussion" . ?t) ("call" . ?c)
(:endgroup)
;; 2 - Time Available : do you have enough time to complete it?
("time" . ?T)
(:startgroup)
("5m_or_less" . ?q) ; quick
("30m_or_less" . ?l) ; less quick
("30m_or_more" . ?s) ; slow
(:endgroup)
;; 3 - Energy available : are you alert enough to do this?
("intensity" . ?I)
(:startgroup)
("high" . ?9)
("low" . ?0)
(:endgroup)
;; 4 - Priority : what's going to give you the highest payoff
;; Track this using TODO priority
;; 2 - The Threefold Model for Identifying Daily Work
;; Doing predefined work - working from NAs and calendar
;; Do work as it shows up
;; Defining your work - clearing inboxes, processing meeting notes, breaking down new projects
;; Do during periodic review meeting
;; Track this using :review: tag
;; 3 - The Six-Level Model for Reviewing Your Own Work
;; There are 6 perspectives to define priorities
;; 1 - Ground : current next actions list
;; 2 - Projects : Current projects, they are generating the most NAs
("project" . ?p)
(:startgroup)
("clarify" . ?y)
("brainstorm" .?b)
("reference" . ?r)
("research" . ?j)
(:endgroup)
;; 3 - Areas of Focus and Accountability : key areas of life and work.
;; TODO Identify areas of focus
("aof" . ?k)
(:startgroup)
(:endgroup)
;; 4 - Goals : one to two years from now
;; TODO Identify goals
("goals" . ?g)
(:startgroup)
(:endgroup)
;; 5 - Vision : projecting three to five years out into bigger categories
("vision" . ?v)
(:startgroup)
("strategies" . ?z)
("trends" . ?d)
("career" . ?e)
(:endgroup)
;; 6 - Purpose and principles : Big picture view
;; TODO Identify principles
("principles" . ?i)
(:startgroup)
(:endgroup)
))
(provide 'setup-org)
Try this config (desktop-save-mode 1)
configuration.org
;; Emacs to Maya
(require 'etom)
setup-key-bindings
(define-key python-mode-map (kbd "C-c <C-return>") 'etom-send-region)
(define-key python-mode-map (kbd "C-c C-S-c") 'etom-send-buffer)
(define-key python-mode-map (kbd "C-c C-S-b") 'etom-show-buffer)
ignore submodule commits
Download both packages into site-lisp
configuration.org - requires line
(require 'dired-details+)
sane-defaults.el - selecting this font is producing a warning @work
;; Fonts
; (add-to-list 'default-frame-alist '(font . "DejaVu Sans Mono-12"))
; (set-face-attribute 'default t :font "DejaVu Sans Mono-12")
c-c c-x d
#+OPTIONS: title:nil toc:nil ^:nil num:nil
#+STARTUP: content indent
#+STARTUP: hidestars
#+AUTHOR: Jonas
#+TITLE:
#+SUBTITLE:
#+DESCRIPTION:
.python-environments/
packFile.py
"/bluesky/design/users/jonasavrin/Documents/maya/2018-4.1/"
machine name southbridge
GNU Emacs 24.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.22.10) of 2017-09-20 on c1bm.rdu2.centos.org
Contacting host: melpa.milkbox.net:80
Saving file /u/jonasavrin/.emacs.d/elpa/archives/melpa/archive-contents...
Wrote /u/jonasavrin/.emacs.d/elpa/archives/melpa/archive-contents
Contacting host: stable.melpa.org:80
Saving file /u/jonasavrin/.emacs.d/elpa/archives/melpa-stable/archive-contents...
Wrote /u/jonasavrin/.emacs.d/elpa/archives/melpa-stable/archive-contents
package-compute-transaction: Package `emacs-25.1' is unavailable
git submodule add https://github.com/Fuco1/smartparens.git
git submodule update init --remote --recursive
should be git submodule update --init --remote --recursive
configuration.org
;; mel outline mode
(require 'mel-magic)
mode-mappings.el
("\\.aliases$" . shell-script-mode)
("\\.bxt$" . shell-script-mode)
("\\.poi$" . shell-script-mode)
mel-mode.el
(require 'font-lock)
(require 'cc-mode)
(require 'browse-url-dwim)
+(require 'outline)
(defvar mel-mode-map (make-sparse-keymap))
(set-keymap-parent mel-mode-map c++-mode-map)
(define-key mel-mode-map "\C-cf" 'mel-mode-open-document)
+ (define-key mel-mode-map (kbd "C--") 'outline-hide-body)
+ (define-key mel-mode-map (kbd "C-=") 'outline-show-all)
+ (define-key mel-mode-map (kbd "C-+") 'outline-cycle)
)
(setq org-todo-keywords
'((sequence "ACTION" "NEXT" "INCUBATE" "DEFERRED" "REFERENCE" "WAITING(w@)" "|" "DONE" "DELEGATED" "CATEGORIZED(c@)" "TRASH")))
(setq org-log-into-drawer 1)
(defun endless/insert-key (key)
"Ask for a key then insert its description.
Will work on both org-mode and any mode that accepts plain html."
(interactive "kType key sequence: ")
(let* ((is-org-mode (derived-mode-p 'org-mode))
(tag (if is-org-mode
"@@html:<kbd>%s</kbd>@@"
"<kbd>%s</kbd>")))
(if (null (equal key "\r"))
(insert
(format tag (help-key-description key nil)))
(insert (format tag ""))
(forward-char (if is-org-mode -8 -6)))))
(define-key org-mode-map "\C-ck" 'endless/insert-key)
endless/insert-key
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.