diff --git a/.gitignore b/.gitignore index f139572..045bfca 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ /.hive-maint /var +auto-save-list +/history +*.elc +/recentf~ +recentf diff --git a/.gitmodules b/.gitmodules index 2919cce..2977084 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,15 +1,63 @@ [borg] pushDefault = locutus collective = emacsg +[submodule "ag"] + path = lib/ag + url = git@github.com:Wilfred/ag.el.git +[submodule "alert"] + path = lib/alert + url = git@github.com:jwiegley/alert.git +[submodule "all-the-icons"] + path = lib/all-the-icons + url = git@github.com:domtronn/all-the-icons.el.git +[submodule "amd-mode"] + path = lib/amd-mode + url = git@github.com:NicolasPetton/amd-mode.el.git +[submodule "anzu"] + path = lib/anzu + url = git@github.com:syohex/emacs-anzu.git +[submodule "auth-password-store"] + path = lib/auth-password-store + url = git@github.com:DamienCassou/auth-password-store.git [submodule "auto-compile"] path = lib/auto-compile url = git@github.com:tarsius/auto-compile.git +[submodule "avy"] + path = lib/avy + url = git@github.com:abo-abo/avy.git +[submodule "beginend"] + path = lib/beginend + url = git@github.com:DamienCassou/beginend.git [submodule "borg"] path = lib/borg url = git@github.com:emacscollective/borg.git +[submodule "buffer-watcher"] + path = lib/buffer-watcher + url = git@github.com:NicolasPetton/buffer-watcher.git +[submodule "cider"] + path = lib/cider + url = git@github.com:clojure-emacs/cider.git +[submodule "clj-refactor"] + path = lib/clj-refactor + url = git@github.com:clojure-emacs/clj-refactor.el.git +[submodule "clojure-mode"] + path = lib/clojure-mode + url = git@github.com:clojure-emacs/clojure-mode.git [submodule "closql"] path = lib/closql url = git@github.com:emacscollective/closql.git +[submodule "company"] + path = lib/company + url = git@github.com:company-mode/company-mode.git +[submodule "company-restclient"] + path = lib/company-restclient + url = git@github.com:iquiw/company-restclient.git +[submodule "company-tern"] + path = lib/company-tern + url = git@github.com:proofit404/company-tern.git +[submodule "counsel-projectile"] + path = lib/counsel-projectile + url = git@github.com:ericdanan/counsel-projectile.git [submodule "dash"] path = lib/dash url = git@github.com:magnars/dash.el.git @@ -17,6 +65,21 @@ [submodule "diff-hl"] path = lib/diff-hl url = git@github.com:dgutov/diff-hl.git +[submodule "diminish"] + path = lib/diminish + url = git@github.com:myrjola/diminish.el.git +[submodule "drag-stuff"] + path = lib/drag-stuff + url = git@github.com:rejeep/drag-stuff.el.git +[submodule "duplicate-thing"] + path = lib/duplicate-thing + url = git@github.com:ongaeshi/duplicate-thing.git +[submodule "edn"] + path = lib/edn + url = git@github.com:expez/edn.el.git +[submodule "emacs-js"] + path = lib/emacs-js + url = git@github.com:foretagsplatsen/emacs-js.git [submodule "emacsql"] path = lib/emacsql url = git@github.com:skeeto/emacsql.git @@ -24,22 +87,199 @@ [submodule "epkg"] path = lib/epkg url = git@github.com:emacscollective/epkg.git +[submodule "epl"] + path = lib/epl + url = git@github.com:cask/epl.git +[submodule "eslintd-fix"] + path = lib/eslintd-fix + url = git@github.com:aaronjensen/eslintd-fix.git +[submodule "exec-path-from-shell"] + path = lib/exec-path-from-shell + url = git@github.com:purcell/exec-path-from-shell.git +[submodule "expand-region"] + path = lib/expand-region + url = git@github.com:magnars/expand-region.el.git +[submodule "f"] + path = lib/f + url = git@github.com:rejeep/f.el.git [submodule "finalize"] path = lib/finalize url = git@github.com:skeeto/elisp-finalize.git +[submodule "flycheck"] + path = lib/flycheck + url = git@github.com:flycheck/flycheck.git +[submodule "font-lock+"] + path = lib/font-lock+ + url = git@github.com:emacsmirror/font-lock-plus.git +[submodule "frame-cmds"] + path = lib/frame-cmds + url = git@github.com:emacsmirror/frame-cmds.git +[submodule "frame-fns"] + path = lib/frame-fns + url = git@github.com:emacsmirror/frame-fns.git +[submodule "ftgp"] + path = lib/ftgp + url = git@gitlab.petton.fr:ftgp/emacs.git [submodule "git-modes"] path = lib/git-modes url = git@github.com:magit/git-modes.git +[submodule "gnome-calendar"] + path = lib/gnome-calendar + url = git@github.com:NicolasPetton/gnome-calendar.el.git +[submodule "grunt"] + path = lib/grunt + url = git@github.com:gempesaw/grunt.el.git +[submodule "gulp-task-runner"] + path = lib/gulp-task-runner + url = git@github.com:NicolasPetton/gulp-task-runner.git +[submodule "hierarchy"] + path = lib/hierarchy + url = git@github.com:DamienCassou/hierarchy.git +[submodule "hydra"] + path = lib/hydra + url = git@github.com:abo-abo/hydra.git +[submodule "indium"] + path = lib/indium + url = git@github.com:NicolasPetton/Indium.git +[submodule "ivy"] + path = lib/ivy + url = git@github.com:abo-abo/swiper.git +[submodule "js2-mode"] + path = lib/js2-mode + url = git@github.com:mooz/js2-mode.git +[submodule "js2-refactor"] + path = lib/js2-refactor + url = git@github.com:magnars/js2-refactor.el.git +[submodule "jump"] + path = lib/jump + url = git@github.com:eschulte/jump.el.git +[submodule "klassified"] + path = lib/klassified + url = https://github.com/DamienCassou/klassified.el.git +[submodule "know-your-http-well"] + path = lib/know-your-http-well + url = git@github.com:for-GET/know-your-http-well.git +[submodule "ledger-mode"] + path = lib/ledger-mode + url = git@github.com:ledger/ledger-mode.git +[submodule "less-css-mode"] + path = lib/less-css-mode + url = git@github.com:purcell/less-css-mode.git [submodule "magit"] path = lib/magit url = git@github.com:magit/magit.git info-path = Documentation +[submodule "makey"] + path = lib/makey + url = git@github.com:mickeynp/makey.git +[submodule "memoize"] + path = lib/memoize + url = git@github.com:skeeto/emacs-memoize.git +[submodule "multiple-cursors"] + path = lib/multiple-cursors + url = git@github.com:magnars/multiple-cursors.el.git +[submodule "notmuch"] + path = lib/notmuch + url = git://notmuchmail.org/git/notmuch +[submodule "org"] + path = lib/org + url = git://orgmode.org/org-mode.git +[submodule "org-bullets"] + path = lib/org-bullets + url = git@github.com:emacsorphanage/org-bullets.git +[submodule "org-gnome"] + path = lib/org-gnome + url = git@github.com:NicolasPetton/org-gnome.el.git +[submodule "org-gnome-calendar"] + path = lib/org-gnome-calendar + url = git@github.com:llvilanova/org-gnome-calendar.git +[submodule "org-pomodoro"] + path = lib/org-pomodoro + url = git@github.com:lolownia/org-pomodoro.git [submodule "packed"] path = lib/packed url = git@github.com:tarsius/packed.git +[submodule "paredit"] + path = lib/paredit + url = http://mumble.net/~campbell/git/paredit.git +[submodule "pass"] + path = lib/pass + url = git@github.com:NicolasPetton/pass.git +[submodule "password-store"] + path = lib/password-store + url = git@github.com:emacsmirror/password-store.git +[submodule "peg"] + path = lib/peg + url = git@github.com:ellerh/peg.el.git +[submodule "pkg-info"] + path = lib/pkg-info + url = git@github.com:lunaryorn/pkg-info.el.git +[submodule "prodigy"] + path = lib/prodigy + url = git@github.com:rejeep/prodigy.el.git +[submodule "projectile"] + path = lib/projectile + url = git@github.com:bbatsov/projectile.git +[submodule "queue"] + path = lib/queue + url = git@github.com:emacsmirror/queue.git +[submodule "rainbow-mode"] + path = lib/rainbow-mode + url = git@github.com:emacsmirror/rainbow-mode.git +[submodule "restclient"] + path = lib/restclient + url = git@github.com:pashky/restclient.el.git +[submodule "s"] + path = lib/s + url = git@github.com:magnars/s.el.git +[submodule "seq"] + path = lib/seq + url = git@github.com:emacsmirror/seq.git +[submodule "shell-switcher"] + path = lib/shell-switcher + url = git@github.com:DamienCassou/shell-switcher.git +[submodule "slime"] + path = lib/slime + url = git@github.com:slime/slime.git +[submodule "spinner"] + path = lib/spinner + url = git@github.com:Malabarba/spinner.el.git +[submodule "sudo-edit"] + path = lib/sudo-edit + url = git@github.com:nflath/sudo-edit.git +[submodule "telepathy"] + path = lib/telepathy + url = git@github.com:NicolasPetton/telepathy.el.git +[submodule "tern"] + path = lib/tern + url = git@github.com:ternjs/tern.git [submodule "use-package"] path = lib/use-package url = git@github.com:jwiegley/use-package.git +[submodule "web-mode"] + path = lib/web-mode + url = git@github.com:fxbois/web-mode.git +[submodule "websocket"] + path = lib/websocket + url = git@github.com:ahyatt/emacs-websocket.git +[submodule "widgetjs"] + path = lib/widgetjs + url = git@github.com:foretagsplatsen/emacs-js.git [submodule "with-editor"] path = lib/with-editor url = git@github.com:magit/with-editor.git +[submodule "ws-butler"] + path = lib/ws-butler + url = git@github.com:lewang/ws-butler.git +[submodule "xref-js2"] + path = lib/xref-js2 + url = git@github.com:NicolasPetton/xref-js2.git +[submodule "yasnippet"] + path = lib/yasnippet + url = git@github.com:joaotavora/yasnippet.git +[submodule "zerodark-theme"] + path = lib/zerodark-theme + url = git@github.com:NicolasPetton/zerodark-theme.git +[submodule "zoom-frm"] + path = lib/zoom-frm + url = git@github.com:emacsmirror/zoom-frm.git diff --git a/.mc-lists.el b/.mc-lists.el new file mode 100644 index 0000000..3802583 --- /dev/null +++ b/.mc-lists.el @@ -0,0 +1,78 @@ +;; This file is automatically generated by the multiple-cursors extension. +;; It keeps track of your preferences for running commands with multiple cursors. + +(setq mc/cmds-to-run-for-all + '( + LaTeX-babel-insert-hyphen + LaTeX-insert-left-brace + TeX-insert-backslash + ace-jump-done + ace-jump-mode + ace-jump-move + amd-kill-line + artist-forward-char + backward-sentence + backward-sexp + c-electric-delete-forward + coffee-dedent-line-backspace + comment-dwim + counsel-yank-pop + dabbrev-expand + electric-pair-delete-pair + end-of-visual-line + eval-and-replace + eval-last-sexp + exchange-point-and-mark-noactivate + forward-sexp + helm-M-x + indent-for-tab-command + insert-register + ivy-done + js2r-kill + js2r-rename-var + kill-region + markdown-enter-key + org-beginning-of-line + org-delete-char + org-end-of-line + org-kill-line + org-self-insert-command + orgtbl-hijacker-command-109 + orgtbl-self-insert-command + paredit-backslash + paredit-backward + paredit-backward-kill-word + paredit-backward-slurp-sexp + paredit-comment-dwim + paredit-doublequote + paredit-forward + paredit-forward-delete + paredit-forward-kill-word + paredit-forward-slurp-sexp + paredit-kill + paredit-meta-doublequote + paredit-open-round + paredit-raise-sexp + paredit-wrap-round + picture-backward-clear-column + picture-clear-column + picture-self-insert + sgml-slash + transpose-words + wdired-finish-edit + web-mode-element-insert + wgrep-finish-edit + yaml-electric-backspace + yas-expand + )) + +(setq mc/cmds-to-run-once + '( + edebug-step-mode + end-of-buffer + ido-switch-buffer + js2r-extract-var + markdown-exdent-or-delete + mu4e + paredit-semicolon + )) diff --git a/.org-id-locations b/.org-id-locations new file mode 100644 index 0000000..f91e839 --- /dev/null +++ b/.org-id-locations @@ -0,0 +1,2 @@ + +(("~/work/nicolas-petton.fr/blog/index.org" "a6b3e818-81e5-43cd-860b-acb8f41de71b") ("~/work/nicolas-petton.fr/blog/index.org" "54ff63b2-8a81-4e62-864f-0dccf3b0c322") ("~/work/nicolas-petton.fr/blog/index.org" "02e9494b-1ea5-491c-94b2-659caf3607e9") ("~/work/nicolas-petton.fr/blog/x220.org" "faa653cc-b6ae-4f27-a551-bc9392e128c9") ("~/work/nicolas-petton.fr/blog/x220.org" "8b5b077c-383b-47d3-81ed-eca37673a017") ("~/work/nicolas-petton.fr/blog/x220.org" "4a2afa02-3144-419e-9f86-12d936c901f6") ("~/work/nicolas-petton.fr/blog/x220.org" "d9110561-a334-44aa-a910-e1ef4e7cb4b2") ("~/org/gtd.org" "d07e73bd-bc02-45f4-84f2-eab1bc9ef65a") ("~/work/nicolas-petton.fr/blog/interview-mikael.org" "73321a77-b1c8-44f4-95e8-e6931b34a234") ("~/work/nicolas-petton.fr/blog/index.org" "a5a66dba-88d7-4a6d-a477-50db6ca9c163") ("~/work/nicolas-petton.fr/blog/simple-object-model-javascript-2.org" "0da6cc32-c206-4287-8e1c-7ffb6906ea79") ("~/work/nicolas-petton.fr/blog/simple-object-model-javascript-2.org" "c86ce246-ce99-41ba-a417-1add14a9cfb9") ("~/work/nicolas-petton.fr/blog/index.org" "a7b7c968-a5a0-4462-9f09-0ad241d342cc") ("~/work/nicolas-petton.fr/blog/index.org" "e3bdc049-537c-4c29-b22c-e4c0200dbe24") ("~/work/nicolas-petton.fr/blog/interview-seckin.org" "f06f18a0-d730-4c35-9ffe-a0a4e09ec999") ("~/work/nicolas-petton.fr/blog/interview-seckin.org" "41a8d1d2-6a46-449d-9c3b-561fd32eb5e6") ("~/work/nicolas-petton.fr/blog/simple-object-model-javascript.org" "29ad6428-9089-49d0-818a-7d2e948ab208") ("~/work/nicolas-petton.fr/blog/simple-object-model-javascript.org" "15464464-1780-460f-81dd-86af01cd8ee2") ("~/work/nicolas-petton.fr/blog/simple-object-model-javascript.org" "ee97241e-6410-47be-b88d-0810afd96c72") ("~/work/nicolas-petton.fr/blog/simple-object-model-javascript.org" "1eaccdc3-144d-47ed-b03b-7388053f6fcb") ("~/work/nicolas-petton.fr/blog/simple-object-model-javascript.org" "949b30f6-cd30-4e72-9fe7-6bf1887ace3e") ("~/work/nicolas-petton.fr/blog/simple-object-model-javascript.org" "e5aadd8e-46f8-44ef-a051-47381833d7bc") ("~/work/nicolas-petton.fr/blog/index.org" "c759667e-0df7-41f6-8ea0-40051e6a3189") ("~/work/nicolas-petton.fr/blog/index.org" "e053bf59-06a5-440c-a580-7c831e4b626c") ("~/work/nicolas-petton.fr/blog/working-on-the-emacs-logo.org" "9eebef8e-2c4b-4f52-a00d-c67257ffa395") ("~/org/inbox.org" "ac0747a1-3142-4dd0-b687-2a6459609864") ("~/work/nicolas-petton.fr/blog/emacs-meetup-orgmode.org" "94cd18c3-d1f7-40bd-a4d7-d3def496c7ed") ("~/work/nicolas-petton.fr/blog/seq-el.org" "5ee6ec98-e891-4f59-ada4-cd1246600406") ("~/work/nicolas-petton.fr/blog/emacs-meetup.org" "f7897af4-55af-45eb-86e1-2a61ae05b7d8") ("~/work/nicolas-petton.fr/blog/no-more-smalltalk.org" "d945860e-6143-4189-ab05-828bf03e4e66") ("~/work/nicolas-petton.fr/blog/blogging-with-org-mode.org" "a619ae88-2ca8-4e26-aaf6-5c9251d25090") ("~/work/nicolas-petton.fr/blog/amber-new-maintainer.org" "ee7e113e-694a-45b9-ae42-303a75eb9188") ("~/work/nicolas-petton.fr/blog/farewell-rmod.org" "42531a55-be7e-4640-b8ff-e4fae53e9226") ("~/work/nicolas-petton.fr/blog/ntags.org" "5f2d04c3-92b2-425e-b068-e9dbe1c86422") ("~/work/nicolas-petton.fr/blog/ntags.org" "0f049480-2c7e-49ba-ae91-17f0df9e01a1") ("~/work/nicolas-petton.fr/blog/nw-helios.org" "e38f0110-9190-4390-a526-d0a2c58c532f") ("~/work/nicolas-petton.fr/blog/helios-keybindings.org" "06d15661-9f71-45ff-b6a0-7dbd8d1d3494") ("~/work/nicolas-petton.fr/blog/amber-0.12.0-released.org" "5cff231c-e5df-4970-9268-6dda48619b17") ("~/work/nicolas-petton.fr/blog/amber-compiler.org" "f0d4cc95-d0ba-451b-984f-953b67c4c72d") ("~/work/nicolas-petton.fr/blog/amber-compiler.org" "b9289317-95e2-422d-b90c-7b0fcd7d7890") ("~/work/nicolas-petton.fr/blog/amber-compiler.org" "b922a3e9-fa23-4db9-a86b-8df6bf730977") ("~/work/nicolas-petton.fr/blog/interview-esteban.org" "55622ca9-0690-457b-aa71-baa88c6408dd") ("~/work/nicolas-petton.fr/blog/interview-stef.org" "40593d4c-184d-4bae-9839-619273cbc303") ("~/work/nicolas-petton.fr/blog/slides-smalltalks-2013.org" "e5f16b14-b457-4abd-be98-a219ee5d4dc6") ("~/work/nicolas-petton.fr/blog/help-amber-doc.org" "4e26c3f9-09d1-40e7-b4e6-4f9f0501809a") ("~/work/nicolas-petton.fr/blog/amber-poll.org" "f13bfb66-c1b9-40f6-97d3-9bc7ce8f9a7f") ("~/work/nicolas-petton.fr/blog/amber-0.10.0-released.org" "fd363beb-71e0-46ef-a50e-5db69addcef9") ("~/work/nicolas-petton.fr/blog/amber-1.12.4-released.org" "ade7de1f-6218-4b0d-9c18-fa4086ae3676") ("~/work/nicolas-petton.fr/blog/mutli-occur-on-projects.org" "fa463e31-8a69-4f46-a0d6-a6ccbd4f7d2e") ("~/work/nicolas-petton.fr/blog/amber-0.13-released.org" "d5934f8e-7e95-453c-8dad-49142cec83cd") ("~/work/nicolas-petton.fr/contact.org" "fb473262-016b-4cba-b044-f36cdce0ae22") ("~/work/nicolas-petton.fr/contact.org" "3ebca5e4-b9f7-4733-8285-1a78b44fb8c8") ("~/work/nicolas-petton.fr/blog/interview-louise.org" "72bec3c8-56ef-4bf6-abcd-dd42ec1689dd") ("~/work/nicolas-petton.fr/index.org" "494ba429-791d-446f-b5f3-493faeedc443") ("~/work/nicolas-petton.fr/index.org" "22cb2283-6fcf-4e12-ac95-2101750ae0fc") ("~/work/nicolas-petton.fr/index.org" "82f84584-3355-483f-9ced-46a08c9d51c8") ("~/work/nicolas-petton.fr/index.org" "768d24f4-cde6-43d0-b705-d9304193b8df") ("~/work/nicolas-petton.fr/index.org" "2b8e5e18-7633-45c3-b380-6b73444ec721") ("~/work/nicolas-petton.fr/index.org" "72513d93-189d-4caf-a7ba-ec2ef7eac758") ("~/work/nicolas-petton.fr/index.org" "75905bfb-53a1-4830-8146-5036e0befe24") ("~/work/nicolas-petton.fr/index.org" "0510203a-57fa-49e4-86c2-cf3252cd0a88") ("~/work/nicolas-petton.fr/blog/fourth-emacs-meetup.org" "a2090a26-409c-4ee9-b4d4-d13738686265") ("~/work/nicolas-petton.fr/blog/index.org" "051f2fcc-1eee-472f-8206-b53af47761bf") ("~/work/nicolas-petton.fr/blog/index.org" "3732ac30-086c-4931-ae1f-7a89cd884537") ("~/work/nicolas-petton.fr/blog/index.org" "0375fdb9-1a55-4600-b07b-cd1ca12ffd71") ("~/work/nicolas-petton.fr/blog/index.org" "4fc83c7d-985c-4e4a-a43e-8cae53bfb341") ("~/work/nicolas-petton.fr/blog/index.org" "57d2c75a-220f-43cd-97d1-ecd47f9010f8") ("~/work/nicolas-petton.fr/blog/index.org" "6e66ab88-d0a7-4029-b4c0-f089abe9176f") ("~/work/nicolas-petton.fr/blog/index.org" "c3aff00d-2cf6-4b80-9f43-83a81f0a31e8") ("~/work/nicolas-petton.fr/blog/index.org" "16d50343-ab4a-4ffb-b0f4-8974d697aada") ("~/work/nicolas-petton.fr/blog/index.org" "5c2febff-9076-4e5e-b6ec-c70e620a5888") ("~/work/nicolas-petton.fr/blog/index.org" "b4df8ccf-1a3d-402b-962a-2257d537a6ca") ("~/work/nicolas-petton.fr/blog/index.org" "f219a1ef-2321-4f7b-a667-a8268fcaae6e") ("~/work/nicolas-petton.fr/blog/index.org" "5aac903c-be5a-4eb0-9c0c-b79ac3389dca") ("~/work/nicolas-petton.fr/blog/index.org" "111b5fb7-5b1d-43d8-a9bf-0b6c30851ffd") ("~/work/nicolas-petton.fr/blog/index.org" "939fc648-ce24-4ef5-a7c9-166f666affb8") ("~/work/nicolas-petton.fr/blog/index.org" "e02a6769-4ee6-4cbf-a3de-84e8d7011937") ("~/work/nicolas-petton.fr/blog/index.org" "a93c9b46-3131-4d48-b654-43789d312406") ("~/work/nicolas-petton.fr/blog/index.org" "bd2f71c9-13fa-456c-865a-a556ef0ca4b5") ("~/work/nicolas-petton.fr/blog/index.org" "7aba07db-d78b-4924-947e-d01662f9daf2") ("~/work/nicolas-petton.fr/blog/index.org" "6d8c8816-df82-428b-8403-6e2caba9163d") ("~/work/nicolas-petton.fr/blog/index.org" "30b4b5b5-9343-4d3b-b086-e993459cebc1") ("~/work/nicolas-petton.fr/blog/index.org" "cc70c3c9-438a-4664-9d46-d095b9940f9f") ("~/work/nicolas-petton.fr/blog/index.org" "43f68d34-465f-4e66-9dee-2c669105e023") ("~/work/nicolas-petton.fr/blog/index.org" "c4c5915a-432b-44e9-8c4c-880654ded2b7") ("~/work/nicolas-petton.fr/blog/index.org" "f9a27206-d9a0-4ad6-a198-ecb0b4528137") ("~/work/nicolas-petton.fr/blog/index.org" "3c9a92e9-03f0-4e05-98e8-e3f198ddaa58") ("~/work/nicolas-petton.fr/blog/index.org" "c5d7d8f9-8340-44a5-87f6-26af6f733434") ("~/work/nicolas-petton.fr/blog/index.org" "49584989-e6bd-4e5a-955b-9b55e53e120c") ("~/work/nicolas-petton.fr/blog/index.org" "decc9498-e3e0-4df8-8f91-d03b325ebee7") ("~/work/nicolas-petton.fr/blog/index.org" "1a28f197-8a0e-40a6-bd39-0070622263d1") ("~/work/nicolas-petton.fr/blog/index.org" "7de2d676-2885-46ea-b18a-5874797736a7") ("~/work/nicolas-petton.fr/blog/index.org" "ae96728e-bac9-46c6-8eda-a488f5608540") ("~/work/nicolas-petton.fr/blog/index.org" "d01950d3-3899-4a9b-a69d-2ae8ee852ae1") ("~/work/nicolas-petton.fr/blog/index.org" "d60ededf-e0c0-4b3b-88c3-d56e99659738") ("~/work/nicolas-petton.fr/blog/index.org" "f9f8feb9-2b5e-40d0-a02c-131f63fb9c26") ("~/work/nicolas-petton.fr/blog/index.org" "4a19122c-4bbd-4976-b36c-966eae929172") ("~/work/nicolas-petton.fr/blog/index.org" "f09f2523-a58a-42f0-a818-bac295eaeacc") ("~/work/nicolas-petton.fr/blog/index.org" "407ccfed-e9d4-4777-b222-779bee73041f") ("~/work/nicolas-petton.fr/blog/index.org" "5c4b48e6-0d11-422a-9f00-ab669be83eb4") ("~/work/nicolas-petton.fr/blog/index.org" "3e248958-eac2-497e-a231-dbdf4884a0fc") ("~/work/nicolas-petton.fr/blog/index.org" "a4c589fb-f088-451b-b0c0-9518ef508712") ("~/work/nicolas-petton.fr/blog/index.org" "0ae26b95-8970-4c4d-9a28-c3d3a0a4c96e") ("~/work/nicolas-petton.fr/blog/index.org" "e9230d29-e60d-4e46-b290-fc5fcc4c31d6") ("~/org/gtd.org" "d8118b05eb8-4f76-80a1-d4c4899d595e") ("~/work/nicolas-petton.fr/blog/stream.org" "85192591-76e0-4af4-9af1-9022c567cb90") ("~/work/nicolas-petton.fr/blog/working-on-the-emacs-website.org" "afb401b6-35f5-499f-851f-992f1d93d551") ("~/work/nicolas-petton.fr/blog/index.org" "8e1d6f76-aa68-4c89-b020-85d68163a122") ("~/org/projects/prepare-the-emacs-release.org" "41af3c44-9503-4fb6-bc20-3fd265466fa0") ("~/org/inbox.org" "903f7624-45c9-4d3a-a9b2-96860f774e10")) diff --git a/.projectile b/.projectile new file mode 100644 index 0000000..1fd0f8c --- /dev/null +++ b/.projectile @@ -0,0 +1,2 @@ +-/elpa +-/.cask \ No newline at end of file diff --git a/README b/README new file mode 100644 index 0000000..abfe257 --- /dev/null +++ b/README @@ -0,0 +1 @@ +My Emacs config \ No newline at end of file diff --git a/abbrev_defs b/abbrev_defs new file mode 100644 index 0000000..5a02c7e --- /dev/null +++ b/abbrev_defs @@ -0,0 +1,418 @@ +;;-*-coding: utf-8;-*- +(define-abbrev-table 'Buffer-menu-mode-abbrev-table '()) + +(define-abbrev-table 'Custom-mode-abbrev-table '()) + +(define-abbrev-table 'Info-edit-mode-abbrev-table '()) + +(define-abbrev-table 'Man-mode-abbrev-table '()) + +(define-abbrev-table 'ag-mode-abbrev-table '()) + +(define-abbrev-table 'apropos-mode-abbrev-table '()) + +(define-abbrev-table 'awk-mode-abbrev-table + '( + )) + +(define-abbrev-table 'bibtex-mode-abbrev-table '()) + +(define-abbrev-table 'bookmark-bmenu-mode-abbrev-table '()) + +(define-abbrev-table 'bookmark-edit-annotation-mode-abbrev-table '()) + +(define-abbrev-table 'browse-kill-ring-edit-mode-abbrev-table '()) + +(define-abbrev-table 'browse-kill-ring-mode-abbrev-table '()) + +(define-abbrev-table 'c++-mode-abbrev-table + '( + )) + +(define-abbrev-table 'c-mode-abbrev-table + '( + )) + +(define-abbrev-table 'calc-trail-mode-abbrev-table '()) + +(define-abbrev-table 'calendar-mode-abbrev-table '()) + +(define-abbrev-table 'change-log-mode-abbrev-table '()) + +(define-abbrev-table 'cider-browse-ns-mode-abbrev-table '()) + +(define-abbrev-table 'cider-connections-buffer-mode-abbrev-table '()) + +(define-abbrev-table 'cider-docview-mode-abbrev-table '()) + +(define-abbrev-table 'cider-inspector-mode-abbrev-table '()) + +(define-abbrev-table 'cider-repl-mode-abbrev-table '()) + +(define-abbrev-table 'cider-stacktrace-mode-abbrev-table '()) + +(define-abbrev-table 'cider-test-report-mode-abbrev-table '()) + +(define-abbrev-table 'cljr--change-signature-mode-abbrev-table '()) + +(define-abbrev-table 'clojure-mode-abbrev-table '()) + +(define-abbrev-table 'clojurec-mode-abbrev-table '()) + +(define-abbrev-table 'clojurescript-mode-abbrev-table '()) + +(define-abbrev-table 'clojurex-mode-abbrev-table '()) + +(define-abbrev-table 'comint-mode-abbrev-table '()) + +(define-abbrev-table 'completion-list-mode-abbrev-table '()) + +(define-abbrev-table 'conf-colon-mode-abbrev-table '()) + +(define-abbrev-table 'conf-javaprop-mode-abbrev-table '()) + +(define-abbrev-table 'conf-ppd-mode-abbrev-table '()) + +(define-abbrev-table 'conf-space-mode-abbrev-table '()) + +(define-abbrev-table 'conf-unix-mode-abbrev-table '()) + +(define-abbrev-table 'conf-windows-mode-abbrev-table '()) + +(define-abbrev-table 'conf-xdefaults-mode-abbrev-table '()) + +(define-abbrev-table 'css-mode-abbrev-table '()) + +(define-abbrev-table 'dcl-mode-abbrev-table '()) + +(define-abbrev-table 'debugger-mode-abbrev-table '()) + +(define-abbrev-table 'diary-fancy-display-mode-abbrev-table '()) + +(define-abbrev-table 'diary-mode-abbrev-table '()) + +(define-abbrev-table 'diff-mode-abbrev-table '()) + +(define-abbrev-table 'dig-mode-abbrev-table '()) + +(define-abbrev-table 'edebug-eval-mode-abbrev-table '()) + +(define-abbrev-table 'edit-abbrevs-mode-abbrev-table '()) + +(define-abbrev-table 'elisp-byte-code-mode-abbrev-table '()) + +(define-abbrev-table 'emacs-lisp-mode-abbrev-table '()) + +(define-abbrev-table 'epa-info-mode-abbrev-table '()) + +(define-abbrev-table 'epa-key-list-mode-abbrev-table '()) + +(define-abbrev-table 'epa-key-mode-abbrev-table '()) + +(define-abbrev-table 'ert-results-mode-abbrev-table '()) + +(define-abbrev-table 'ert-simple-view-mode-abbrev-table '()) + +(define-abbrev-table 'eshell-mode-abbrev-table '()) + +(define-abbrev-table 'flycheck-error-list-mode-abbrev-table '()) + +(define-abbrev-table 'fundamental-mode-abbrev-table '()) + +(define-abbrev-table 'gdb-breakpoints-mode-abbrev-table '()) + +(define-abbrev-table 'gdb-disassembly-mode-abbrev-table '()) + +(define-abbrev-table 'gdb-frames-mode-abbrev-table '()) + +(define-abbrev-table 'gdb-locals-mode-abbrev-table '()) + +(define-abbrev-table 'gdb-memory-mode-abbrev-table '()) + +(define-abbrev-table 'gdb-registers-mode-abbrev-table '()) + +(define-abbrev-table 'gdb-script-mode-abbrev-table '()) + +(define-abbrev-table 'gdb-threads-mode-abbrev-table '()) + +(define-abbrev-table 'gfm-mode-abbrev-table '()) + +(define-abbrev-table 'ggtags-global-mode-abbrev-table '()) + +(define-abbrev-table 'ggtags-view-search-history-mode-abbrev-table '()) + +(define-abbrev-table 'git-rebase-mode-abbrev-table '()) + +(define-abbrev-table 'global-abbrev-table + '( + ("accomodate" "accommodate" nil 0) + ("apres" "après" nil 2) + ("bebes" "bébés" nil 0) + ("beleive" "believe" nil 0) + ("bientot" "bientôt" nil 3) + ("completement" "complètement" nil 1) + ("componenp" "component" nil 0) + ("custon" "custom" nil 0) + ("etre" "être" nil 0) + ("facon" "façon" nil 0) + ("genera" "gênera" nil 0) + ("helol" "hello" nil 0) + ("interesse" "intéresse" nil 0) + ("interessé" "intéressé" nil 0) + ("intéréssés" "intéressés" nil 0) + ("nioc" "nco" nil 0) + ("oeil" "œil" nil 0) + ("recu" "reçu" nil 0) + ("reparer" "réparer" nil 0) + ("tres" "très" nil 0) + ("widjet" "widget" nil 0) + )) + +(define-abbrev-table 'gnus-article-edit-mode-abbrev-table '()) + +(define-abbrev-table 'gnus-article-mode-abbrev-table '()) + +(define-abbrev-table 'gnus-group-mode-abbrev-table '()) + +(define-abbrev-table 'gnus-sticky-article-mode-abbrev-table '()) + +(define-abbrev-table 'google-maps-static-mode-abbrev-table '()) + +(define-abbrev-table 'grep-mode-abbrev-table '()) + +(define-abbrev-table 'gud-mode-abbrev-table '()) + +(define-abbrev-table 'helm-ag-mode-abbrev-table '()) + +(define-abbrev-table 'helm-grep-mode-abbrev-table '()) + +(define-abbrev-table 'helm-major-mode-abbrev-table '()) + +(define-abbrev-table 'helm-moccur-mode-abbrev-table '()) + +(define-abbrev-table 'help-mode-abbrev-table '()) + +(define-abbrev-table 'html-mode-abbrev-table '()) + +(define-abbrev-table 'ibuffer-mode-abbrev-table '()) + +(define-abbrev-table 'idl-mode-abbrev-table '()) + +(define-abbrev-table 'image-dired-display-image-mode-abbrev-table '()) + +(define-abbrev-table 'image-dired-thumbnail-mode-abbrev-table '()) + +(define-abbrev-table 'internal-ange-ftp-mode-abbrev-table '()) + +(define-abbrev-table 'ivy-occur-grep-mode-abbrev-table '()) + +(define-abbrev-table 'ivy-occur-mode-abbrev-table '()) + +(define-abbrev-table 'jade-debugger-frames-mode-abbrev-table '()) + +(define-abbrev-table 'jade-debugger-locals-mode-abbrev-table '()) + +(define-abbrev-table 'jade-inspector-mode-abbrev-table '()) + +(define-abbrev-table 'jade-repl-mode-abbrev-table '()) + +(define-abbrev-table 'java-mode-abbrev-table + '( + )) + +(define-abbrev-table 'js-jsx-mode-abbrev-table '()) + +(define-abbrev-table 'js-mode-abbrev-table '()) + +(define-abbrev-table 'js2-jsx-mode-abbrev-table '()) + +(define-abbrev-table 'js2-mode-abbrev-table '()) + +(define-abbrev-table 'ledger-check-mode-abbrev-table '()) + +(define-abbrev-table 'ledger-mode-abbrev-table '()) + +(define-abbrev-table 'ledger-reconcile-mode-abbrev-table '()) + +(define-abbrev-table 'ledger-report-mode-abbrev-table '()) + +(define-abbrev-table 'less-css-mode-abbrev-table '()) + +(define-abbrev-table 'lisp-mode-abbrev-table '()) + +(define-abbrev-table 'log-edit-mode-abbrev-table '()) + +(define-abbrev-table 'log4e-mode-abbrev-table '()) + +(define-abbrev-table 'magit-cherry-mode-abbrev-table '()) + +(define-abbrev-table 'magit-diff-mode-abbrev-table '()) + +(define-abbrev-table 'magit-log-mode-abbrev-table '()) + +(define-abbrev-table 'magit-log-select-mode-abbrev-table '()) + +(define-abbrev-table 'magit-merge-preview-mode-abbrev-table '()) + +(define-abbrev-table 'magit-mode-abbrev-table '()) + +(define-abbrev-table 'magit-popup-mode-abbrev-table '()) + +(define-abbrev-table 'magit-process-mode-abbrev-table '()) + +(define-abbrev-table 'magit-reflog-mode-abbrev-table '()) + +(define-abbrev-table 'magit-refs-mode-abbrev-table '()) + +(define-abbrev-table 'magit-repolist-mode-abbrev-table '()) + +(define-abbrev-table 'magit-revision-mode-abbrev-table '()) + +(define-abbrev-table 'magit-stash-mode-abbrev-table '()) + +(define-abbrev-table 'magit-stashes-mode-abbrev-table '()) + +(define-abbrev-table 'magit-status-mode-abbrev-table '()) + +(define-abbrev-table 'makefile-automake-mode-abbrev-table '()) + +(define-abbrev-table 'makefile-bsdmake-mode-abbrev-table '()) + +(define-abbrev-table 'makefile-gmake-mode-abbrev-table '()) + +(define-abbrev-table 'makefile-imake-mode-abbrev-table '()) + +(define-abbrev-table 'makefile-makepp-mode-abbrev-table '()) + +(define-abbrev-table 'makefile-mode-abbrev-table '()) + +(define-abbrev-table 'markdown-mode-abbrev-table '()) + +(define-abbrev-table 'message-mode-abbrev-table '()) + +(define-abbrev-table 'messages-buffer-mode-abbrev-table '()) + +(define-abbrev-table 'mu4e-about-mode-abbrev-table '()) + +(define-abbrev-table 'mu4e~update-mail-mode-abbrev-table '()) + +(define-abbrev-table 'nix-mode-abbrev-table '()) + +(define-abbrev-table 'notmuch-hello-mode-abbrev-table '()) + +(define-abbrev-table 'notmuch-message-mode-abbrev-table '()) + +(define-abbrev-table 'notmuch-search-mode-abbrev-table '()) + +(define-abbrev-table 'notmuch-show-mode-abbrev-table '()) + +(define-abbrev-table 'notmuch-tree-mode-abbrev-table '()) + +(define-abbrev-table 'nrepl-messages-mode-abbrev-table '()) + +(define-abbrev-table 'nxml-mode-abbrev-table '()) + +(define-abbrev-table 'objc-mode-abbrev-table + '( + )) + +(define-abbrev-table 'occur-edit-mode-abbrev-table '()) + +(define-abbrev-table 'occur-mode-abbrev-table '()) + +(define-abbrev-table 'org-export-stack-mode-abbrev-table '()) + +(define-abbrev-table 'org-mode-abbrev-table '()) + +(define-abbrev-table 'outline-mode-abbrev-table '()) + +(define-abbrev-table 'package-menu-mode-abbrev-table '()) + +(define-abbrev-table 'pass-mode-abbrev-table '()) + +(define-abbrev-table 'pass-view-mode-abbrev-table '()) + +(define-abbrev-table 'pike-mode-abbrev-table + '( + )) + +(define-abbrev-table 'process-menu-mode-abbrev-table '()) + +(define-abbrev-table 'prodigy-mode-abbrev-table '()) + +(define-abbrev-table 'prodigy-view-mode-abbrev-table '()) + +(define-abbrev-table 'prog-mode-abbrev-table '()) + +(define-abbrev-table 'quickurl-list-mode-abbrev-table '()) + +(define-abbrev-table 'reb-lisp-mode-abbrev-table '()) + +(define-abbrev-table 'reb-mode-abbrev-table '()) + +(define-abbrev-table 'restclient-mode-abbrev-table '()) + +(define-abbrev-table 'ruby-mode-abbrev-table '()) + +(define-abbrev-table 'scss-mode-abbrev-table '()) + +(define-abbrev-table 'select-tags-table-mode-abbrev-table '()) + +(define-abbrev-table 'sgml-mode-abbrev-table '()) + +(define-abbrev-table 'sh-mode-abbrev-table '()) + +(define-abbrev-table 'shell-mode-abbrev-table '()) + +(define-abbrev-table 'sldb-mode-abbrev-table '()) + +(define-abbrev-table 'slime-compiler-notes-mode-abbrev-table '()) + +(define-abbrev-table 'slime-connection-list-mode-abbrev-table '()) + +(define-abbrev-table 'slime-fuzzy-completions-mode-abbrev-table '()) + +(define-abbrev-table 'slime-inspector-mode-abbrev-table '()) + +(define-abbrev-table 'slime-thread-control-mode-abbrev-table '()) + +(define-abbrev-table 'slime-trace-dialog--detail-mode-abbrev-table '()) + +(define-abbrev-table 'slime-trace-dialog-mode-abbrev-table '()) + +(define-abbrev-table 'slime-xref-mode-abbrev-table '()) + +(define-abbrev-table 'smime-mode-abbrev-table '()) + +(define-abbrev-table 'snapshot-timeline-mode-abbrev-table '()) + +(define-abbrev-table 'snippet-mode-abbrev-table '()) + +(define-abbrev-table 'special-mode-abbrev-table '()) + +(define-abbrev-table 'speedbar-mode-abbrev-table '()) + +(define-abbrev-table 'tabulated-list-mode-abbrev-table '()) + +(define-abbrev-table 'term-mode-abbrev-table '()) + +(define-abbrev-table 'text-mode-abbrev-table '()) + +(define-abbrev-table 'url-cookie-mode-abbrev-table '()) + +(define-abbrev-table 'vc-annotate-mode-abbrev-table '()) + +(define-abbrev-table 'vc-dir-mode-abbrev-table '()) + +(define-abbrev-table 'vc-git-log-edit-mode-abbrev-table '()) + +(define-abbrev-table 'vc-git-log-view-mode-abbrev-table '()) + +(define-abbrev-table 'vc-git-region-history-mode-abbrev-table '()) + +(define-abbrev-table 'vc-svn-log-view-mode-abbrev-table '()) + +(define-abbrev-table 'web-mode-abbrev-table '()) + +(define-abbrev-table 'xref--xref-buffer-mode-abbrev-table '()) + diff --git a/bookmarks b/bookmarks new file mode 100644 index 0000000..1b49256 --- /dev/null +++ b/bookmarks @@ -0,0 +1,353 @@ +;;;; Emacs Bookmark Format Version 1 ;;;; +;;; This format is meant to be slightly human-readable; +;;; nevertheless, you probably don't want to edit it. +;;; -*- End Of Bookmark File Format Version Stamp -*- +((#("emacs.cafe" 0 10 + (face ivy-virtual)) + (filename . "~/work/emacs.cafe/") + (front-context-string . "_config.yml\n dr") + (rear-context-string . "3K Apr 21 22:26 ") + (position . 274)) +("contacts.org" + (filename . "~/org/contacts.org") + (front-context-string . "#+STARTUP: showe") + (rear-context-string) + (position . 1)) +(#("stumpwm.d" 0 9 + (face ivy-virtual)) + (filename . "~/config/stumpwm.d/") + (front-context-string . " /home/nico/con") + (rear-context-string) + (position . 1)) +(#("ynh" 0 3 + (face ivy-virtual)) + (filename . "~/work/ynh/") + (front-context-string . "drone_ynh\n drwx") + (rear-context-string . "0K Nov 6 16:54 ") + (position . 213)) +(#("zerodark" 0 8 + (face ivy-virtual)) + (filename . "~/work/elisp/zerodark/") + (front-context-string . "LICENSE\n -rw---") + (rear-context-string . "4K Jun 29 11:49 ") + (position . 226)) +(#("indium" 0 6 + (face ivy-virtual)) + (filename . "~/work/elisp/indium/") + (front-context-string . "jade.el\n -rw-r-") + (rear-context-string . "8K May 26 12:00 ") + (position . 283)) +(#("lisp" 0 4 + (face ivy-virtual)) + (filename . "~/work/lisp/") + (front-context-string . "land-of-lisp\n d") + (rear-context-string . "0K Jan 6 2015 ") + (position . 215)) +(#("config" 0 6 + (face ivy-virtual)) + (filename . "~/config/") + (front-context-string) + (rear-context-string . "0K Apr 14 16:46 ") + (position . 489)) +(#("nixpkgs" 0 7 + (face ivy-virtual)) + (filename . "~/nixpkgs/") + (front-context-string . "COPYING\n -rw-r-") + (rear-context-string . "7K Apr 9 18:15 ") + (position . 213)) +(#("win8" 0 4 + (face ivy-virtual)) + (filename . "/smb:nicolas@ftgp-win8:/Users/Nicolas/") + (front-context-string . "Desktop\n dr-xr-") + (rear-context-string . " 0 Feb 12 13:32 ") + (position . 349)) +(#("labo109" 0 7 + (face ivy-virtual)) + (filename . "~/work/ruby/labo109/") + (front-context-string . "app\n drwxr-xr-x") + (rear-context-string . "0K Jul 14 17:22 ") + (position . 222)) +(#("objectjs" 0 8 + (face ivy-virtual)) + (filename . "~/work/javascript/objectjs/") + (front-context-string) + (rear-context-string . "0K Mar 1 13:38 ") + (position . 708)) +(#("projects" 0 8 + (face ivy-virtual)) + (filename . "~/org/projects/") + (front-context-string . "client-side-impr") + (rear-context-string . "18 Feb 7 00:06 ") + (position . 293)) +(#("couch-vm" 0 8 + (face ivy-virtual)) + (filename . "/scp:nico@192.168.124.179:/home/nico/") + (front-context-string . "Desktop\n drwxr-") + (rear-context-string . "0K Jan 23 22:48 ") + (position . 193)) +(#("magellan" 0 8 + (face ivy-virtual)) + (filename . "~/work/javascript/magellan/") + (front-context-string . "css\n -rw-rw-r--") + (rear-context-string . "0K Feb 22 06:35 ") + (position . 230)) +(#("javascript" 0 10 + (face ivy-virtual)) + (filename . "~/work/javascript/") + (front-context-string . "aa\n drwx------.") + (rear-context-string . "0K Jul 7 2015 ") + (position . 221)) +(#("build" 0 5 + (face ivy-virtual)) + (filename . "~/build/") + (front-context-string . "ios-webkit-debug") + (rear-context-string . "0K Jan 6 2015 ") + (position . 567)) +(#("conkerorrc" 0 10 + (face ivy-virtual)) + (filename . "~/.conkerorrc/") + (front-context-string . "index.js\n drwxr") + (rear-context-string . "13 Jan 16 15:19 ") + (position . 214)) +(#("Pictures" 0 8 + (face ivy-virtual)) + (filename . "~/Pictures/") + (front-context-string . "2015\n -rw-rw-r-") + (rear-context-string . "0K Dec 21 15:45 ") + (position . 365)) +(#("media" 0 5 + (face ivy-virtual)) + (filename . "/run/media/nico/") + (front-context-string) + (rear-context-string . "0K Jan 1 1970 ") + (position . 206)) +("ledger" + (filename . "~/org/reference/ledger/ledger.dat") + (front-context-string . ";; Local Variabl") + (rear-context-string . "edish_checking\n\n") + (position . 27198)) +(#("emacs-website" 0 13 + (face ivy-virtual)) + (filename . "~/work/emacs-website/") + (front-context-string . "design\n drwxrwx") + (rear-context-string . "0K Dec 3 01:22 ") + (position . 223)) +(#("stream" 0 6 + (face ivy-virtual)) + (filename . "~/work/elisp/stream/") + (front-context-string . "Cask\n -rw------") + (rear-context-string . "06 Oct 14 13:06 ") + (position . 222)) +(#("elpa" 0 4 + (face ivy-virtual)) + (filename . "~/work/elisp/elpa/") + (front-context-string . "admin\n -rw-----") + (rear-context-string . "0K Oct 22 18:21 ") + (position . 224)) +(#("fpod-teamcity" 0 13 + (face ivy-virtual)) + (filename . "/scp:fpod-teamcity:/home/ftgp/") + (front-context-string . "tmp\n drwxrwxrwx") + (rear-context-string . "0K Jun 17 10:03 ") + (position . 186)) +("org-capture-last-stored-marker" + (filename . "~/org/gtd.org") + (front-context-string . "** WAITING Nouve") + (rear-context-string . "7-28 Thu 20:00>\n") + (position . 26694)) +(#("sudo petton.fr" 0 14 + (face ivy-virtual)) + (filename . + #("/sudo:root@petton.fr:/home/nico/" 6 10 + (tramp-default t))) + (front-context-string) + (rear-context-string . "0K Jun 14 07:18 ") + (position . 347)) +(#("emacs" 0 5 + (face ivy-virtual)) + (filename . "~/work/emacs/") + (front-context-string . "aclocal.m4\n drw") + (rear-context-string . "4K May 16 12:50 ") + (position . 217)) +(#("infrastructure" 0 14 + (face ivy-virtual)) + (filename . "~/work/ftgp/infrastructure/") + (front-context-string . "azure-office-inv") + (rear-context-string . "73 May 16 10:03 ") + (position . 402)) +(#("Downloads" 0 9 + (face ivy-virtual)) + (filename . "~/Downloads/") + (front-context-string . " /home/nico/Dow") + (rear-context-string) + (position . 1)) +(#("reference" 0 9 + (face ivy-virtual)) + (filename . "~/org/reference/") + (front-context-string) + (rear-context-string . "0K Dec 13 14:30 ") + (position . 219)) +(#("petton.fr" 0 9 + (face ivy-virtual)) + (filename . "/scp:petton.fr:/") + (front-context-string . "etc\n drwxr-xr-x") + (rear-context-string . "0K Oct 19 09:56 ") + (position . 321)) +(#("raspberry" 0 9 + (face ivy-virtual)) + (filename . "/scp:pi@raspberry.local:/home/pi/") + (front-context-string . " drwxr-xr-x 2 ") + (rear-context-string . "Jan 1 1970 ..\n") + (position . 140) + (annotation . "")) +(#("backitup" 0 8 + (face ivy-virtual)) + (filename . "~/work/elisp/backitup/") + (front-context-string . "todo.org\n -rw-r") + (rear-context-string . "5K Sep 7 15:31 ") + (position . 876)) +(#("js2-refactor.el" 0 15 + (face ivy-virtual)) + (filename . "~/work/elisp/js2-refactor.el/") + (front-context-string . "Cask\n drwxr-xr-") + (rear-context-string . "23 Aug 28 09:31 ") + (position . 233)) +(#("clojure" 0 7 + (face ivy-virtual)) + (filename . "~/work/clojure/") + (front-context-string) + (rear-context-string . "0K Jun 20 20:10 ") + (position . 218)) +(#("yomaco" 0 6 + (face ivy-virtual)) + (filename . "~/work/ftgp/yomaco/") + (front-context-string . "apps\n -rw-rw-r-") + (rear-context-string . "0K May 28 15:45 ") + (position . 622)) +(#("monitor" 0 7 + (face ivy-virtual)) + (filename . "~/work/ftgp/monitor/monitor/Monitor.Web.Ui/Client/") + (front-context-string . "- 1 nico nico ") + (rear-context-string . "ules\n -rw-r--r-") + (position . 780)) +(#("emacs.d" 0 7 + (face ivy-virtual)) + (filename . "~/config/emacs.d/") + (front-context-string . "ac-comphist.dat\n") + (rear-context-string . "3K Apr 22 21:26 ") + (position . 217)) +(#("ebooks" 0 6 + (face ivy-virtual)) + (filename . "~/ebooks/") + (front-context-string . ", David\n drwxr-") + (rear-context-string . "p 2 2013 Allen") + (position . 331)) +(#("emacs-backup-files" 0 18 + (face ivy-virtual)) + (filename . "~/.tmp/") + (front-context-string . "..\n -rw-r--r-- ") + (rear-context-string . "4K Mar 23 18:19 ") + (position . 162)) +(#("elisp" 0 5 + (face ivy-virtual)) + (filename . "~/work/elisp/") + (front-context-string . "discover-js2-ref") + (rear-context-string . "0K Feb 4 13:02 ") + (position . 212)) +(#("priv" 0 4 + (face ivy-virtual)) + (filename . "~/.priv/") + (front-context-string . "elisp\n -rw-r--r") + (rear-context-string . "0K Jan 21 14:35 ") + (position . 210)) +(#("nicolas-petton.fr" 0 17 + (face ivy-virtual)) + (filename . "~/work/nicolas-petton.fr/") + (front-context-string . "blog\n -rw-r--r-") + (rear-context-string . "0K Oct 16 17:47 ") + (position . 277)) +(#("public" 0 6 + (face ivy-virtual)) + (filename . "~/Public/") + (front-context-string . "client\n drwxr-x") + (rear-context-string . "0K Sep 2 21:12 ") + (position . 210)) +(#("snippets" 0 8 + (face ivy-virtual)) + (filename . "~/.emacs.d/snippets/") + (front-context-string . "css-mode\n drwxr") + (rear-context-string . "6B Jul 16 02:20 ") + (position . 235)) +(#("widgetjs" 0 8 + (face ivy-virtual)) + (filename . "~/work/ftgp/widget-js/") + (front-context-string . "Gruntfile.js\n -") + (rear-context-string . "0K Jun 12 15:34 ") + (position . 235)) +("keychain" + (filename . "~/.priv/keychain.org.gpg") + (front-context-string . "* Websites\n|----") + (rear-context-string) + (position . 1)) +(#("Documents" 0 9 + (face ivy-virtual)) + (filename . "~/Documents/") + (front-context-string . "createyourprogla") + (rear-context-string . "0K Dec 12 17:39 ") + (position . 210)) +(#("Desktop" 0 7 + (face ivy-virtual)) + (filename . "~/Desktop/") + (front-context-string . "barth-weinberger") + (rear-context-string . "3K Oct 26 17:01 ") + (position . 209)) +("org-refile-last-stored" + (filename . "~/org/gtd.org") + (front-context-string . "** DONE deco de ") + (rear-context-string . "2016-12-07 Wed>\n") + (position . 57486)) +(#("org" 0 3 + (face ivy-virtual)) + (filename . "~/org/") + (front-context-string . "amber.org\n -rw-") + (rear-context-string . "15 Dec 7 14:02 ") + (position . 205)) +(#("ftgp" 0 4 + (face ivy-virtual)) + (filename . "~/work/ftgp/") + (front-context-string . "monitor\n drwxr-") + (rear-context-string . "0K Apr 28 17:15 ") + (position . 375)) +("org-capture-last-stored" + (filename . "~/org/inbox.org") + (front-context-string . "** TODO use epkg") + (rear-context-string . "our demain soir\n") + (position . 179)) +(#("work" 0 4 + (face ivy-virtual)) + (filename . "~/work/") + (front-context-string . "Appify-UI\n drwx") + (rear-context-string . "0K Apr 19 17:04 ") + (position . 207)) +(#("FTP alpha.GNU.org" 0 17 + (face ivy-virtual)) + (filename . + #("/ftp:anonymous@alpha.gnu.org:/" 0 30 + (face ivy-virtual))) + (front-context-string . "gnu\n lrwxrwxrwx") + (rear-context-string . "96 Jan 29 09:55 ") + (position . 453)) +(#("FTP GNU.org" 0 11 + (face ivy-virtual)) + (filename . + #("/ftp:anonymous@ftp.gnu.org:/" 0 28 + (face ivy-virtual))) + (front-context-string . "gnu+linux-distro") + (rear-context-string . "96 Mar 10 2011 ") + (position . 732)) +("org-capture-last-stored-marker<2><2>" + (filename . "~/org/home.org") + (front-context-string . "*** TODO amener ") + (rear-context-string . "2-26 Thu 10:25]\n") + (position . 1203)) +) \ No newline at end of file diff --git a/custom.el b/custom.el new file mode 100644 index 0000000..e22ada9 --- /dev/null +++ b/custom.el @@ -0,0 +1,477 @@ +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(ag-group-matches nil) + '(alert-default-style (quote notifications)) + '(amd-rename-function (quote ido-write-file)) + '(amd-use-relative-file-name t) + '(ansi-color-names-vector + ["#282c34" "#ff6c6b" "#98be65" "#da8548" "#61afef" "#c678dd" "#1f5582" "#abb2bf"]) + '(battery-mode-line-limit 99) + '(buffer-watcher-commands + (quote + (("yomaco less" less-css-mode "/home/nico/work/ftgp/yomaco" "lessc --line-numbers=comments themes/foretagsplatsen/less/foretagsplatsen.less > css/foretagsplatsen.css && blessc css/foretagsplatsen.css -f") + ("monitor less" less-css-mode "/home/nico/work/ftgp/monitor/monitor/Monitor.Web.Ui/Client" "gulp css") + ("teamwall less" less-css-mode "/home/nico/work/clojure/teamwall/" "lessc --line-numbers=comments resources/less/page.less > resources/public/css/page.css") + ("researchr less" less-css-mode "/home/nico/work/aurelia/researchr/" "lessc researchr.less --line-numbers=comments > ../css/researchr.css ")))) + '(company-backends + (quote + (company-tern company-elisp company-nxml company-css company-semantic company-clang company-cmake company-capf + (company-dabbrev-code company-keywords) + company-files company-dabbrev company-slime))) + '(company-tooltip-align-annotations t) + '(compilation-message-face (quote default)) + '(css-indent-offset 2) + '(cua-global-mark-cursor-color "#2aa198") + '(cua-normal-cursor-color "#657b83") + '(cua-overwrite-cursor-color "#b58900") + '(cua-read-only-cursor-color "#859900") + '(custom-safe-themes + (quote + ("7c8478aeefb397014997d637632ef4a461b6d3ecf97d7f21556a32dc3ca01c8c" "6254372d3ffe543979f21c4a4179cd819b808e5dd0f1787e2a2a647f5759c1d1" "f5ad3af69f2b6b7c547208b8708d4fa7928b5697ca0845633d1d67c2d145952a" "e12ba1e45e55c1bb4c2727d1d861e94b0e5e93a38524c9e4505ca629269738a4" "3c0b16189528b732fd8c2df750136a1e7c91e39ca3436ce8a560884889981c7d" "dc49e93049497505fa0e598bfdbbb881925aab39c18959276914ce3cc5393af5" "2b3413d25eb98d145a89a07d232392c1843c4b06c0b2dd88edc92d3b17b8c54b" "a0bfc339f674e25c4e6d3de5bcbb69defcea9a317c3e078b19cbd449fa5dd643" "93fdf264bc14b42d0d1d25dacf932f09850e812395400d76d9c67ba18541ce9b" "3f71a51aeaf05fbed9417f775526365a082be0c73cd767893d4ea9248b9c727e" "60e86ddf53bd783630088484ad52ad7b54415e6cd18cb70b3d7d664d107620e6" "2397b7742a06b43b66fa18cca798395c58c54032bd745ab53d599e5b05e36e90" "69f36661fcc25ea1fb8118b713b0f455c2055f550394c55e69dacffafd0351b9" "d5ea615e629835de072d28276d3e1f90c6597a46a34d911c6ca98fea185b17b2" "b264c5ddaf22435b869c10297e8e61bc8eed8d33155291fb9a99496bfed1e46d" "c119521a119d4d074eb2a6fc108c98d9ba8c0c92a654a4faa77984fcee1d9ef4" "2e1b5d2812f8326806583e1070e8cad4b6b80c07ae711ed674b7ba8c74b1c822" "26362c08d84eea3d226e47c1388e7fcaf10e63533c2f81d90cc71a05e901a213" "a5a765a725005ed41ded65a2d6c1a351f2739b76ee79ab1b50fc9946ce2fd0e3" "a83c6f73ba4f936b6d35e282eaa48d44df2e8c5815ca8129d4fd8feb56efb54c" "df3793b492577af397ef629fa6e2484655d6a459da03f82dd6eab5451dbe50da" "65779eead611addecde741618affa85ac8c83d0b45012445e22e18b44767d7bd" "118fd6893e943d079734394bbfbf4f535424c3ecd9e65f7145e2cdb354df1708" "1160f5fc215738551fce39a67b2bcf312ed07ef3568d15d53c87baa4fd1f4d4e" "b0c2d0ff00a6f682e9c2d2b1bed4b7308610fd5fb62cfc5572958667baf8e460" "0e219d63550634bc5b0c214aced55eb9528640377daf486e13fb18a32bf39856" "b34636117b62837b3c0c149260dfebe12c5dad3d1177a758bb41c4b15259ed7e" "26488f9304ea29009b19a3b0a2660932ef748d098cac25a9a4167561c598a86f" "2f15c9d42353f994f694aa25da3a93b8f0d4a99793b687eebdd30e6141b4a818" "a9358dbfe6eb3cc8fc74e92766f949ba5abcc3dea52b38a657fdf21d6b126190" "7c33d91f9896614a9c28e96def4cbd818f0aa7f151d1fb5d205862e86f2a3939" "4b7abf849c4417409eeee5ee008722a7b746e4c564cda1ab6f0aa1ba3da024bf" "4227b41be0c86e46fa037573ed4699fc59637aec01dc23fae89d7d61012417dd" "b93ce589c81df2a0cf7e07d2b84d298105ce0ea189166239915530113d9c07aa" "c93fabc360a4b2adb84cc7ab70a717a990777452ab0328b23812c779ff274154" "34f730eb27cb065a4f1f6e1a33623e3ac0b32604849594fb4865f36322123c0c" "e0ea593de1fb46b2816bc308f964eea9cfa71d16045f383207a7b068fb1c2d5e" "b5106c46bc4e958eff4965a759a72bef9ba59d559f07754a966783b09e80e91b" "052864c65d5fee0f0097ee8acd55d86cf666c214cca9a6f71522499b731ef7b4" "fa2b58bb98b62c3b8cf3b6f02f058ef7827a8e497125de0254f56e373abee088" "42f2726b08c278a3e2aa80e9ffb3178586b954b6c476f6cb5c0e817b048b55e6" "bffa9739ce0752a37d9b1eee78fc00ba159748f50dc328af4be661484848e476" "8855d6dbd8b4ea5d87146dc77ba1b8b7f06142ee8107429f0520c38777d9b39e" "3737a09fbb3de147a5fbe08dfd3cd47e1c8b16282c805e4cf8ad04077c105ad1" "22a8040977c0b761c71e5f7c68747285eb856f61ac9f2fc8a0b3619e9bcce904" "2ef75a0b64c58767376c9e2c5f07027add146720e6fab6b196cb6a1c68ef3c3f" "fec37b42eef6bacbe5c89d243fd7ed2216b2c81ffcf220ea687879a7fae2bd16" "d06640625bb1d92f29bb226863715fe5609264db807a1c465f55a368f5f97541" "7e83d0aacca4c0e4e9441f920a66ee4de73decc1bb9dd7fcc2c1857948e604c8" "ad86686d808c718244a9a43e073eb520f5304bef8d4969269d7efe873b05272b" "0ac03c1f508afad83392f0e3c2b224e406158c73dfef006461986779c73a454a" "b8b5c353e73470377f2111fddb0ea652d35ce98e0a27a5c592d2ab9f66855106" "34244c75614f772194df889ce22027ae2361bbf6b913d3be8524403c49550db1" "2bed8550c6f0a5ce635373176d5f0e079fb4fb5919005bfa743c71b5eed29d81" "74f047b2bba8a31171d89882b0f7f3d2f56fb6f4fe19f895681ac365ce28eb17" "536e17ea1ffa83e6a5ba0826c58c860f3cce91cd6b2dcda6eb6e3d3423325a40" "2edd2d4f9ded893da7a47d372567925748f26a0c6e4b0175dc73cea53ecc24fe" "fdd33a1dc025b4506ac0f8a86dd1a539abf26546e65040eec08b75dca31ae6c1" "537169a46d87ce1db8b45e9a945cca27b1229ff00b0a299501a722653eb76514" "222fd5af6dff7038093236f5129b225097616af538b2180d6540099e59dd310b" "20ecc512c92408a3f5b4072e9ecc4c3e94b494dbd5b293f200d67c017005090b" "e4dc40f68e6e0211f3bddd4bd7cf4af2b011d4e9680f6310fb3cc742da2eda75" "b84cad7953ebd020ae264464ed800b2265a2752fa3ee165b39f61f42d18331e1" "a8245b7cc985a0610d71f9852e9f2767ad1b852c2bdea6f4aadc12cce9c4d6d0" "4cf3221feff536e2b3385209e9b9dc4c2e0818a69a1cdb4b522756bcdf4e00a4" "90038677570c60e6058e01ca8b7f7a4505c9608528a299c5f163f7ce2165d026" "1ce00f3f8413e448ec635e2e99f572b39a310340a63d1421e8df1b957f966908" "bc249b8e6343d6967f979600a3458793427aa95f22b91931bf391087619d0e29" "95f954ce018bbff3107b357bd87d060db195a2d5c6b70411587223597fde171d" "4b38d67a87d09d524072a59f33ea302590d64e17342f0c8a717fc2acc4c7f235" "3af98081c0cf235b7fba9ef7389dde9cfe79ab000fcb0e81735a55003258a7c5" "eea517c5cc867585ba1318d5bb9357b8a5b586e9220f32f35b15124b06d36029" "9c8b6b14235a35f9765b0831b077072fdccb810d33ca70176e5e69e3ce68aefa" "e96d6d21328390f703907d02b8e2a481dd62f466793161376c0c4be48b86d245" "592a64ba45152710af31679b1bcc48774372d3075171f0cb3f6cd34947056277" "feff1f2cd9377c295b4273ece14fe7e7e9c69800eae042c418c9f4e5d7659816" "81a0e1db2a4dcaf69b28b521fd8792563d4ccccc236889834a439a2901fdfd75" "7625bab54bda4fd0c1c5e5629c010e7bb8b715e30d12e3cc32a7dce1685adddc" "a6af2c89fb5af392ef57259d84a54f9d8808a4557608e45ec6e419a30215904b" "d25594db11e666e3d670c739266f62b206814e261e8548becef5258d6cfbd50b" "c9e4bdc479afee1a24ba3ac5c8c1b121dcea1b82a67235b96bf27f57c0eb8b44" "1276b1f168500c302214756a2588d5f8ae646595a57ff3ef178a3b08d4e7fe07" "b67c8e97c68edaaf233b37fb7ed2f6100a2e9e32ee1b440cd6813b0fc64cbf5e" "3aa0ee03445c2f66a481a676105f8af57b3d65f286bce0f5ca2a0a7021f83d17" "6afcf7b1fb0d7999f99805ad97178a894a58f5d1c4f356eb656fbd93b9bdf308" "6d52378b4451194ab953337b87e85ce87bd20e17b5262f44cc93ec4a83fad177" "69a7eaba8be8c7a4b0ccf43e4dcfab5dde22f1eea385dd6197d054b612b088b4" "792d0ff95f6f3a7469b80b32ef9b08d0499dd4c154c7e570d4f5ea102fb459e4" "b8eadfd4416beb2fffc17ca096b99056670f316a6a8998fd7d86c391c67f31d1" "7d4d00a2c2a4bba551fcab9bfd9186abe5bfa986080947c2b99ef0b4081cb2a6" "94e0091d9f9395ee25bb317da1b529ac47a1bcb68d5be5ddf1d2c70daac8351e" "b801e922fb047f81c5025bb0080107b90f73bcfa64ba6d128ede417db4d05553" "297063d0000ca904abb446944398843edaa7ef2c659b7f9087d724bf6f8c1d1f" "d943bd7feb67ac890d05a714fa7ece75c74f368b4b535082cf9889156686006f" "9989a5cd9b772fd4e1d8caf0e24259131d2f77416c127191c25dff3e38e8d2fd" "ae6a698cbbe84614d6dc61f6b1f48545ad4971f8507e27313d44b6bef0f6cf4f" "cd4f9be41a57a36a8707fd8aa5e6fbb5b4629edac9017739ae3c85d0026a8927" "4ba2ecfbcb5717cf726a9b2f17313871c0b558daf190e638f4ccf506e3260c3e" "963c63e6e1b62d4b7b42bb13426e0fb1d6e2b36c32f151d0070753f2efddeeed" "e0d66273dfa183081e2d42453202f5eda5ae7ab175e8eb9df1f3440a92c488e7" "11d069fbfb0510e2b32a5787e26b762898c7e480364cbc0779fe841662e4cf5d" "0c311fb22e6197daba9123f43da98f273d2bfaeeaeb653007ad1ee77f0003037" "572caef0c27b100a404db8d540fd5b31397f90ab660ef5539ff0863ff9bee26a" "65385d67a1711d06a04e0cc5830e24ff7d016bdb4f9876a5d538308400024c4c" "0c2ca285c4aedb6d3333e861ccee41edde2afc7efe0f1d347e0133d04f11ab1f" "73fe242ddbaf2b985689e6ec12e29fab2ecd59f765453ad0e93bc502e6e478d6" "e16a771a13a202ee6e276d06098bc77f008b73bbac4d526f160faa2d76c1dd0e" "f3ceb7a30f6501c1093bc8ffdf755fe5ddff3a85437deebf3ee8d7bed8991711" "f32dd8e7b3a508874eded03d5be43d2bdfffe81c199eea72de06ce3e653db720" "427234e4b45350b4159575f1ac72860c32dce79bb57a29a196b9cfb9dd3554d9" "1f3304214265481c56341bcee387ef1abb684e4efbccebca0e120be7b1a13589" "d2622a2a2966905a5237b54f35996ca6fda2f79a9253d44793cfe31079e3c92b" "159bb8f86836ea30261ece64ac695dc490e871d57107016c09f286146f0dae64" "5a0522c0959f3b694ffd06ce620ee3868b2da14723c75e76939940971fc84e3b" "d677ef584c6dfc0697901a44b885cc18e206f05114c8a3b7fde674fce6180879" "8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" "6cfe5b2f818c7b52723f3e121d1157cf9d95ed8923dbc1b47f392da80ef7495d" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" "d6a00ef5e53adf9b6fe417d2b4404895f26210c52bb8716971be106550cea257" "1e7e097ec8cb1f8c3a912d7e1e0331caeed49fef6cff220be63bd2a6ba4cc365" default))) + '(delete-by-moving-to-trash t) + '(dired-auto-revert-buffer t) + '(dired-guess-shell-alist-user + (quote + (("\\.mp4" "totem") + ("\\.mkv" "totem") + ("\\.avi" "totem") + ("\\.html" "firefox") + ("\\.pdf" "evince") + ("\\.svg" "inkscape") + ("\\.png" "eog" "gimp") + ("\\.jpg" "eog" "gimp")))) + '(dired-listing-switches "-alh") + '(doc-view-continuous t) + '(doc-view-resolution 200) + '(eldoc-echo-area-use-multiline-p nil) + '(enable-recursive-minibuffers t) + '(eshell-history-size 1000) + '(eshell-visual-commands + (quote + ("vim" "tail" "htop" "ssh" "vi" "screen" "top" "less" "more" "lynx" "ncftp" "pine" "tin" "trn" "elm"))) + '(fci-rule-color "#073642") + '(fetch-email-interval 600) + '(fill-column 80) + '(flycheck-disabled-checkers (quote (javascript-jshint))) + '(flycheck-emacs-lisp-load-path (quote inherit)) + '(flyspell-delay 1) + '(ftgp-atlassian-pass-entry "atlassian") + '(gdb-enable-debug t) + '(ggtags-global-output-format (quote ctags-x)) + '(ggtags-sort-by-nearness t) + '(git-commit-summary-max-length 80) + '(global-linum-mode nil) + '(helm-ag-insert-at-point (quote symbol)) + '(highlight-changes-colors (quote ("#d33682" "#6c71c4"))) + '(highlight-symbol-colors + (--map + (solarized-color-blend it "#002b36" 0.25) + (quote + ("#b58900" "#2aa198" "#dc322f" "#6c71c4" "#859900" "#cb4b16" "#268bd2")))) + '(highlight-symbol-foreground-color "#93a1a1") + '(highlight-tail-colors + (quote + (("#073642" . 0) + ("#546E00" . 20) + ("#00736F" . 30) + ("#00629D" . 50) + ("#7B6000" . 60) + ("#8B2C02" . 70) + ("#93115C" . 85) + ("#073642" . 100)))) + '(hl-bg-colors + (quote + ("#7B6000" "#8B2C02" "#990A1B" "#93115C" "#3F4D91" "#00629D" "#00736F" "#546E00"))) + '(hl-fg-colors + (quote + ("#002b36" "#002b36" "#002b36" "#002b36" "#002b36" "#002b36" "#002b36" "#002b36"))) + '(httpd-port 3333) + '(ido-vertical-define-keys (quote C-n-C-p-up-down-left-right)) + '(imenu-eager-completion-buffer nil) + '(imenu-use-popup-menu (quote on-mouse)) + '(indicate-buffer-boundaries (quote left)) + '(indicate-empty-lines nil) + '(indium-chrome-executable "chromium-browser") + '(indium-update-script-on-save t) + '(interleave--org-notes-dir-list (quote ("."))) + '(jade-chrome-executable "chromium-browser") + '(js-switch-indent-offset 4) + '(js2-global-externs (quote ("define" "require" "app"))) + '(js2-include-node-externs t) + '(js2-pretty-multiline-declarations nil t) + '(ledger-clear-whole-transactions t) + '(ledger-occur-use-face-shown nil) + '(ledger-post-amount-alignment-at :decimal) + '(ledger-reconcile-default-commodity "€") + '(ledger-report-auto-refresh-sticky-cursor t) + '(ledger-reports + (quote + ((#("Vacations" 0 1 + (idx 0)) + "ledger reg -f ledger.dat ^Assets:Vacation") + (#("prices" 0 1 + (idx 1)) + "ledger -f ledger.dat prices €") + (#("trading SEK" 0 1 + (idx 2)) + "ledger reg -f ledger.dat trading -X €") + (#("Forecast" 0 1 + (idx 3)) + "ledger -M -X € -f /home/nico/org/reference/ledger/ledger.dat --forecast \"d<[2017]\" bal ^assets ^liab") + (#("Budget (with unbudgeted expenses/income)" 0 1 + (idx 4)) + "ledger -p \"this month\" -M -X € -f /home/nico/org/reference/ledger/ledger.dat reg ^expenses ^income --budget --unbudgeted --invert") + (#("Budget (of the year)" 0 1 + (idx 5)) + "ledger -p \"this year\" -M -X € -f /home/nico/org/reference/ledger/ledger.dat reg ^expenses --budget --invert") + (#("Budget (last month)" 0 1 + (idx 6)) + "ledger -p \"last month\" -M -X € -f /home/nico/org/reference/ledger/ledger.dat reg ^expenses ^income --budget --invert") + (#("Budget" 0 1 + (idx 7)) + "ledger -p \"this month\" -M -X € -f /home/nico/org/reference/ledger/ledger.dat reg ^expenses ^income --budget --invert") + (#("Account statement Swedish Checking" 0 1 + (idx 8)) + "ledger reg -f ledger.dat Assets:Checking:Nordea") + (#("Account statement Checking" 0 1 + (idx 9)) + "ledger reg -f ledger.dat ^Assets:Checking:CE") + (#("Income statement (last month)" 0 1 + (idx 10)) + "ledger --invert -S T -f /home/nico/org/reference/ledger/ledger.dat bal ^income ^expenses -X € -p \"last month\"") + (#("Income statement" 0 1 + (idx 11)) + "ledger --invert -S T -f /home/nico/org/reference/ledger/ledger.dat bal ^income ^expenses -X € -p \"this month\"") + (#("Cash Flow" 0 1 + (idx 12)) + "ledger reg -f ledger.dat Assets:Swedish Assets:Checking") + (#("Cash Flow (in €)" 0 1 + (idx 13)) + "ledger reg -f ledger.dat Assets:Swedish Assets:Checking -X €") + (#("List of accounts" 0 1 + (idx 14)) + "ledger -f /home/nico/org/reference/ledger/ledger.dat accounts") + (#("Balance sheet" 0 1 + (idx 15)) + "ledger -f /home/nico/org/reference/ledger/ledger.dat bal ^assets ^liabilities ^equity") + (#("Balance sheet (in euros)" 0 1 + (idx 16)) + "ledger -f /home/nico/org/reference/ledger/ledger.dat bal ^assets ^liabilities ^equity -X €") + (#("Income statement (all time)" 0 1 + (idx 17)) + "ledger -M --invert -S T -f /home/nico/org/reference/ledger/ledger.dat bal ^income ^expenses -X €") + (#("Account statement Savings" 0 1 + (idx 18)) + "ledger reg -f ledger.dat ^Assets:Savings") + (#("Equity" 0 1 + (idx 19)) + "ledger -f ledger.dat equity") + (#("Cleared" 0 1 + (idx 20)) + "ledger cleared -f ledger.dat")))) + '(line-spacing nil) + '(linum-format "%4d ") + '(locate-ls-subdir-switches "-lhl") + '(magit-diff-refine-hunk t) + '(magit-diff-use-overlays nil) + '(magit-push-always-verify nil) + '(magit-repo-dirs (quote ("/home/nico/config/" "/home/nico/work/"))) + '(magit-tag-arguments (quote ("--sign"))) + '(main-line-color1 "#222232") + '(main-line-color2 "#333343") + '(markdown-command "kramdown") + '(netstat-program-options (quote ("-auntpx"))) + '(notmuch-address-command nil) + '(notmuch-crypto-process-mime t) + '(notmuch-hello-sections + (quote + (notmuch-hello-insert-header notmuch-hello-insert-saved-searches notmuch-hello-insert-search notmuch-hello-insert-recent-searches notmuch-hello-insert-alltags notmuch-hello-insert-footer))) + '(notmuch-mua-reply-insert-header-p-function (quote notmuch-show-reply-insert-header-p-never)) + '(notmuch-saved-searches + (quote + ((:name "To me" :query "tag:unread and (to:petton or cc:petton)" :key "m") + (:name "unread" :query "tag:unread" :key "u") + (:name "flagged" :query "tag:flagged" :key "f") + (:name "drafts" :query "tag:draft" :key "d") + (:name "all mail" :query "*" :key "*") + (:name "Grifon" :query "to:grifon@grifon.fr and tag:unread" :key "g") + (:name "amber" :query "amber+tag:unread" :key "a") + (:name "emacs" :query "emacs+tag:unread" :key "e") + (:name "Debbugs" :query "bug\\# and tag:unread" :key "b") + (:name "Emacs diffs" :query "[Emacs-diffs] and tag:unread" :key "D") + (:name "ftgp" :query "(ftgp or foretagsplatsen) and tag:+unread" :key "f") + (:name "ftgp bugs" :query "from:current@foretagsplatsen.se and tag:unread" :key "F") + (:name "Logwatch" :query "Logwatch for petton.fr" :key "L" :count-query "logwatch for petton.fr and tag:unread") + (:name "aurelia" :query "from:aurelia and tag:unread" :key "A") + (:name "today" :query "date:today..now") + (:name "week" :query "date:7d..now") + (:name "sent" :query "from:nicolas petton" :key "s")))) + '(notmuch-search-oldest-first nil) + '(notmuch-show-indent-messages-width 1) + '(notmuch-show-insert-text/plain-hook + (quote + (notmuch-wash-convert-inline-patch-to-part notmuch-wash-wrap-long-lines notmuch-wash-tidy-citations notmuch-wash-elide-blank-lines notmuch-wash-excerpt-citations))) + '(notmuch-show-logo nil) + '(notmuch-show-part-button-default-action (quote notmuch-show-view-part)) + '(notmuch-tag-formats + (quote + (("unread" + (notmuch-tag-format-image-data tag + (notmuch-tag-star-empty-icon)) + (propertize tag + (quote face) + (quote + (:foreground "red")))) + ("flagged") + ("encrypted" + (notmuch-apply-face tag + (quote + (:weight bold :foreground "orange red"))))))) + '(nrepl-message-colors + (quote + ("#CC9393" "#DFAF8F" "#F0DFAF" "#7F9F7F" "#BFEBBF" "#93E0E3" "#94BFF3" "#DC8CC3"))) + '(og-org-agenda-appt-headline "APPT") + '(omnisharp-server-executable-path + "C:\\Users\\nico\\omnisharp-server\\OmniSharp\\bin\\Debug\\OmniSharp.exe") + '(org-agenda-custom-commands + (quote + (("w" . "TODOs") + ("d" "30 days deadlines" agenda "" + ((org-agenda-entry-types + (quote + (:deadline))) + (org-agenda-overriding-header "Month deadlines") + (org-agenda-span + (quote month)) + (org-agenda-overriding-header ""))) + ("l" "Logbook" nico/org-agenda-log "" + ((org-agenda-overriding-header "Logbook"))) + ("A" "Aurélia" tags-todo "aurelia" nil) + ("E" "Errands" tags "errands" nil) + ("n" "Next actions" + ((alltodo "" + ((org-agenda-tag-filter-preset + (quote nil)) + (org-agenda-overriding-header "Next actions") + (org-agenda-skip-function + (quote + (org-agenda-skip-all-siblings-but-first))) + (org-agenda-prefix-format "%-32:(org-agenda-format-parent 30)") + (org-agenda-todo-keyword-format "%-4s") + (org-agenda-files + (quote + ("~/org/gtd.org")))))) + nil nil) + ("@" "Contexts" + ((tags "ftgp" + ((org-agenda-skip-function + (quote + (org-agenda-skip-all-siblings-but-first))) + (org-agenda-overriding-header "FTGP next actions"))) + (tags "emacs" + ((org-agenda-overriding-header "Emacs next actions") + (org-agenda-skip-function + (quote + (org-agenda-skip-all-siblings-but-first))))) + (tags-todo "@email" + ((org-agenda-overriding-header "Emails") + (org-agenda-skip-function + (quote + (org-agenda-skip-entry-if + (quote nottodo) + (quote + ("TODO"))))))) + (tags-todo "@phone" + ((org-agenda-overriding-header "Phone calls"))) + (todo "WAITING" + ((org-agenda-overriding-header "Waiting"))) + (tags-todo "@office" + ((org-agenda-skip-function + (quote + (org-agenda-skip-all-siblings-but-first))) + (org-agenda-overriding-header "At the office"))) + (tags-todo "@plourin" + ((org-agenda-overriding-header "Plourin") + (org-agenda-skip-function + (quote + (org-agenda-skip-all-siblings-but-first))))) + (tags-todo "@stmartin" + ((org-agenda-overriding-header "Saint Martin") + (org-agenda-skip-function + (quote + (org-agenda-skip-all-siblings-but-first))))) + (tags-todo "@brest" + ((org-agenda-overriding-header "Brest") + (org-agenda-skip-function + (quote + (org-agenda-skip-all-siblings-but-first))))) + (tags-todo "@stockholm" + ((org-agenda-overriding-header "Stockholm") + (org-agenda-skip-function + (quote + (org-agenda-skip-all-siblings-but-first)))))) + nil nil)))) + '(org-agenda-default-appointment-duration 60) + '(org-agenda-files + (quote + ("~/org/inbox.org" "~/org/agenda.org" "~/org/gtd.org" "~/org/tickler.org"))) + '(org-agenda-log-mode-items (quote (closed clock state))) + '(org-agenda-restore-windows-after-quit t) + '(org-agenda-span (quote week)) + '(org-clock-clocked-in-display (quote mode-line)) + '(org-clock-in-resume t) + '(org-clock-mode-line-total (quote today)) + '(org-clock-out-remove-zero-time-clocks t) + '(org-clock-persist t) + '(org-columns-default-format "%60ITEM(Task) %10Effort(Estimated Effort){:} %10CLOCKSUM") + '(org-completion-use-ido t) + '(org-contacts-files (quote ("~/org/contacts.org"))) + '(org-deadline-warning-days 10) + '(org-default-notes-file "~/org/inbox.org") + '(org-ditaa-jar-path "~/bin/ditaa/ditaa.jar") + '(org-enforce-todo-checkbox-dependencies t) + '(org-enforce-todo-dependencies t) + '(org-export-taskjuggler-target-version 3) + '(org-file-apps + (quote + (("\\.mm\\'" . default) + ("\\.x?html?\\'" . default) + (directory . emacs) + ("\\.el\\'" . emacs) + ("\\.org\\'" . emacs)))) + '(org-fontify-done-headline t) + '(org-global-properties (quote (("Effort_ALL" . "1h 2h 4h 6h 8h 16h")))) + '(org-gnome-integrate-with-calendar t) + '(org-gnome-integrate-with-empathy nil) + '(org-gogs-protocol-base-url "https://petton.fr/git") + '(org-habit-graph-column 52) + '(org-hide-leading-stars t) + '(org-log-done (quote time)) + '(org-log-into-drawer t) + '(org-mobile-force-id-on-agenda-items nil) + '(org-modules + (quote + (org-bibtex org-docview org-gnus org-habit org-info org-protocol org-jsinfo org-habit org-irc org-mew org-mhe org-protocol org-rmail org-vm org-wl org-w3m org-bookmark))) + '(org-pomodoro-audio-player "/usr/bin/afplay") + '(org-special-ctrl-a/e t) + '(org-special-ctrl-k t) + '(org-startup-folded (quote showeverything)) + '(org-stuck-projects (quote ("+LEVEL=2/-DONE" ("TODO" "NEXT") nil ""))) + '(org-tags-column -80) + '(org-tags-exclude-from-inheritance (quote ("project"))) + '(org-time-clocksum-format + (quote + (:hours "%d" :require-hours t :minutes ":%02d" :require-minutes t))) + '(org-todo-keywords + (quote + ((sequence "TODO(t)" "|" "DONE(d)" "CANCELLED(c)") + (sequence "FEATURE(f)" "|" "COMPLETED(c)") + (sequence "BUG(b)" "|" "FIXED(x)") + (sequence "APPT(p)" "|" "DONE(d)" "CANCELLED(a)") + (sequence "WAITING(w!)" "|" "DONE(d)")))) + '(password-cache-expiry 300) + '(password-store-password-length 25) + '(pdf-view-midnight-colors (quote ("#DCDCCC" . "#383838"))) + '(pos-tip-background-color "#073642") + '(pos-tip-foreground-color "#93a1a1") + '(projectile-completion-system (quote ivy)) + '(ring-bell-function (quote ignore)) + '(safe-local-variable-values + (quote + ((eval when + (and + (buffer-file-name) + (file-regular-p + (buffer-file-name)) + (string-match-p "^[^.]" + (buffer-file-name))) + (unless + (featurep + (quote package-build)) + (let + ((load-path + (cons "../package-build" load-path))) + (require + (quote package-build)))) + (package-build-minor-mode) + (set + (make-local-variable + (quote package-build-working-dir)) + (expand-file-name "../working/")) + (set + (make-local-variable + (quote package-build-archive-dir)) + (expand-file-name "../packages/")) + (set + (make-local-variable + (quote package-build-recipes-dir)) + default-directory)) + (jade-workspace-directories "/home/nico/work/ftgp/monitor/monitor/Monitor.Web.Ui/Client") + (lentic-init . lentic-orgel-org-init) + (flycheck-javascript-eslint-executable . "/home/nico/work/ftgp/monitor/monitor/Monitor.Web.Ui/Client/node_modules/.bin/eslint") + (flycheck-eslint-rulesdir . "/home/nico/work/ftgp/monitor/monitor/Monitor.Web.Ui/Client/tools/eslint_rules/") + (amd-rewrite-rules-alist + ("^apps/" . "")) + (ntags-ctags-options . "-Re --exclude='lib/*' --exclude='bower_components/*'") + (emacs-lisp-docstring-fill-column . 75) + (eval flycheck-cask-setup) + (ntags-ctags-options . "-Re --exclude='lib/*' --exclude='css/*' --exclude='bower_components/*' --exclude='bootstrap/*' --exclude='*.html' --exclude='*.php' --exclude='less/*'") + (require-final-newline . t)))) + '(set-mark-command-repeat-pop t) + '(show-paren-style (quote parenthesis)) + '(skeletor-completing-read-function (quote completing-read)) + '(smartrep-mode-line-active-bg (solarized-color-blend "#859900" "#839496" 0.2)) + '(snapshot-timemachine-rsnapshot-backup-dir "/run/media/nico/Backup2") + '(snapshot-timemachine-rsnapshot-backup-name "lingonberry") + '(solarized-distinct-fringe-background t) + '(solarized-high-contrast-mode-line t) + '(solarized-scale-org-headlines nil) + '(solarized-use-variable-pitch nil) + '(tags-revert-without-query t) + '(term-default-bg-color "#002b36") + '(term-default-fg-color "#839496") + '(tool-bar-mode nil) + '(vc-annotate-background nil) + '(vc-annotate-background-mode nil) + '(vc-annotate-color-map + (quote + ((20 . "#dc322f") + (40 . "#c85d17") + (60 . "#be730b") + (80 . "#b58900") + (100 . "#a58e00") + (120 . "#9d9100") + (140 . "#959300") + (160 . "#8d9600") + (180 . "#859900") + (200 . "#669b32") + (220 . "#579d4c") + (240 . "#489e65") + (260 . "#399f7e") + (280 . "#2aa198") + (300 . "#2898af") + (320 . "#2793ba") + (340 . "#268fc6") + (360 . "#268bd2")))) + '(vc-annotate-very-old-color nil) + '(visible-mark-faces (quote (visible-mark-face1 visible-mark-face2))) + '(visible-mark-max 2) + '(weechat-color-list + (quote + (unspecified "#002b36" "#073642" "#990A1B" "#dc322f" "#546E00" "#859900" "#7B6000" "#b58900" "#00629D" "#268bd2" "#93115C" "#d33682" "#00736F" "#2aa198" "#839496" "#657b83"))) + '(winner-boring-buffers (quote ("*Completions* *Messages*"))) + '(winner-mode t) + '(xref-after-jump-hook (quote (recenter xref-pulse-momentarily))) + '(xref-prompt-for-identifier + (quote + (not xref-find-references xref-find-definitions xref-find-definitions-other-window xref-find-definitions-other-frame))) + '(zerodark-use-high-contrast-in-mode-line t)) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + ) diff --git a/hosts/blueberry/init-blueberry-appearance.el b/hosts/blueberry/init-blueberry-appearance.el new file mode 100644 index 0000000..8f0d016 --- /dev/null +++ b/hosts/blueberry/init-blueberry-appearance.el @@ -0,0 +1,4 @@ +(when (window-system) + (set-face-attribute 'default nil :height 115 :family "Fira Mono")) + +(provide 'init-blueberry-appearance) diff --git a/hosts/blueberry/init-blueberry-package.el b/hosts/blueberry/init-blueberry-package.el new file mode 100644 index 0000000..bfa9b10 --- /dev/null +++ b/hosts/blueberry/init-blueberry-package.el @@ -0,0 +1,6 @@ +(let ((packages-to-load '(notmuch alert org-gnome))) + (dolist (package packages-to-load) + (when (not (package-installed-p package)) + (package-install package)))) + +(provide 'init-blueberry-package) diff --git a/hosts/blueberry/init-blueberry.el b/hosts/blueberry/init-blueberry.el new file mode 100644 index 0000000..6118a5a --- /dev/null +++ b/hosts/blueberry/init-blueberry.el @@ -0,0 +1,10 @@ +(require 'init-notmuch) +(require 'init-org) +(require 'init-org-publish) +(require 'init-latex) +(require 'init-prodigy) +(require 'init-ledger) +(require 'init-blueberry-appearance) +(require 'init-epg) + +(provide 'init-blueberry) diff --git a/hosts/blueberry/init-epg.el b/hosts/blueberry/init-epg.el new file mode 100644 index 0000000..9dcec2b --- /dev/null +++ b/hosts/blueberry/init-epg.el @@ -0,0 +1,7 @@ +(require 'epg) +(require 'magit) + +(setq epg-gpg-program "gpg2") +(setq magit-commit-arguments (quote ("--gpg-sign=233587A47C207910"))) + +(provide 'init-epg) diff --git a/hosts/blueberry/init-latex.el b/hosts/blueberry/init-latex.el new file mode 100644 index 0000000..3e9736e --- /dev/null +++ b/hosts/blueberry/init-latex.el @@ -0,0 +1,28 @@ +(require 'reftex) +;; (require 'auctex-evince-sync) + +(add-hook 'LaTeX-mode-hook 'tex-pdf-mode) + +(eval-after-load "LaTeX" + '(progn + + ;; synctex + (TeX-source-correlate-mode) + + (add-to-list 'TeX-expand-list + '("%q" skim-make-url)))) + +(defun skim-make-url () (concat + (TeX-current-line) + " " + (expand-file-name (funcall file (TeX-output-extension) t) + (file-name-directory (TeX-master-file))) + " " + (buffer-file-name))) + +(setq TeX-view-program-list + '(("evince" "evince %o"))) + +(setq TeX-view-program-selection '((output-pdf "evince"))) + +(provide 'init-latex) diff --git a/hosts/blueberry/init-ledger.el b/hosts/blueberry/init-ledger.el new file mode 100644 index 0000000..1928a7b --- /dev/null +++ b/hosts/blueberry/init-ledger.el @@ -0,0 +1,43 @@ +(require 'ledger-mode) +(require 'company) +(require 'map) + +(add-hook 'ledger-mode-hook #'company-mode) + +(defvar nico-ledger-imports nil) + +(defun nico-ledger-autosync () + (interactive) + (switch-to-buffer (get-buffer-create "*ledger sync*")) + (erase-buffer) + (ledger-mode) + (shell-command "ledger-autosync -l ~/org/reference/ledger/ledger.dat ~/Downloads/\\ telechargement.ofx -a Assets:Checking:CE --fid 10" (current-buffer))) + +(defun nico-ledger-convert-transaction () + (interactive) + (save-excursion + (back-to-indentation) + (let* ((match (map-some (lambda (k v) + (when (search-forward k (line-end-position) t) + k)) + nico-ledger-imports)) + (replacement (if match + (map-elt nico-ledger-imports match) + (read-string "Import as: " "Expenses:Misc")))) + (search-forward "Expenses:Misc") + (delete-backward-char 13) + (insert replacement) + (ledger-post-align-xact (point))) + (goto-char (point-min)) + (while (re-search-forward "\\bEUR\\b" nil t) + (replace-match "€" nil t))) + (ledger-navigate-next-xact-or-directive)) + +(defun nico-ledger-convert-all-transactions () + (interactive) + (while (not (eobp)) + (nico-ledger-convert-transaction))) + +(define-key ledger-mode-map (kbd "C-c M-i") #'nico-ledger-convert-transaction) + +(provide 'init-ledger) diff --git a/hosts/blueberry/init-mu4e.el b/hosts/blueberry/init-mu4e.el new file mode 100644 index 0000000..04038df --- /dev/null +++ b/hosts/blueberry/init-mu4e.el @@ -0,0 +1,139 @@ +(require 'mu4e) +(require 'alert) +(require 'smtpmail) +(require 'org-mu4e) +(require 'gnus-dired) + +(define-key global-map (kbd "M-N") 'mu4e) + +(setq mu4e-attachment-dir "~/Download") + +;; don't keep message buffers around +(setq message-kill-buffer-on-exit t) + +;; attempt to show images when viewing messages +(setq mu4e-view-show-images t + mu4e-view-image-max-width 800) + +;; use imagemagick, if available +(when (fboundp 'imagemagick-register-types) + (imagemagick-register-types)) + +(setq mu4e-sent-messages-behavior 'sent) + +(setq mu4e-msg2pdf "/usr/bin/msg2pdf" + mu4e-get-mail-command "offlineimap" + mu4e-html2text-command "w3m -T text/html" + mu4e-update-interval 600) + +(defun nico/notify-new-email () + (alert + "You have unread emails" + :title "New mail!" + :icon "/usr/share/icons/gnome/32x32/status/mail-unread.png")) + +(add-hook 'mu4e-index-updated-hook #'nico/notify-new-email) + +(setq message-send-mail-function 'smtpmail-send-it + user-full-name "Nicolas Petton" + mu4e-compose-signature "Nicolas Petton +http://nicolas-petton.fr" + mu4e-compose-signature-auto-include t + starttls-use-gnutls t) + +(defvar nico/mu4e-account-alist + '(("nicolas@petton.fr" + (user-mail-address "nicolas@petton.fr") + (smtpmail-starttls-credentials '(("mail.messagingengine.com" 465 nil nil))) + (smtpmail-auth-credentials + '(("smtp.gmail.com" 587 "mail.messagingengine.com" nil))) + (smtpmail-default-smtp-server "mail.messagingengine.com") + (smtpmail-smtp-server "mail.messagingengine.com") + (smtpmail-smtp-service 587)) + ;; ("FTGP" + ;; (user-mail-address "nicolas.petton@foretagsplatsen.se") + ;; (smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil))) + ;; (smtpmail-auth-credentials + ;; '(("smtp.gmail.com" 587 "nicolas.petton@foretagsplatsen.se" nil))) + ;; (smtpmail-default-smtp-server "smtp.gmail.com") + ;; (smtpmail-smtp-server "smtp.gmail.com") + ;; (smtpmail-smtp-service 587)) + )) + +(defun nico/mu4e-set-account () + "Set the account for composing a message. + Try to match the current maildir or ask for the account name" + (interactive) + (let* ((account + (nico/select-mail-account))) + (nico/setup-mail-account account))) + +(defun nico/select-mail-account () + (interactive) + (completing-read (format "Compose with account: (%s) " + (mapconcat #'(lambda (var) (car var)) nico/mu4e-account-alist "/")) + (mapcar #'(lambda (var) (car var)) nico/mu4e-account-alist) + nil t nil nil (caar nico/mu4e-account-alist))) + +(defun nico/setup-mail-account (account) + (let ((account-vars (cdr (assoc account nico/mu4e-account-alist)))) + (mapc #'(lambda (var) + (set (car var) (cadr var))) + account-vars))) + +(nico/setup-mail-account "nicolas@petton.fr") + +(add-hook 'mu4e-compose-pre-hook #'nico/mu4e-set-account) +(add-hook 'mu4e-compose-mode-hook #'mml-secure-message-sign) + +(add-to-list 'mu4e-view-actions + '("View in browser" . mu4e-action-view-in-browser) t) + +;; Attach files with dired +;; make the `gnus-dired-mail-buffers' function also work on +;; message-mode derived modes, such as mu4e-compose-mode +(defun gnus-dired-mail-buffers () + "Return a list of active message buffers." + (let (buffers) + (save-current-buffer + (dolist (buffer (buffer-list t)) + (set-buffer buffer) + (when (and (derived-mode-p 'message-mode) + (null message-sent-message-via)) + (push (buffer-name buffer) buffers)))) + (nreverse buffers))) + +(setq gnus-dired-mail-mode 'mu4e-user-agent) +(add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode) + +;; epa + +(add-hook 'mu4e-view-mode-hook #'epa-mail-mode) +(add-hook 'mu4e-compose-mode-hook #'epa-mail-mode) + +;; Display embedded diffs nicely + +(defun mu2diff () + (interactive) + (let ((buf "*Diff message view*") + (message-contents (buffer-string))) + (switch-to-buffer buf) + (read-only-mode 0) + (erase-buffer) + (insert message-contents) + (goto-char (point-min)) + (mu2diff--skip-message-headers) + (read-only-mode 1) + (diff-mode))) + +(defun mu2diff--skip-message-headers () + (let ((message-header-regex "^[\\\s+\\\t+]+\\|^[A-Za-z0-9-]+:\\\s")) + (save-excursion + (goto-char (point-min)) + (while (looking-at message-header-regex) + (forward-line)) + (delete-region (point-min) (point))))) + +(define-key mu4e-view-mode-map (kbd "C-c d") #'mu2diff) + +(provide 'init-mu4e) diff --git a/hosts/blueberry/init-notmuch.el b/hosts/blueberry/init-notmuch.el new file mode 100644 index 0000000..d86c70a --- /dev/null +++ b/hosts/blueberry/init-notmuch.el @@ -0,0 +1,261 @@ +(add-to-list 'load-path (expand-file-name "lib/notmuch/emacs" user-emacs-directory)) + +(require 'notmuch) +(require 'seq) +(require 'org-notmuch) +(require 'fetch-email) +(require 'alert) +(require 'yasnippet) + +;; For existing org links, load mu4e anyway + +;; use notmuch for sending emails +(global-set-key (kbd "C-x m") #'notmuch-mua-new-mail) + +;; don't keep message buffers around +(setq message-kill-buffer-on-exit t) + +;; Attach files from dired +(add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode) + +;; use imagemagick, if available +(when (fboundp 'imagemagick-register-types) + (imagemagick-register-types)) + +(defvar nico-pgp-sign-excluded-emails '("monitor\.issues@gmail\.com")) + +;; Sign messages by default +(add-hook 'message-setup-hook #'nico-maybe-sign-email) +(add-hook 'message-setup-hook #'yas-minor-mode-on) + +(defun nico-maybe-sign-email () + "Sign the current buffer's email unless the message is sent to + one of `nico-pgp-sign-excluded-emails'." + (let ((email (message-fetch-field "to"))) + (unless (and email + (seq-some (lambda (regex) + (string-match regex email)) + nico-pgp-sign-excluded-emails)) + (mml-secure-sign-pgpmime)))) + +(define-key global-map (kbd "M-N") #'notmuch) + +(add-to-list 'fetch-email-post-command-hook #'nico-notmuch-update) + +(define-key notmuch-hello-mode-map (kbd "C-c C-c") #'fetch-email) +(define-key notmuch-hello-mode-map "g" #'notmuch-refresh-this-buffer) + +(define-key notmuch-search-mode-map "g" #'notmuch-refresh-this-buffer) +(define-key notmuch-search-mode-map "d" #'nico-notmuch-search-tag-read) +(define-key notmuch-search-mode-map "D" #'nico-notmuch-search-tag-all-read) +(define-key notmuch-search-mode-map "u" #'nico-notmuch-search-tag-unread) + +(define-key notmuch-show-mode-map "d" #'nico-notmuch-show-tag-read) +(define-key notmuch-show-mode-map "D" #'nico-notmuch-show-tag-all-read) +(define-key notmuch-show-mode-map "u" #'nico-notmuch-show-tag-unread) + + +(defun nico-notmuch-update (&rest args) + (interactive) + (notmuch-poll-and-refresh-this-buffer)) + +(defun nico-notmuch-address-selection-function (prompt collection initial-input) + "Call (`completing-read' + PROMPT COLLECTION nil nil INITIAL-INPUT 'notmuch-address-history)" + (ido-completing-read + prompt (cons initial-input collection) nil nil initial-input 'notmuch-address-history)) + +(defun nico-notmuch-search-tag (tags) + (notmuch-search-tag tags) + (forward-line 1)) + +(defun nico-notmuch-search-tag-read () + (interactive) + (nico-notmuch-search-tag '("-unread"))) + +(defun nico-notmuch-search-tag-all-read () + (interactive) + (if (y-or-n-p "Mark all threads as read? ") + (progn + (notmuch-search-tag-all '("-unread"))))) + +(defun nico-notmuch-search-tag-unread () + (interactive) + (nico-notmuch-search-tag '("+unread"))) + +(defun nico-notmuch-show-tag-read () + (interactive) + (notmuch-show-tag '("-unread"))) + +(defun nico-notmuch-show-tag-all-read () + (interactive) + (if (y-or-n-p "Mark all threads as read? ") + (progn + (notmuch-show-tag-all '("-unread"))))) + +(defun nico-notmuch-show-tag-unread () + (interactive) + (notmuch-show-tag '("+unread"))) + +(setq message-send-mail-function #'message-send-mail-with-sendmail + sendmail-program "msmtpq" + user-full-name "Nicolas Petton" + starttls-use-gnutls t) + +(defvar nico-notmuch-account-alist + '(("nicolas@petton.fr" + (user-mail-address "nicolas@petton.fr")) + ("nicolas@foretagsplatsen.se" + (user-mail-address "nicolas@foretagsplatsen.se")))) + +(defun nico-setup-mail-account (account) + (let ((account-vars (cdr (assoc account nico-notmuch-account-alist)))) + (mapc #'(lambda (var) + (set (car var) (cadr var))) + account-vars))) + +(defun nico-select-mail-account () + (completing-read (format "Compose with account: (%s) " + (mapconcat #'(lambda (var) (car var)) nico-notmuch-account-alist "/")) + (mapcar #'(lambda (var) (car var)) nico-notmuch-account-alist) + nil t nil nil (caar nico-notmuch-account-alist))) + +(add-hook 'message-setup-hook #'nico-set-email-account-and-setup-message) + +(defun nico-set-email-account () + "Set the account for composing a message." + (interactive) + (let* ((account + (nico-select-mail-account))) + (nico-setup-mail-account account))) + +(defun nico-set-email-account-and-setup-message () + (nico-set-email-account) + (message-goto-from) + (message-beginning-of-line) + (delete-region (point) (point-at-eol)) + (insert (format "%s <%s>" user-full-name user-mail-address))) + +(nico-setup-mail-account "nicolas@petton.fr") + +(setq smtpmail-debug-info t) + +;; notifications +(defvar nico-notmuch-refresh-count 0) + +(defun nico-notmuch-refresh-status-message () + (let* ((new-count + (string-to-number + (car (process-lines notmuch-command "count")))) + (diff-count (- new-count nico-notmuch-refresh-count))) + (if (and (not (zerop nico-notmuch-refresh-count)) + (> diff-count 0)) + (alert (format "You have %s messages." + (notmuch-hello-nice-number diff-count)) + :title "New messages" + :icon "/usr/share/icons/gnome/32x32/status/mail-unread.png")) + (setq nico-notmuch-refresh-count new-count))) + +;; (add-hook 'notmuch-hello-refresh-hook #'nico-notmuch-refresh-status-message) + +;; opening attachments within emacs & xwidgets +(define-key notmuch-show-part-map "e" #'nico-notmuch-view-part-in-emacs) +(define-key notmuch-show-part-map "w" #'nico-notmuch-view-part-in-webkit) +(define-key notmuch-show-part-map "p" #'nico-notmuch-apply-git-patch) +(define-key notmuch-show-part-map "a" #'nico-notmuch-git-am-patch) + +(defun nico-notmuch-view-part-in-emacs () + "View the MIME part containing point from within Emacs." + (interactive) + (notmuch-show-apply-to-current-part-handle #'nico-view-part-in-emacs)) + +(defun nico-notmuch-view-part-in-webkit () + "View the MIME part containing point from within an xwidget webkit buffer." + (interactive) + (notmuch-show-apply-to-current-part-handle #'nico-view-part-in-webkit)) + +(defun nico-notmuch-apply-git-patch () + "Apply the MIME part at point as a git patch using `git patch'." + (interactive) + (notmuch-show-apply-to-current-part-handle #'nico-notmuch-apply-git-patch-part)) + +(defun nico-notmuch-git-am-patch () + "Apply the MIME part at point as a git patch using `git am'." + (interactive) + (notmuch-show-apply-to-current-part-handle #'nico-notmuch-git-am-part)) + +(defun nico-view-part-in-emacs (handle) + (interactive) + (let* ((dir (make-temp-dir)) + (filename (or (mail-content-type-get + (mm-handle-disposition handle) 'filename) + (mail-content-type-get + (mm-handle-type handle) 'name) + "")) + (contents (mm-get-part handle)) + (file (expand-file-name filename dir)) + (buf (find-file-noselect file))) + (with-current-buffer buf + (insert contents) + (save-buffer)) + (kill-buffer buf) + (pop-to-buffer (find-file-noselect file)))) + +(defun nico-view-part-in-webkit (handle) + (interactive) + (let* ((dir (make-temp-dir)) + (filename (or (mail-content-type-get + (mm-handle-disposition handle) 'filename) + (mail-content-type-get + (mm-handle-type handle) 'name) + "")) + (contents (mm-get-part handle)) + (file (expand-file-name filename dir)) + (encoding 'raw-text) + (buf (find-file-noselect file))) + (with-current-buffer buf + (insert contents) + (set-buffer-file-coding-system encoding) + (save-buffer)) + (kill-buffer buf) + (xwidget-webkit-browse-url (format "file://%s" file)))) + +(defun nico-notmuch-apply-git-patch-part (handle) + (let ((dir (read-directory-name "Git directory: "))) + (mm-pipe-part handle (format "cd %s; git apply" (expand-file-name dir))))) + +(defun nico-notmuch-git-am-part (handle) + (let ((dir (read-directory-name "Git directory: "))) + (mm-pipe-part handle (format "cd %s; git am" (expand-file-name dir))))) + +(defun make-temp-dir () + (let* ((dirname (make-temp-name temporary-file-directory)) + (absolute-name (expand-file-name dirname temporary-file-directory))) + (make-directory absolute-name) + absolute-name)) + +;; Function to return first name of email recipient +;; Used by yasnippet +;; Based closely on +;; http://blog.binchen.org/posts/how-to-use-yasnippets-to-produce-email-templates-in-emacs.html +(defun nico-yas-get-first-name-from-to-field () + (let ((rlt "NAME") str rlt2) + (save-excursion + (goto-char (point-min)) + ;; first line in email could be some hidden line containing NO to field + (setq str (buffer-substring-no-properties (point-min) (point-max)))) + ;; take name from TO field + (when (string-match "^To: \"?\\([^ ,]+\\)" str) + (setq rlt (match-string 1 str))) + ;;get name in FROM field if available + (when (string-match "^\\([^ ,\n]+\\).+writes:$" str) + (progn (setq rlt2 (match-string 1 str)) + ;;prefer name in FROM field if TO field has "@" + (when (string-match "@" rlt) + (setq rlt rlt2)) + )) + (message "rlt=%s" rlt) + rlt)) + +(provide 'init-notmuch) +;;; init-notmuch ends here diff --git a/hosts/blueberry/init-org-publish.el b/hosts/blueberry/init-org-publish.el new file mode 100644 index 0000000..466199a --- /dev/null +++ b/hosts/blueberry/init-org-publish.el @@ -0,0 +1,120 @@ +(require 'org) +(require 'ox) +(require 'ox-rss) + + +(defvar nico-website-html-head + " + + + + +") + +(defvar nico-analytics-html + "") + +(defvar nico-website-html-blog-head + " + + + + + +") + +(defvar nico-website-html-preamble + "
+

Nicolas Petton

+

Web developer, Lisper, Smalltalker & Emacs maniac.

+
+ + +") + +(defvar nico-website-html-postamble + (concat + "" + "")) + +(defun nico-html-head () + (concat nico-website-html-head nico-analytics-html)) + +(defun nico-blog-html-head () + (concat nico-website-html-blog-head nico-analytics-html)) + +(setq org-publish-project-alist + `(("org" + :base-directory "~/work/nicolas-petton.fr/" + :base-extension "org" + :publishing-directory "~/Public/nicolas-petton.fr/" + :publishing-function org-html-publish-to-html + :section-numbers nil + :with-toc nil + :html-head ,(nico-html-head) + :html-preamble ,nico-website-html-preamble + :html-postamble ,nico-website-html-postamble) + + ("blog" + :base-directory "~/work/nicolas-petton.fr/blog" + :base-extension "org" + :publishing-directory "~/Public/nicolas-petton.fr/blog/" + :publishing-function org-html-publish-to-html + :section-numbers nil + :with-toc nil + :html-head ,(nico-blog-html-head) + :html-head-extra + "" + :html-preamble ,nico-website-html-preamble + :html-postamble ,nico-website-html-postamble) + + ("ressources" + :base-directory "~/work/nicolas-petton.fr/" + :base-extension "jpg\\|jpeg\\|gif\\|png\\|js\\|html\\|css\\|ogv\\|ogg\\|mp4\\|ico\\|asc" + :recursive t + :publishing-directory "~/Public/nicolas-petton.fr/" + :publishing-function org-publish-attachment) + + ("rss" + :base-directory "~/work/nicolas-petton.fr/blog/" + :base-extension "org" + :publishing-directory "~/Public/nicolas-petton.fr/blog/" + :publishing-function (org-rss-publish-to-rss) + :section-numbers nil + :table-of-contents nil + :html-link-home "http://nicolas-petton.fr/blog/" + :rss-image-url "http://nicolas-petton.fr/images/nicolas-petton.png" + :html-link-use-abs-url t) + + ("website" :components ("org" "blog" "rss" "ressource")))) + +(provide 'init-org-publish) diff --git a/hosts/blueberry/init-org.el b/hosts/blueberry/init-org.el new file mode 100644 index 0000000..ba002ad --- /dev/null +++ b/hosts/blueberry/init-org.el @@ -0,0 +1,197 @@ +(require 'org) +(require 'org-element) +(require 'org-pomodoro) +(require 'org-contacts) +(require 'org-jira-protocol) +(require 'org-gogs-protocol) +(require 'org-sip-protocol) +(require 'org-debbugs-protocol) +(require 'org-bullets) +(require 'ob-js) +(require 'avy) +(require 'ivy) +(require 'org-gnome) +(require 's) + +(global-org-gnome-minor-mode 1) +(add-hook 'org-mode-hook #'org-indent-mode) + +;; preserve the indentation inside of source blocks +(setq org-src-preserve-indentation t) + +;; Allow's electric-pair-mode to surround things with = and ~ in org-mode +(modify-syntax-entry ?~ "(~" org-mode-syntax-table) +(modify-syntax-entry ?= "(=" org-mode-syntax-table) + +(add-to-list 'auto-mode-alist '("\\.org$" . org-mode)) + +(define-key global-map "\C-cl" #'org-store-link) +(define-key global-map "\C-ca" #'org-agenda) +(define-key global-map "\C-cb" #'org-iswitchb) +(define-key global-map "\C-cc" #'org-capture) +(define-key global-map "\C-cp" #'org-pomodoro) +(define-key org-mode-map (kbd "C-c C-j") #'avy-goto-word-1) +(define-key org-mode-map (kbd "C-c M-m") #'org-contacts-view-send-email) +(define-key org-agenda-mode-map (kbd "C-c C-j") #'avy-goto-word-1) +(define-key org-mode-map (kbd "M-i") #'nico-org-imenu) + +(defun nico-org-imenu (&optional arg) + "Like `counsel-imenu'. +With a prefix argument ARG, narrow the +buffer to the matched subtree." + (interactive "P") + (counsel-imenu) + (when arg + (org-narrow-to-subtree))) + +(org-babel-do-load-languages + 'org-babel-load-languages + '((ditaa . t) + (js . t) + (emacs-lisp . t))) + +;; Fontify org-mode code blocks +(setq org-src-fontify-natively t) + +(defvar nico/org-agenda-file "~/org/agenda.org") +(setq org-default-notes-file "~/org/inbox.org") + +(setq org-agenda-files `(,org-default-notes-file + ,nico/org-agenda-file + "~/org/gtd.org" + "~/org/tickler.org")) + +(setq org-refile-targets `(("~/org/gtd.org" :maxlevel . 3) + ("~/org/someday.org" :level . 1) + (,nico/org-agenda-file :level . 1) + ("~/org/tickler.org" :maxlevel . 2) + ("~/org/inbox.org" :maxlevel . 1))) + +(defun nico/find-notes-file () + (interactive) + (find-file org-default-notes-file)) + +;; Export TODO items in iCal too +(setq org-icalendar-include-todo t) + +;; org-capture +(setq org-capture-templates '()) +(add-to-list 'org-capture-templates + '("t" "Todo [inbox]" entry (file+headline org-default-notes-file "Tasks") + "* TODO %i%?")) +(add-to-list 'org-capture-templates + '("l" "Todo (with link) [inbox]" entry (file+headline org-default-notes-file "Tasks") + "* TODO %a")) +(add-to-list 'org-capture-templates + '("p" "Appointment" entry (file+headline nico/org-agenda-file "Appointment") + "* APPT %i%? \n %U")) +(add-to-list 'org-capture-templates + '("T" "Tickler" entry (file+headline "~/org/tickler.org" "Tickler") + "* %i%? \n %U")) +(add-to-list 'org-capture-templates + '("c" "Contacts" entry (file "~/org/contacts.org") + "* %(org-contacts-template-name) +:PROPERTIES: +:EMAIL: %(org-contacts-template-email) +:END:")) + +(defvar french-holiday + '((holiday-fixed 1 1 "Jour de l'an") + (holiday-fixed 5 1 "Fête du travail") + (holiday-fixed 5 8 "Victoire 45") + (holiday-fixed 7 14 "Fête nationale") + (holiday-fixed 8 15 "Assomption") + (holiday-fixed 11 1 "Toussaint") + (holiday-fixed 11 11 "Armistice 18") + (holiday-fixed 12 25 "Noël") + (holiday-easter-etc 1 "Lundi de Pâques") + (holiday-easter-etc 39 "Ascension") + (holiday-easter-etc 50 "Lundi de Pentecôte"))) + +(setq calendar-date-style 'european + calendar-holidays french-holiday + calendar-mark-holidays-flag t) + +(defun nico/org-archive-done-tasks () + "Archive all DONE entries" + (interactive) + (org-map-entries + (lambda () + (org-archive-subtree) + (setq org-map-continue-from (outline-previous-heading))) + "/DONE" 'file)) + +;; Custom agenda function, see customized 'org-agenda-custom-commands. +;; Open the agenda in org-agenda-log-mode, with the archive file, and +;; for the previous week. To work well, 'org-log-done should be set to +;; 't, to ensure that everything is in the agenda. +(defun nico/org-agenda-log (arg) + (org-agenda-archives-mode) + (org-agenda-list arg) + (org-agenda-log-mode) + (org-agenda-earlier 1)) + +(defun org-agenda-skip-all-siblings-but-first () + (let (should-skip-entry) + (unless (org-current-is-todo) + (setq should-skip-entry t)) + (save-excursion + (while (and (not should-skip-entry) (org-goto-sibling t)) + (when (org-current-is-todo) + (setq should-skip-entry t)))) + (when should-skip-entry + (or (outline-next-heading) + (goto-char (point-max)))))) + +(defun org-current-is-todo () + (string= "TODO" (org-get-todo-state))) + + + +(defun org-agenda-format-parent (n) + ;; (s-truncate n (org-format-outline-path (org-get-outline-path))) + (save-excursion + (save-restriction + (widen) + (org-up-heading-safe) + (s-truncate n (org-get-heading t t))))) + +(add-hook 'before-save-hook + #'nico/org-align-all-tags) + +(defun nico/org-align-all-tags () + (interactive) + (when (eq major-mode 'org-mode) + (org-align-all-tags))) + +(defun nico/org-update-parent-cookie () + (when (eq 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) + (nico/org-update-parent-cookie)) + +(defadvice kill-whole-line (after fix-cookies activate) + (nico/org-update-parent-cookie)) + +(defadvice org-archive-subtree (after fix-cookies activate) + (nico/org-update-parent-cookie)) + +;; (add-hook 'after-save-hook +;; #'nico/org-export-buffer) + +(defun nico/org-export-buffer () + (let* ((file-name (buffer-file-name)) + (file-exists (and file-name + (file-exists-p file-name)))) + (when (and file-name (eq major-mode 'org-mode)) + (org-export-to-file 'html (format "%s.html" (file-name-sans-extension file-name)))))) + +(org-babel-do-load-languages + 'org-babel-load-languages + '((sh . t))) + +(provide 'init-org) diff --git a/hosts/blueberry/init-prodigy.el b/hosts/blueberry/init-prodigy.el new file mode 100644 index 0000000..fbc69a6 --- /dev/null +++ b/hosts/blueberry/init-prodigy.el @@ -0,0 +1,36 @@ +(require 'prodigy) + +(prodigy-define-service + :name "nicolas-petton.fr" + :cwd "/home/nico/Public/nicolas-petton.fr" + :command "python" + :args '("-m" "SimpleHTTPServer" "6002") + :port 6002 + :tags '(personal)) + +(prodigy-define-service + :name "aurelia.saout.fr" + :cwd "/home/nico/work/aurelia.saout.fr" + :command "jekyll" + :args '("serve" "--watch" "-P" "4002") + :port 4002 + :tags '(personal)) + +(prodigy-define-service + :name "public/" + :cwd "/home/nico/Public/" + :command "python" + :args '("-m" "SimpleHTTPServer" "4003") + :port 4003 + :tags '(personal)) + +(prodigy-define-service + :name "Amber documentation" + :cwd "/home/nico/work/smalltalk/amber-documentation/" + :command "jekyll" + :args '("serve" "--watch" "-P" "4001") + :port 4001 + :tags '(personal)) + + +(provide 'init-prodigy) diff --git a/hosts/blueberry/init-strawberry-appearance.el b/hosts/blueberry/init-strawberry-appearance.el new file mode 100644 index 0000000..9942308 --- /dev/null +++ b/hosts/blueberry/init-strawberry-appearance.el @@ -0,0 +1,4 @@ +(when (window-system) + (set-face-attribute 'default nil :height 110 :family "Fira Mono")) + +(provide 'init-strawberry-appearance) diff --git a/hosts/blueberry/init-strawberry.el b/hosts/blueberry/init-strawberry.el new file mode 100644 index 0000000..57a5b8c --- /dev/null +++ b/hosts/blueberry/init-strawberry.el @@ -0,0 +1,10 @@ +(require 'init-notmuch) +(require 'init-org) +(require 'init-org-publish) +(require 'init-latex) +(require 'init-prodigy) +(require 'init-ledger) +(require 'init-strawberry-appearance) +(require 'init-epg) + +(provide 'init-strawberry) diff --git a/hosts/losedows/init-losedows.el b/hosts/losedows/init-losedows.el new file mode 100644 index 0000000..527ba27 --- /dev/null +++ b/hosts/losedows/init-losedows.el @@ -0,0 +1,4 @@ +(require 'init-win-appearance) +;; (require 'init-omnisharp) + +(provide 'init-losedows) diff --git a/hosts/losedows/init-omnisharp.el b/hosts/losedows/init-omnisharp.el new file mode 100644 index 0000000..1f43fa6 --- /dev/null +++ b/hosts/losedows/init-omnisharp.el @@ -0,0 +1,9 @@ +(require 'omnisharp) +(require 'company) + +(eval-after-load 'company + '(add-to-list 'company-backends 'company-omnisharp)) + +(add-hook 'csharp-mode-hook #'omnisharp-mode) + +(provide 'init-omnisharp) diff --git a/hosts/losedows/init-win-appearance.el b/hosts/losedows/init-win-appearance.el new file mode 100644 index 0000000..44919e9 --- /dev/null +++ b/hosts/losedows/init-win-appearance.el @@ -0,0 +1,4 @@ +(when (window-system) + (set-face-attribute 'default nil :height 120 :family "Consolas")) + +(provide 'init-win-appearance) diff --git a/hosts/strawberry b/hosts/strawberry new file mode 120000 index 0000000..70c40e1 --- /dev/null +++ b/hosts/strawberry @@ -0,0 +1 @@ +/home/nico/.emacs.d/hosts/blueberry \ No newline at end of file diff --git a/indium-workspaces.el b/indium-workspaces.el new file mode 100644 index 0000000..8c1252b --- /dev/null +++ b/indium-workspaces.el @@ -0,0 +1,2 @@ +;; This file is automatically generated by the Indium. +(setq indium-workspaces '("/home/nico/work/ftgp/monitor/monitor/Monitor.Web.Ui/")) \ No newline at end of file diff --git a/init.el b/init.el index 16ffe3c..fa5e18c 100644 --- a/init.el +++ b/init.el @@ -16,9 +16,12 @@ (setq initial-buffer-choice t) (setq initial-scratch-message "") (setq load-prefer-newer t) + (defalias 'yes-or-no-p 'y-or-n-p) (scroll-bar-mode 0) (tool-bar-mode 0) - (menu-bar-mode 0)) + (menu-bar-mode 0) + (delete-selection-mode 1) + (column-number-mode 1)) (progn ; `borg' (add-to-list 'load-path (expand-file-name "lib/borg" user-emacs-directory)) @@ -63,6 +66,93 @@ ;;; Long tail +(use-package abbrev + :diminish "" + :config + (setq save-abbrevs 'silently) + (setq-default abbrev-mode t)) + +(use-package anzu + :config (global-anzu-mode) + :bind (([remap query-replace] . anzu-query-replace) + ([remap query-replace-regexp] . anzu-query-replace-regexp) + :map isearch-mode-map + ([remap isearch-query-replace] . anzu-isearch-query-replace) + ([remap isearch-query-replace-regexp] . anzu-isearch-query-replace-regexp))) + +(use-package apg) + +(use-package auth-password-store + :config (auth-pass-enable)) + +(use-package autorevert + :config + (global-auto-revert-mode 1) + + ;; auto-update dired buffers + (setq global-auto-revert-non-file-buffers t + auto-revert-verbose nil)) + +(use-package avy + :bind ("C-c C-j" . avy-goto-word-1)) + +(use-package beginend + :diminish "" + :config (beginend-global-mode)) + +(use-package browse-url + :config + (setq browse-url-generic-program (executable-find "firefox"))) + +(use-package buffer-watcher) + +(use-package cider + :config + (defun setup-clojure-buffer () + (eldoc-mode) + (clj-refactor-mode 1) + (paredit-mode 1) + (setq indent-tabs-mode nil)) + + (add-hook 'clojure-mode-hook #'setup-clojure-buffer) + (add-hook 'cider-mode-hook #'cider-turn-on-eldoc-mode) + + (setq cider-repl-use-clojure-font-lock t + cider-repl-use-pretty-printing t + cider-repl-wrap-history t + cider-repl-history-size 3000 + cider-interactive-eval-result-prefix ";; => ")) + +(use-package clj-refactor + :config + (cljr-add-keybindings-with-prefix "C-c C-r")) + +(use-package company + :diminish "" + :config + (add-hook 'prog-mode-hook 'company-mode) + (setq company-idle-delay 0.5) + (setq company-tooltip-limit 10) + (setq company-minimum-prefix-length 2) + (setq company-tooltip-flip-when-above t)) + +(use-package company-dabbrev + :config + (setq company-dabbrev-ignore-case t) + (setq company-dabbrev-downcase nil)) + +(use-package counsel + :config (global-set-key (kbd "M-x") #'counsel-M-x) + (global-set-key (kbd "C-x C-f") #'counsel-find-file) + (global-set-key (kbd "M-i") #'counsel-imenu) + (global-set-key (kbd "M-y") #'counsel-yank-pop)) + +(use-package counsel-projectile + :config (counsel-projectile-on)) + +(use-package dabbrev + :bind (("S-SPC" . dabbrev-expand))) + (use-package dash :config (dash-enable-font-lock)) @@ -72,24 +162,206 @@ (global-diff-hl-mode) (add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh t)) +(use-package diminish + :config + (diminish 'auto-revert-mode) + (diminish 'outline-minor-mode)) + (use-package dired :defer t - :config (setq dired-listing-switches "-alh")) + :bind (:map dired-mode-map + ("M-s" . find-name-dired) + ("C-k" . dired-kill-subdir)) + :config + (add-hook 'dired-mode-hook #'dired-hide-details-mode) + (setq dired-listing-switches "-alh") + (setq dired-dwim-target t) + (put 'dired-find-alternate-file 'disabled nil)) + +(use-package dired-x + :config + (add-hook 'dired-mode-hook #'dired-omit-mode) + (setq dired-omit-files "^\\...+$")) + +(use-package drag-stuff + :config + (drag-stuff-global-mode t) + (drag-stuff-define-keys) + (add-to-list 'drag-stuff-except-modes 'org-mode) + (add-to-list 'drag-stuff-except-modes 'rebase-mode) + (add-to-list 'drag-stuff-except-modes 'emacs-lisp-mode)) + +(use-package duplicate-thing + :bind ("M-D" . duplicate-thing)) + +(use-package ediff + :config + ;; window positioning & frame setup + (setq ediff-window-setup-function 'ediff-setup-windows-plain + ediff-split-window-function 'split-window-horizontally)) (use-package eldoc :config (global-eldoc-mode)) +(use-package elec-pair + :config + (electric-pair-mode t)) + +(use-package electric + :config (electric-indent-mode t)) + +(use-package erc + :config + (setq erc-email-userid "NicolasPetton" + erc-autojoin-channels-alist '(("freenode.net" . ("#emacs"))))) + +(use-package eshell + :config + (use-package shell-switcher + :config + (setq shell-switcher-mode t)) + + (setq eshell-banner-message (concat " Welcome to Eshell, " + user-login-name + "!\n _\n _|_|_\n (o o)\n ooO--(_)--Ooo-\n\n Oh, Nice hat.\n\n")) + (eval-after-load 'esh-opt + '(progn + (require 'em-prompt) + (require 'em-term) + (require 'em-cmpl) + (setenv "PAGER" "cat") + (add-hook 'eshell-mode-hook ;; for some reason this needs to be a hook + (lambda () + (company-mode) + (define-key eshell-mode-map "\C-a" #'eshell-bol) + (define-key eshell-mode-map (kbd "M-r") #'nico-eshell-hist-input))) + + (add-to-list 'eshell-visual-commands "ssh") + (add-to-list 'eshell-visual-commands "htop") + (add-to-list 'eshell-visual-commands "top") + (add-to-list 'eshell-visual-commands "tail") + (add-to-list 'eshell-visual-commands "vim") + (add-to-list 'eshell-visual-commands "bower") + (add-to-list 'eshell-visual-commands "npm") + + (add-to-list 'eshell-command-completions-alist + '("gunzip" "gz\\'")) + (add-to-list 'eshell-command-completions-alist + '("tar" "\\(\\.tar|\\.tgz\\|\\.tar\\.gz\\)\\'")))) + + (when (not (functionp 'eshell/rgrep)) + (defun eshell/rgrep (&rest args) + "Use Emacs grep facility instead of calling external grep." + (eshell-grep "rgrep" args t)))) + +(use-package exec-path-from-shell + :config (exec-path-from-shell-initialize)) + +(use-package expand-region + :bind (("C-=" . er/expand-region))) + +(use-package files + :config + (setq delete-old-versions t + kept-new-versions 6 + kept-old-versions 2 + version-control t + nico/backup-directory "~/.tmp") + (setq backup-directory-alist + `((".*" . ,nico/backup-directory))) + (setq auto-save-file-name-transforms + `((".*" ,nico/backup-directory t))) + (setq create-lockfiles nil)) + +(use-package flycheck + :config (add-hook 'prog-mode-hook #'flycheck-mode)) + +(use-package flyspell + :bind (:map flyspell-mode-map + ("C-;" . nil)) + :config + (add-hook 'prog-mode-hook #'flyspell-prog-mode) + (dolist (mode-hook '(text-mode-hook LaTeX-mode-hook)) + (add-hook mode-hook #'flyspell-mode))) + +(use-package gnus-dired + :bind (:map gnus-dired-mode-map + ("C-x C-a" . gnus-dired-attach)) + :config (add-hook 'dired-mode-hook #'turn-on-gnus-dired-mode)) + (use-package help :defer t :config (temp-buffer-resize-mode)) +(use-package ibuffer + :bind (("C-x C-b" . ibuffer))) + +(use-package ispell + :config + (defun ispell-word-then-abbrev (p) + "Call `ispell-word', then create an abbrev for it. +With prefix P, create local abbrev. Otherwise it will +be global." + (interactive "P") + (let (bef aft) + (save-excursion + (while (progn + (backward-word) + (and (setq bef (thing-at-point 'word)) + (not (ispell-word nil 'quiet))))) + (setq aft (thing-at-point 'word))) + (when (and aft bef (not (equal aft bef))) + (setq aft (downcase aft)) + (setq bef (downcase bef)) + (define-abbrev + (if p local-abbrev-table global-abbrev-table) + bef aft) + (write-abbrev-file) + (message "\"%s\" now expands to \"%s\" %sally" + bef aft (if p "loc" "glob"))))) + + (define-key ctl-x-map "\C-i" #'ispell-word-then-abbrev)) + +(use-package ivy + :diminish "" + :config + (ivy-mode 1) + (setq ivy-use-virtual-buffers t)) + (progn ; `isearch' (setq isearch-allow-scroll t)) +(use-package js2-mode + :mode "\\.js\\'" + :config + (defun js2-show-node-at-point () + (interactive) + (js2-show-node (js2-node-at-point))) + + (defun js2-show-node-parent-at-point () + (interactive) + (js2-show-node (js2-node-parent (js2-node-at-point)))) + + (defun js2-show-node (node) + (let* ((buf (get-buffer-create "*js2-node-at-point*")) + (node-contents (buffer-substring (js2-node-abs-pos node) (js2-node-abs-end node)))) + (with-current-buffer + (set-buffer buf) + (delete-region (point-min) (point-max)) + (insert node-contents)))) + + (use-package emacs-js + :init + (add-to-list 'load-path + (expand-file-name "lib/emacs-js/widgetjs" user-emacs-directory))) + (use-package klassified) + (use-package ftgp)) + +(use-package less-css-mode) + (use-package lisp-mode :config (add-hook 'emacs-lisp-mode-hook 'outline-minor-mode) - (add-hook 'emacs-lisp-mode-hook 'reveal-mode) (defun indent-spaces-mode () (setq indent-tabs-mode nil)) (add-hook 'lisp-interaction-mode-hook #'indent-spaces-mode)) @@ -97,7 +369,9 @@ (use-package magit :defer t :bind (("C-x g" . magit-status) - ("C-x M-g" . magit-dispatch-popup)) + ("C-x M-g" . magit-dispatch-popup) + :map magit-mode-map + ("C" . magit-commit-add-log)) :config (magit-add-section-hook 'magit-status-sections-hook 'magit-insert-modules-unpulled-from-upstream @@ -113,25 +387,68 @@ 'magit-insert-unpulled-from-upstream) (magit-add-section-hook 'magit-status-sections-hook 'magit-insert-submodules - 'magit-insert-unpulled-from-upstream)) + 'magit-insert-unpulled-from-upstream) + (setq magit-default-tracking-name-function #'magit-default-tracking-name-branch-only)) (use-package man :defer t :config (setq Man-width 80)) +(use-package multiple-cursors + :bind (("M-RET" . mc/edit-lines) + ("C-<" . mc/mark-previous-like-this) + ("C->" . mc/mark-next-like-this) + ("C-M-<" . mc/unmark-next-like-this) + ("C-M->" . mc/unmark-previous-like-this) + ("C-c C-<" . mc/mark-all-like-this))) + +(use-package org + :init + (add-to-list 'load-path (expand-file-name "lib/org/contrib/lisp" + user-emacs-directory))) + +(use-package paredit + :diminish "" + :bind (:map paredit-mode-map + ("M-s" . nil)) + :config + (add-hook 'emacs-lisp-mode-hook #'paredit-mode)) + (use-package paren :config (show-paren-mode)) +(use-package pass + :mode ("org/reference/password-store/" . pass-view-mode) + :bind ("C-x p" . pass)) + +(use-package projectile + :diminish "" + :config (projectile-mode)) + (use-package prog-mode :config (global-prettify-symbols-mode) (defun indicate-buffer-boundaries-left () (setq indicate-buffer-boundaries 'left)) (add-hook 'prog-mode-hook #'indicate-buffer-boundaries-left)) +(use-package rainbow-mode + :config + (add-hook 'css-mode-hook 'rainbow-mode) + (add-hook 'less-mode-hook 'rainbow-mode)) + (use-package recentf :demand t :config (add-to-list 'recentf-exclude "^/\\(?:ssh\\|su\\|sudo\\)?:")) +(use-package restclient + :init + (add-to-list 'load-path (expand-file-name "lib/know-your-http-well/emacs" user-emacs-directory)) + :config + (use-package company-restclient + :config + (add-to-list 'company-backend 'company-restclient) + (add-hook 'restclient-mode-hook #'company-mode-on))) + (use-package savehist :config (savehist-mode)) @@ -141,6 +458,29 @@ (use-package simple :config (column-number-mode)) +(use-package slime + :config + (setq inferior-lisp-program "/usr/bin/sbcl") + (slime-setup)) + +(use-package sudo-edit) + +(use-package tabify + :config + (defun tabify-buffer () + (interactive) + (tabify (point-min) (point-max))) + + (defun untabify-buffer () + (interactive) + (untabify (point-min) (point-max)))) + +(use-package tern + :defer t + :init + (add-to-list 'load-path (expand-file-name "lib/tern/emacs" + user-emacs-directory))) + (progn ; `text-mode' (add-hook 'text-mode-hook #'indicate-buffer-boundaries-left)) @@ -152,6 +492,72 @@ (add-to-list 'tramp-default-proxies-alist (list (regexp-quote (system-name)) nil nil))) +(use-package tunnel) + +(use-package uniquify + :config + (setq uniquify-buffer-name-style 'forward)) + +(use-package web-mode + :defer t + :config + (add-to-list 'auto-mode-alist '("\\.html\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.htm\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.phtml\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.tpl\\.php\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.[agj]sp\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.as[cp]x\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.mustache\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode)) + + (setq web-mode-css-indent-offset 2)) + +(use-package whitespace + :config + (setq whitespace-display-mappings + '( + (space-mark 32 [183] [46]) ; normal space, · + (space-mark 160 [164] [95]) + (space-mark 2208 [2212] [95]) + (space-mark 2336 [2340] [95]) + (space-mark 3616 [3620] [95]) + (space-mark 3872 [3876] [95]) + (newline-mark 10 [182 10]) ; newlne, ¶ + (tab-mark 9 [9655 9] [92 9]) ; tab, ▷ + ))) + +(use-package winner + :bind ("C-|". winner-undo) + :config (winner-more)) + +(use-package workflow) + +(use-package ws-butler + :config + (add-hook 'prog-mode-hook #'ws-butler-mode)) + +(use-package zerodark-theme + :config + + (defun set-selected-frame-dark () + (interactive) + (let ((frame-name (cdr (assq 'name (frame-parameters (selected-frame)))))) + (call-process-shell-command + (format + "xprop -f _GTK_THEME_VARIANT 8u -set _GTK_THEME_VARIANT 'dark' -name '%s'" + frame-name)))) + + (when (window-system) + (load-theme 'zerodark t) + (zerodark-setup-modeline-format) + (set-selected-frame-dark) + (setq frame-title-format '(buffer-file-name "%f" ("%b"))))) + +(use-package zoom-frm + :bind (("C-+" . zoom-frm-in) + ("C--" . zoom-frm-out))) + (progn ; startup (message "Loading %s...done (%.3fs)" user-init-file (float-time (time-subtract (current-time) @@ -164,12 +570,32 @@ before-user-init-time)))) t)) +(progn ; local packages + (let ((dir (expand-file-name "local" user-emacs-directory))) + (when (file-exists-p dir) + (add-to-list 'load-path dir)))) + (progn ; personalize (let ((file (expand-file-name (concat (user-real-login-name) ".el") user-emacs-directory))) (when (file-exists-p file) (load file)))) +(progn ; host-specific setup + (let* ((host (substring (shell-command-to-string "hostname") 0 -1)) + (host-dir (concat "~/.emacs.d/hosts/" host))) + (add-to-list 'load-path host-dir) + (let ((default-directory host-dir)) + (normal-top-level-add-subdirs-to-load-path)) + (let ((init-host-feature (intern (concat "init-" host)))) + (require init-host-feature nil t)))) + +(progn ; private modules + (let ((private-dir "~/.priv/elisp")) + (when (file-exists-p private-dir) + (add-to-list 'load-path private-dir) + (require 'private-modules nil t)))) + ;; Local Variables: ;; indent-tabs-mode: nil ;; End: diff --git a/lib/ag b/lib/ag new file mode 160000 index 0000000..2718190 --- /dev/null +++ b/lib/ag @@ -0,0 +1 @@ +Subproject commit 2718190a0202aa4ab02b1f1f3d6ba7b996b69d6d diff --git a/lib/alert b/lib/alert new file mode 160000 index 0000000..affbbc5 --- /dev/null +++ b/lib/alert @@ -0,0 +1 @@ +Subproject commit affbbc5f359a7abcf50f4509b712fc7a80843f51 diff --git a/lib/all-the-icons b/lib/all-the-icons new file mode 160000 index 0000000..7134b74 --- /dev/null +++ b/lib/all-the-icons @@ -0,0 +1 @@ +Subproject commit 7134b7467a7061b57c8cda3503e9644d4ed92a2a diff --git a/lib/amd-mode b/lib/amd-mode new file mode 160000 index 0000000..11e2744 --- /dev/null +++ b/lib/amd-mode @@ -0,0 +1 @@ +Subproject commit 11e27444692bbf0eb38ec28af6bd041618c5c091 diff --git a/lib/anzu b/lib/anzu new file mode 160000 index 0000000..e6c56ca --- /dev/null +++ b/lib/anzu @@ -0,0 +1 @@ +Subproject commit e6c56ca8b23ac433f7be58b6f3f50801dd4164e4 diff --git a/lib/auth-password-store b/lib/auth-password-store new file mode 160000 index 0000000..e8d8733 --- /dev/null +++ b/lib/auth-password-store @@ -0,0 +1 @@ +Subproject commit e8d8733b1af67e4ea088d1ed015c554171feecb9 diff --git a/lib/avy b/lib/avy new file mode 160000 index 0000000..f2bedee --- /dev/null +++ b/lib/avy @@ -0,0 +1 @@ +Subproject commit f2bedeeb5804a4863bb53aca6f77195f7d530c38 diff --git a/lib/beginend b/lib/beginend new file mode 160000 index 0000000..28806d0 --- /dev/null +++ b/lib/beginend @@ -0,0 +1 @@ +Subproject commit 28806d09207e4a194a39eb385650824a0121e0cd diff --git a/lib/buffer-watcher b/lib/buffer-watcher new file mode 160000 index 0000000..76d8cce --- /dev/null +++ b/lib/buffer-watcher @@ -0,0 +1 @@ +Subproject commit 76d8cce9102087bb077fecd23e5ad861724d8c85 diff --git a/lib/cider b/lib/cider new file mode 160000 index 0000000..238c60c --- /dev/null +++ b/lib/cider @@ -0,0 +1 @@ +Subproject commit 238c60c6320e78d46591fee8b947e25fd855818b diff --git a/lib/clj-refactor b/lib/clj-refactor new file mode 160000 index 0000000..769eb06 --- /dev/null +++ b/lib/clj-refactor @@ -0,0 +1 @@ +Subproject commit 769eb06ac82dff8aa0239b9ca47cf3240ff0857f diff --git a/lib/clojure-mode b/lib/clojure-mode new file mode 160000 index 0000000..eacd330 --- /dev/null +++ b/lib/clojure-mode @@ -0,0 +1 @@ +Subproject commit eacd330f28513276da18e4d6f2607f9041314c49 diff --git a/lib/company b/lib/company new file mode 160000 index 0000000..a43f944 --- /dev/null +++ b/lib/company @@ -0,0 +1 @@ +Subproject commit a43f9446b09b52f8e87a685871476eae96ffd75f diff --git a/lib/company-restclient b/lib/company-restclient new file mode 160000 index 0000000..7b41cd5 --- /dev/null +++ b/lib/company-restclient @@ -0,0 +1 @@ +Subproject commit 7b41cd58ffdf965480f1cf52d58d718009ba6fe7 diff --git a/lib/company-tern b/lib/company-tern new file mode 160000 index 0000000..10ac058 --- /dev/null +++ b/lib/company-tern @@ -0,0 +1 @@ +Subproject commit 10ac058b065ae73c1f30e9fb7d969dd1a79387be diff --git a/lib/counsel-projectile b/lib/counsel-projectile new file mode 160000 index 0000000..aefd25c --- /dev/null +++ b/lib/counsel-projectile @@ -0,0 +1 @@ +Subproject commit aefd25c74718e66f180127c0d273eade887325b0 diff --git a/lib/diminish b/lib/diminish new file mode 160000 index 0000000..d5c61a1 --- /dev/null +++ b/lib/diminish @@ -0,0 +1 @@ +Subproject commit d5c61a14e1a5590a65f83c099a5bd42fcadff24d diff --git a/lib/drag-stuff b/lib/drag-stuff new file mode 160000 index 0000000..d49fe37 --- /dev/null +++ b/lib/drag-stuff @@ -0,0 +1 @@ +Subproject commit d49fe376d24f0f8ac5ade67b6d7fccc2487c81db diff --git a/lib/duplicate-thing b/lib/duplicate-thing new file mode 160000 index 0000000..f6ed023 --- /dev/null +++ b/lib/duplicate-thing @@ -0,0 +1 @@ +Subproject commit f6ed0232fd0653621afe450d53775a32a9d0e328 diff --git a/lib/edn b/lib/edn new file mode 160000 index 0000000..be9e32d --- /dev/null +++ b/lib/edn @@ -0,0 +1 @@ +Subproject commit be9e32d1b49e35247b263b0243df7cfdc8d413ab diff --git a/lib/emacs-js b/lib/emacs-js new file mode 160000 index 0000000..74daf28 --- /dev/null +++ b/lib/emacs-js @@ -0,0 +1 @@ +Subproject commit 74daf284e32bf84d29377d1d7a638b640ebf8f76 diff --git a/lib/epl b/lib/epl new file mode 160000 index 0000000..a5ad061 --- /dev/null +++ b/lib/epl @@ -0,0 +1 @@ +Subproject commit a5ad061d0a5eb42f66c384e55d102da7d52c96b0 diff --git a/lib/eslintd-fix b/lib/eslintd-fix new file mode 160000 index 0000000..afa5cd1 --- /dev/null +++ b/lib/eslintd-fix @@ -0,0 +1 @@ +Subproject commit afa5cd1c1fb644a918e410ef396392b841146632 diff --git a/lib/exec-path-from-shell b/lib/exec-path-from-shell new file mode 160000 index 0000000..5e355fb --- /dev/null +++ b/lib/exec-path-from-shell @@ -0,0 +1 @@ +Subproject commit 5e355fbc50913d1ffe48bf86df0bcecd8b369ffb diff --git a/lib/expand-region b/lib/expand-region new file mode 160000 index 0000000..2357f1d --- /dev/null +++ b/lib/expand-region @@ -0,0 +1 @@ +Subproject commit 2357f1d5efd9d5b9e37f3513342237fec2629291 diff --git a/lib/f b/lib/f new file mode 160000 index 0000000..fabdbd4 --- /dev/null +++ b/lib/f @@ -0,0 +1 @@ +Subproject commit fabdbd4a4a8caf8684f0fa656f457a03c5dfa4de diff --git a/lib/flycheck b/lib/flycheck new file mode 160000 index 0000000..db3a745 --- /dev/null +++ b/lib/flycheck @@ -0,0 +1 @@ +Subproject commit db3a745edb6b2678286e4d2bccebbb8d388c1a9e diff --git a/lib/font-lock+ b/lib/font-lock+ new file mode 160000 index 0000000..2386495 --- /dev/null +++ b/lib/font-lock+ @@ -0,0 +1 @@ +Subproject commit 238649549c531c84ad627a095a6eef489f52d109 diff --git a/lib/frame-cmds b/lib/frame-cmds new file mode 160000 index 0000000..d535977 --- /dev/null +++ b/lib/frame-cmds @@ -0,0 +1 @@ +Subproject commit d535977b6f0c228ee1154d05f146c93ee6f92869 diff --git a/lib/frame-fns b/lib/frame-fns new file mode 160000 index 0000000..af0e580 --- /dev/null +++ b/lib/frame-fns @@ -0,0 +1 @@ +Subproject commit af0e5802415669638ba6e5a154597416facee8f7 diff --git a/lib/ftgp b/lib/ftgp new file mode 160000 index 0000000..0ffb822 --- /dev/null +++ b/lib/ftgp @@ -0,0 +1 @@ +Subproject commit 0ffb82293706b7af5252641c937f3f7e2055c35e diff --git a/lib/gnome-calendar b/lib/gnome-calendar new file mode 160000 index 0000000..489f9f1 --- /dev/null +++ b/lib/gnome-calendar @@ -0,0 +1 @@ +Subproject commit 489f9f15f7bb35696b1cc19db75b554ae8328df2 diff --git a/lib/grunt b/lib/grunt new file mode 160000 index 0000000..4c269e2 --- /dev/null +++ b/lib/grunt @@ -0,0 +1 @@ +Subproject commit 4c269e2738658643ec2ed9ef61a2a3d71b08d304 diff --git a/lib/gulp-task-runner b/lib/gulp-task-runner new file mode 160000 index 0000000..f13da9e --- /dev/null +++ b/lib/gulp-task-runner @@ -0,0 +1 @@ +Subproject commit f13da9e619c1838571df0a0462c273ed6e76defc diff --git a/lib/hierarchy b/lib/hierarchy new file mode 160000 index 0000000..d26f566 --- /dev/null +++ b/lib/hierarchy @@ -0,0 +1 @@ +Subproject commit d26f566d386a56e752d8ca1c813932d68b088bde diff --git a/lib/hydra b/lib/hydra new file mode 160000 index 0000000..38ce88a --- /dev/null +++ b/lib/hydra @@ -0,0 +1 @@ +Subproject commit 38ce88a9c3be11b0431080078095159b2211ca7a diff --git a/lib/indium b/lib/indium new file mode 160000 index 0000000..e9b0104 --- /dev/null +++ b/lib/indium @@ -0,0 +1 @@ +Subproject commit e9b0104bb36b1ce349bf048979746e0ad738d43d diff --git a/lib/ivy b/lib/ivy new file mode 160000 index 0000000..7460626 --- /dev/null +++ b/lib/ivy @@ -0,0 +1 @@ +Subproject commit 746062683444348a4e7e0edd2a42581cbe66dcb1 diff --git a/lib/js2-mode b/lib/js2-mode new file mode 160000 index 0000000..8a5f492 --- /dev/null +++ b/lib/js2-mode @@ -0,0 +1 @@ +Subproject commit 8a5f492c7ed427a3bdb1125e26a836e582bd2492 diff --git a/lib/js2-refactor b/lib/js2-refactor new file mode 160000 index 0000000..6ee3158 --- /dev/null +++ b/lib/js2-refactor @@ -0,0 +1 @@ +Subproject commit 6ee315825b6f0424f15a8520733dc145c85ccd83 diff --git a/lib/jump b/lib/jump new file mode 160000 index 0000000..95a9559 --- /dev/null +++ b/lib/jump @@ -0,0 +1 @@ +Subproject commit 95a9559bd301ff86fa3b72b15126dc4851ce4a69 diff --git a/lib/klassified b/lib/klassified new file mode 160000 index 0000000..3d1e26a --- /dev/null +++ b/lib/klassified @@ -0,0 +1 @@ +Subproject commit 3d1e26a4dabd2ba77553ee3d3da728ce6a855b6b diff --git a/lib/know-your-http-well b/lib/know-your-http-well new file mode 160000 index 0000000..3cc5ab6 --- /dev/null +++ b/lib/know-your-http-well @@ -0,0 +1 @@ +Subproject commit 3cc5ab6d2764ab7aacb1b6e026abaccbeb6c37f2 diff --git a/lib/ledger-mode b/lib/ledger-mode new file mode 160000 index 0000000..1afc0c9 --- /dev/null +++ b/lib/ledger-mode @@ -0,0 +1 @@ +Subproject commit 1afc0c9a3b1a25fdf510c13bf7764f6c4867a897 diff --git a/lib/less-css-mode b/lib/less-css-mode new file mode 160000 index 0000000..59bf174 --- /dev/null +++ b/lib/less-css-mode @@ -0,0 +1 @@ +Subproject commit 59bf174c4e9f053ec2a7ef8c8a8198490390f6fb diff --git a/lib/makey b/lib/makey new file mode 160000 index 0000000..a61781e --- /dev/null +++ b/lib/makey @@ -0,0 +1 @@ +Subproject commit a61781e69d3b451551e269446e1c5f624ab81137 diff --git a/lib/memoize b/lib/memoize new file mode 160000 index 0000000..b55eab0 --- /dev/null +++ b/lib/memoize @@ -0,0 +1 @@ +Subproject commit b55eab0cb6ab05d941e07b8c01f1655c0cf1dd75 diff --git a/lib/multiple-cursors b/lib/multiple-cursors new file mode 160000 index 0000000..ddbe3ae --- /dev/null +++ b/lib/multiple-cursors @@ -0,0 +1 @@ +Subproject commit ddbe3ae932b6564c7429c3b2507510093ed1f3aa diff --git a/lib/notmuch b/lib/notmuch new file mode 160000 index 0000000..a83ab29 --- /dev/null +++ b/lib/notmuch @@ -0,0 +1 @@ +Subproject commit a83ab29930161d999ad1c45b6eb9cfbaa5e90ceb diff --git a/lib/org b/lib/org new file mode 160000 index 0000000..62ce814 --- /dev/null +++ b/lib/org @@ -0,0 +1 @@ +Subproject commit 62ce81413023bee8a14a9dc7c4e9f8d98058eb51 diff --git a/lib/org-bullets b/lib/org-bullets new file mode 160000 index 0000000..b70ac2e --- /dev/null +++ b/lib/org-bullets @@ -0,0 +1 @@ +Subproject commit b70ac2ec805bcb626a6e39ea696354577c681b36 diff --git a/lib/org-gnome b/lib/org-gnome new file mode 160000 index 0000000..122e14c --- /dev/null +++ b/lib/org-gnome @@ -0,0 +1 @@ +Subproject commit 122e14cf6f8104150a65246a9a7c10e1d7939862 diff --git a/lib/org-gnome-calendar b/lib/org-gnome-calendar new file mode 160000 index 0000000..85881c3 --- /dev/null +++ b/lib/org-gnome-calendar @@ -0,0 +1 @@ +Subproject commit 85881c3ea13e4597004d64d30c8d7b1ffe13045a diff --git a/lib/org-pomodoro b/lib/org-pomodoro new file mode 160000 index 0000000..4b1d650 --- /dev/null +++ b/lib/org-pomodoro @@ -0,0 +1 @@ +Subproject commit 4b1d650b8d0b607a616a8c792da428334fe635f7 diff --git a/lib/paredit b/lib/paredit new file mode 160000 index 0000000..99829aa --- /dev/null +++ b/lib/paredit @@ -0,0 +1 @@ +Subproject commit 99829aa423c9e8dd1be8d64c4b68982cf4c1559b diff --git a/lib/pass b/lib/pass new file mode 160000 index 0000000..b4c3bd9 --- /dev/null +++ b/lib/pass @@ -0,0 +1 @@ +Subproject commit b4c3bd9130044c4e106bac5ba73a50822865e258 diff --git a/lib/password-store b/lib/password-store new file mode 160000 index 0000000..92bac55 --- /dev/null +++ b/lib/password-store @@ -0,0 +1 @@ +Subproject commit 92bac5581bdf1edc5734e653543a66bad7a2295c diff --git a/lib/peg b/lib/peg new file mode 160000 index 0000000..081efec --- /dev/null +++ b/lib/peg @@ -0,0 +1 @@ +Subproject commit 081efeca91d790c7fbc90871ac22c40935f4833b diff --git a/lib/pkg-info b/lib/pkg-info new file mode 160000 index 0000000..76ba741 --- /dev/null +++ b/lib/pkg-info @@ -0,0 +1 @@ +Subproject commit 76ba7415480687d05a4353b27fea2ae02b8d9d61 diff --git a/lib/prodigy b/lib/prodigy new file mode 160000 index 0000000..50a5d4e --- /dev/null +++ b/lib/prodigy @@ -0,0 +1 @@ +Subproject commit 50a5d4e0c720e73ef0919cf8019a32d934e86616 diff --git a/lib/projectile b/lib/projectile new file mode 160000 index 0000000..56e262d --- /dev/null +++ b/lib/projectile @@ -0,0 +1 @@ +Subproject commit 56e262dd3b5998d0dc6a590d06bc11058839c588 diff --git a/lib/queue b/lib/queue new file mode 160000 index 0000000..7bc5d82 --- /dev/null +++ b/lib/queue @@ -0,0 +1 @@ +Subproject commit 7bc5d823b226962ee01531c42df5f0d530ca6f83 diff --git a/lib/rainbow-mode b/lib/rainbow-mode new file mode 160000 index 0000000..313f105 --- /dev/null +++ b/lib/rainbow-mode @@ -0,0 +1 @@ +Subproject commit 313f105026d0ba7a3f6c0e9ee7e991bf3acabaf5 diff --git a/lib/restclient b/lib/restclient new file mode 160000 index 0000000..07a3888 --- /dev/null +++ b/lib/restclient @@ -0,0 +1 @@ +Subproject commit 07a3888bb36d0e29608142ebe743b4362b800f40 diff --git a/lib/s b/lib/s new file mode 160000 index 0000000..e61dee5 --- /dev/null +++ b/lib/s @@ -0,0 +1 @@ +Subproject commit e61dee51474e61b777575b474459c582f3084f64 diff --git a/lib/seq b/lib/seq new file mode 160000 index 0000000..b4d667e --- /dev/null +++ b/lib/seq @@ -0,0 +1 @@ +Subproject commit b4d667e408a02a70dcf8e785aa499086e8aa4be7 diff --git a/lib/shell-switcher b/lib/shell-switcher new file mode 160000 index 0000000..28a7f75 --- /dev/null +++ b/lib/shell-switcher @@ -0,0 +1 @@ +Subproject commit 28a7f753dd7addd2933510526f52620cb5a22048 diff --git a/lib/slime b/lib/slime new file mode 160000 index 0000000..7ccaa81 --- /dev/null +++ b/lib/slime @@ -0,0 +1 @@ +Subproject commit 7ccaa81b4266d478ed92003fba097756afc6ae19 diff --git a/lib/spinner b/lib/spinner new file mode 160000 index 0000000..0637791 --- /dev/null +++ b/lib/spinner @@ -0,0 +1 @@ +Subproject commit 0637791f005f747532b4439439a81c3415961377 diff --git a/lib/sudo-edit b/lib/sudo-edit new file mode 160000 index 0000000..57d49ea --- /dev/null +++ b/lib/sudo-edit @@ -0,0 +1 @@ +Subproject commit 57d49eafd53868d3c86b20fa51e1889e621872c0 diff --git a/lib/telepathy b/lib/telepathy new file mode 160000 index 0000000..211d785 --- /dev/null +++ b/lib/telepathy @@ -0,0 +1 @@ +Subproject commit 211d785b02a29ddc254422fdcc3db45262582f8c diff --git a/lib/tern b/lib/tern new file mode 160000 index 0000000..a4db155 --- /dev/null +++ b/lib/tern @@ -0,0 +1 @@ +Subproject commit a4db15583ea15cd7b62c706ea42a38bff9b418fb diff --git a/lib/web-mode b/lib/web-mode new file mode 160000 index 0000000..8c35710 --- /dev/null +++ b/lib/web-mode @@ -0,0 +1 @@ +Subproject commit 8c35710775de9369f0637a9bd5fde39e4074db72 diff --git a/lib/websocket b/lib/websocket new file mode 160000 index 0000000..ccbe93a --- /dev/null +++ b/lib/websocket @@ -0,0 +1 @@ +Subproject commit ccbe93ac8b5858a85686b83642fbd6e828a47deb diff --git a/lib/widgetjs b/lib/widgetjs new file mode 160000 index 0000000..74daf28 --- /dev/null +++ b/lib/widgetjs @@ -0,0 +1 @@ +Subproject commit 74daf284e32bf84d29377d1d7a638b640ebf8f76 diff --git a/lib/ws-butler b/lib/ws-butler new file mode 160000 index 0000000..80dabd5 --- /dev/null +++ b/lib/ws-butler @@ -0,0 +1 @@ +Subproject commit 80dabd5d158929e8433e46207bb521282b21e4f3 diff --git a/lib/xref-js2 b/lib/xref-js2 new file mode 160000 index 0000000..d5f9360 --- /dev/null +++ b/lib/xref-js2 @@ -0,0 +1 @@ +Subproject commit d5f93605405989529c2f66b542def6c32429b927 diff --git a/lib/yasnippet b/lib/yasnippet new file mode 160000 index 0000000..e8ed276 --- /dev/null +++ b/lib/yasnippet @@ -0,0 +1 @@ +Subproject commit e8ed276e2cba90126f694a90df28b5f5eca66376 diff --git a/lib/zerodark-theme b/lib/zerodark-theme new file mode 160000 index 0000000..ab40674 --- /dev/null +++ b/lib/zerodark-theme @@ -0,0 +1 @@ +Subproject commit ab406749083a41e5ca7fe518949a09853f23e5d5 diff --git a/lib/zoom-frm b/lib/zoom-frm new file mode 160000 index 0000000..5caa6da --- /dev/null +++ b/lib/zoom-frm @@ -0,0 +1 @@ +Subproject commit 5caa6da9a472429ededde6ffc4607c5dab42dee4 diff --git a/local/apg.el b/local/apg.el new file mode 100644 index 0000000..5d2ff40 --- /dev/null +++ b/local/apg.el @@ -0,0 +1,46 @@ +;;; apg.el --- Insert random passwords with apg -*- lexical-binding: t; -*- + +;; Copyright (C) 2017 Nicolas Petton + +;; Author: Nicolas Petton(defun apg () +;; Keywords: convenience + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; + +;;; Code: + +(defun apg () + "Insert a random password at point. Requires apg in the $PATH" + (interactive) + (let ((password)) + (save-excursion + (let ((buffer "*passwords*")) + (shell-command "apg -m 15" buffer) + (switch-to-buffer buffer) + (beginning-of-line) + (let ((beg (point)) + (end (progn (end-of-line) (point)))) + (setq password (buffer-substring beg end))) + (kill-buffer buffer))) + (insert password))) + +(provide 'apg) +;;; apg.el ends here + + + diff --git a/local/apg.el~ b/local/apg.el~ new file mode 100644 index 0000000..8b4687e --- /dev/null +++ b/local/apg.el~ @@ -0,0 +1,19 @@ +(defun apg () + "Insert a random password at point. Requires apg in the $PATH" + (interactive) + (let ((password)) + (save-excursion + (let ((buffer "*passwords*")) + (shell-command "apg -m 15" buffer) + (switch-to-buffer buffer) + (beginning-of-line) + (let ((beg (point)) + (end (progn (end-of-line) (point)))) + (setq password (buffer-substring beg end))) + (kill-buffer buffer))) + (insert password))) + +(provide 'init-apg) + + + diff --git a/local/auctex-evince-sync.el b/local/auctex-evince-sync.el new file mode 100644 index 0000000..36690d0 --- /dev/null +++ b/local/auctex-evince-sync.el @@ -0,0 +1,80 @@ +;; synctex +(setq TeX-source-correlate-mode t) + +;; Synctex with evince using DBus +(defadvice raise-frame (after make-it-work (&optional frame) activate) + "Work around some bug? in raise-frame/Emacs/GTK/Metacity/something. +Katsumi Yamaoka posted this in +http://article.gmane.org/gmane.emacs.devel:39702" + (call-process + "wmctrl" nil nil nil "-i" "-R" + (frame-parameter (or frame (selected-frame)) 'outer-window-id))) + +;; Forward/inverse search with evince using D-bus. +(if (require 'dbus "dbus" t) + (progn + ;; universal time, need by evince + (defun utime () + (let ((high (nth 0 (current-time))) + (low (nth 1 (current-time)))) + (+ (* high (lsh 1 16) ) low))) + + ;; Forward search. + ;; Adapted from http://dud.inf.tu-dresden.de/~ben/evince_synctex.tar.gz + (defun auctex-evince-forward-sync (pdffile texfile line) + (let ((dbus-name + (dbus-call-method :session + "org.gnome.evince.Daemon" ; service + "/org/gnome/evince/Daemon" ; path + "org.gnome.evince.Daemon" ; interface + "FindDocument" + (concat "file://" pdffile) + t ; Open a new window if the file is not opened. + ))) + (dbus-call-method :session + dbus-name + "/org/gnome/evince/Window/0" + "org.gnome.evince.Window" + "SyncView" + texfile + (list :struct :int32 line :int32 1) + (utime)))) + + (defun auctex-evince-view () + (let ((pdf (file-truename (concat default-directory + (TeX-master-file (TeX-output-extension))))) + (tex (buffer-file-name)) + (line (line-number-at-pos))) + (auctex-evince-forward-sync pdf tex line))) + + ;; New view entry: Evince via D-bus. + (setq TeX-view-program-list + '(("EvinceDbus" auctex-evince-view))) + + ;; Prepend Evince via D-bus to program selection list + ;; overriding other settings for PDF viewing. + (setq TeX-view-program-selection + '((output-pdf "EvinceDbus"))) + + ;; Inverse search. + ;; Adapted from: http://www.mail-archive.com/auctex@gnu.org/msg04175.html + (defun auctex-evince-inverse-sync (file linecol timestamp) + (let ((buf (get-file-buffer (substring file 7))) + (line (car linecol)) + (col (cadr linecol))) + (if (null buf) + (message "Sorry, %s is not opened..." file) + (switch-to-buffer buf) + (goto-line (car linecol)) + (unless (= col -1) + (move-to-column col)) + (raise-frame)))) ;; pop the emacs window + + (dbus-register-signal + :session nil "/org/gnome/evince/Window/0" + "org.gnome.evince.Window" "SyncSource" + 'auctex-evince-inverse-sync))) + + +(provide 'auctex-evince-sync) + diff --git a/local/eshellbmk.el b/local/eshellbmk.el new file mode 100644 index 0000000..b5ddcf5 --- /dev/null +++ b/local/eshellbmk.el @@ -0,0 +1,47 @@ +(require 'bookmark) + +(defun pcomplete/eshell-mode/jump () + "Completion for `jump'" + (pcomplete-here (bookmark-all-names))) + +(defun eshell/jump (&rest args) + "Integration between EShell and bookmarks. +For usage, execute without arguments." + (setq args (eshell-flatten-list args)) + (let ((bookmark (car args)) + filename name) + (if (eq nil args) + (eshell/jump-usage) + ;; Check whether an existing bookmark has been specified + (if (setq filename (cdr (car (bookmark-get-bookmark-record bookmark)))) + ;; If it points to a directory, change to it. + (if (file-directory-p filename) + (eshell/cd filename) + ;; otherwise, just jump to the bookmark + (bookmark-jump bookmark)) + (error "%s is not a bookmark" bookmark))))) + + +;;;###autoload +(defun eshell/jump-usage () + (format "Usage: +jump BOOKMARK + +either change directory pointed to by BOOKMARK +or bookmark-jump to the BOOKMARK if it is not a directory. + +Use bmk BOOKMARK to add bookmarks. + +Completion is available.")) + + +;;;###autoload +(defun eshell/bmk (&rest args) + (if (setq name (car args)) + (progn + (bookmark-set name) + (bookmark-set-filename name (eshell/pwd)) + (format "Saved current directory in bookmark as '%s'" name)) + (error "You must enter a bookmark name"))) + +(provide 'eshellbmk) diff --git a/local/fetch-email.el b/local/fetch-email.el new file mode 100644 index 0000000..7f4081e --- /dev/null +++ b/local/fetch-email.el @@ -0,0 +1,95 @@ +;;; fetch-email.el --- Fetching email from Emacs -*- lexical-binding: t; -*- + +;; Copyright (C) 2015 Nicolas Petton + +;; Author: Nicolas Petton +;; Keywords: convenience, email, imap + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;;; Code: +(require 'comint) + +(defgroup fetch-email nil + "Fetch email from Emacs." + :group 'fetch-email) + +(defcustom fetch-email-buffer-name "*Fetch Email*" + "Name of the buffer used to fetch email." + :group 'fetch-email + :type 'string) + +(defcustom fetch-email-command "offlineimap" + "Command to run to fetch email." + :group 'fetch-email + :type 'string) + +(defcustom fetch-email-autorefresh nil + "If non-nil, `fetch-email-command' is rerun automatically." + :group 'fetch-email + :type 'boolean) + +(defcustom fetch-email-interval 300 + "Interval in seconds between in fetch." + :group 'fetch-email + :type 'integer) + +(defvar fetch-email-post-command-hook nil + "Hook run after each run of `fetch-email-command'.") + +(defvar fetch-email-timer nil + "Timer used to repeat fetching email.") + +;;;###autoload +(defun fetch-email (&optional arg) + "Fetch email in the background. +When called with a prefix argument ARG, switch to the command +buffer." + (interactive "P") + (let ((buf (get-buffer-create fetch-email-buffer-name))) + (when arg + (pop-to-buffer buf)) + (unless (get-buffer-process buf) + (fetch-email--start buf)))) + +(defun fetch-email--start (buf) + "Start the process of fetching email in the background. +The output is displayed in BUF." + (let ((proc (start-process-shell-command "Fetch email" + buf + fetch-email-command))) + (with-current-buffer buf + (erase-buffer)) + (set-process-sentinel proc #'fetch-email--sentinel))) + +(defun fetch-email--sentinel (proc state) + "Monitor PROC state STATE and run hooks." + (when (eq 'exit + (process-status proc)) + (run-hook-with-args 'fetch-email-post-command-hook state) + (fetch-email--repeat-maybe))) + +(defun fetch-email--repeat-maybe () + "After the process exits, maybe rerun it after a delay." + (when fetch-email-timer + (cancel-timer fetch-email-timer)) + (when fetch-email-autorefresh + (setq fetch-email-timer (run-with-timer fetch-email-interval + nil + #'fetch-email)))) + +(provide 'fetch-email) +;;; fetch-email.el ends here diff --git a/local/js2-unused.el b/local/js2-unused.el new file mode 100644 index 0000000..c9fb217 --- /dev/null +++ b/local/js2-unused.el @@ -0,0 +1,71 @@ +;;; js2-unused.el --- Find unused definitions in JS2 buffers -*- lexical-binding: t; -*- + +;; Copyright (C) 2017 Nicolas Petton + +;; Author: Nicolas Petton +;; Keywords: javascript, tools + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; + +;;; Code: + +(require 'seq) +(require 'xref-js2) +(require 'subr-x) + +(defvar js2-unused-definitions nil) + +(defun js2-unused-functions () + (interactive) + (js2-mode-wait-for-parse + (lambda () + (js2-unused--find-definitions) + (let ((unused (seq-filter (lambda (name) + (null (xref-js2--find-references + (js2-unused--local-name name)))) + js2-unused-definitions))) + (apply #'message (if unused + `("Unused functions in %s: %s " + ,(file-name-nondirectory buffer-file-name) + ,(mapconcat #'identity unused " ")) + '("No unused function found"))))))) + +(defun js2-unused--find-definitions () + (setq js2-unused-definitions nil) + (js2-visit-ast js2-mode-ast + #'js2-unused-visitor)) + +(defun js2-unused-visitor (node end-p) + (unless end-p + (cond + ((and (js2-assign-node-p node) + (js2-function-node-p (js2-assign-node-right node))) + (push (js2-node-string (js2-assign-node-left node)) js2-unused-definitions)) + ((js2-function-node-p node) + (if-let ((name (js2-function-name node))) + (push name js2-unused-definitions)))) + t)) + +(defun js2-unused--local-name (name) + (save-match-data + (if (string-match "\\.\\([^.]+\\)$" name) + (match-string 1 name) + name))) + +(provide 'js2-unused) +;;; js2-unused.el ends here diff --git a/local/open-url-at-point.el b/local/open-url-at-point.el new file mode 100644 index 0000000..eede39f --- /dev/null +++ b/local/open-url-at-point.el @@ -0,0 +1,12 @@ +(defun open-url-at-point (&optional arg) + "Browse the url at point. +Open the url in a www browser or, when called with a prefix +argument, in Emacs." + (interactive "P") + (let ((url (browse-url-url-at-point))) + (if arg + (browse-url-emacs url) + (browse-url url)))) + +(provide 'open-url-at-point) + diff --git a/local/org-debbugs-protocol.el b/local/org-debbugs-protocol.el new file mode 100644 index 0000000..eb40e3b --- /dev/null +++ b/local/org-debbugs-protocol.el @@ -0,0 +1,37 @@ +;;; org-debbugs-protocol.el --- Debbugs link protocol in orgmode -*- lexical-binding: t; -*- + +;; Copyright (C) 2016 Nicolas Petton + +;; Author: Nicolas Petton +;; Keywords: convenience + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; + +;;; Code: + +(require 'org) + +(defun org-debbugs-protocol-open (issue) + "Follow a DEBBUGS link specified by ISSUE." + (debbugs-gnu-bugs (string-to-number issue))) + +;; Install the link type +(org-add-link-type "debbugs" 'org-debbugs-protocol-open) + +(provide 'org-debbugs-protocol) +;;; org-debbugs-protocol.el ends here diff --git a/local/org-gogs-protocol.el b/local/org-gogs-protocol.el new file mode 100644 index 0000000..c8b6857 --- /dev/null +++ b/local/org-gogs-protocol.el @@ -0,0 +1,44 @@ +;;; org-gogs-protocol.el --- Gogs link protocol in orgmode -*- lexical-binding: t; -*- + +;; Copyright (C) 2016 Nicolas Petton + +;; Author: Nicolas Petton +;; Keywords: convenience +;; Version: 1.0 + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; + +;;; Code: + +(require 'org) + +(defcustom org-gogs-protocol-base-url "https://example.net/gogs" + "Base url for Gogs links." + :group 'org-gogs-protocol + :type 'string) + +(defun org-gogs-protocol-open (link) + "Follow a GOGS link specified by LINK." + (browse-url (format "%s/%s" org-gogs-protocol-base-url link))) + + +;; Install the link type +(org-add-link-type "gogs" 'org-gogs-protocol-open) + +(provide 'org-gogs-protocol) +;;; org-gogs-protocol.el ends here diff --git a/local/org-jira-protocol.el b/local/org-jira-protocol.el new file mode 100644 index 0000000..0a5590f --- /dev/null +++ b/local/org-jira-protocol.el @@ -0,0 +1,44 @@ +;;; org-jira-protocol.el --- JIRA link protocol in orgmode -*- lexical-binding: t; -*- + +;; Copyright (C) 2016 Nicolas Petton + +;; Author: Nicolas Petton +;; Keywords: convenience +;; Version: 1.0 + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; + +;;; Code: + +(require 'org) + +(defcustom org-jira-protocol-base-url "https://foretagsplatsen.atlassian.net" + "Base url for JIRA links." + :group 'org-jira-protocol + :type 'string) + +(defun org-jira-protocol-open (issue) + "Follow a JIRA link specified by ISSUE." + (browse-url (format "%s/browse/%s" org-jira-protocol-base-url issue))) + + +;; Install the link type +(org-add-link-type "jira" 'org-jira-protocol-open) + +(provide 'org-jira-protocol) +;;; org-jira-protocol.el ends here diff --git a/local/org-sip-protocol.el b/local/org-sip-protocol.el new file mode 100644 index 0000000..d3d2306 --- /dev/null +++ b/local/org-sip-protocol.el @@ -0,0 +1,44 @@ +;;; org-sip-protocol.el --- Ekiga SIP protocol in orgmode -*- lexical-binding: t; -*- + +;; Copyright (C) 2016 Nicolas Petton + +;; Author: Nicolas Petton +;; Keywords: convenience +;; Version: 1.0 + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; + +;;; Code: + +(require 'org) + +(defcustom org-sip-domain "sip3.ovh.fr" + "SIP domain.") + +(defcustom org-sip-executable "linphone" + "SIP domain.") + +(defun org-sip-protocol-open (uri) + "Call URI." + (start-process "sip call" "*SIP-call*" org-sip-executable "-c" (format "sip:%s@%s" uri org-sip-domain))) + +;; Install the link type +(org-add-link-type "sip" 'org-sip-protocol-open) + +(provide 'org-sip-protocol) +;;; org-sip-protocol.el ends here diff --git a/local/smalltalk-mode.el b/local/smalltalk-mode.el new file mode 100644 index 0000000..14c7497 --- /dev/null +++ b/local/smalltalk-mode.el @@ -0,0 +1,1202 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; +;;; Copyright 1988-92, 1994-95, 1999, 2000, 2003, 2007, 2008, 2009 +;;; Free Software Foundation, Inc. +;;; Written by Steve Byrne. +;;; +;;; This file is part of GNU Smalltalk. +;;; +;;; GNU Smalltalk is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by the Free +;;; Software Foundation; either version 2, or (at your option) any later +;;; version. +;;; +;;; GNU Smalltalk is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +;;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +;;; for more details. +;;; +;;; You should have received a copy of the GNU General Public License along +;;; with GNU Smalltalk; see the file COPYING. If not, write to the Free +;;; Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;;; Incorporates Frank Caggiano's changes for Emacs 19. +;;; Updates and changes for Emacs 20 and 21 by David Forster + + +;; ===[ Variables and constants ]===================================== + +(defvar smalltalk-name-regexp "[A-z][A-z0-9_]*" + "A regular expression that matches a Smalltalk identifier") + +(defvar smalltalk-keyword-regexp (concat smalltalk-name-regexp ":") + "A regular expression that matches a Smalltalk keyword") + +(defvar smalltalk-name-chars "A-z0-9" + "The collection of character that can compose a Smalltalk identifier") + +(defvar smalltalk-whitespace " \t\n\f") + +(defconst smalltalk-indent-amount 4 + "*'Tab size'; used for simple indentation alignment.") + +;; ---[ Syntax Table ]------------------------------------------------ + +;; This may very well be a bug, but certin chars like ?+ are set to be +;; punctuation, when in fact one might think of them as words (that +;; is, they are valid selector names). Some functions will fail +;; however, (like smalltalk-begin-of-defun) so there punctuation. +;; Works for now... + +(defvar smalltalk-mode-syntax-table + (let ((table (make-syntax-table))) + ;; Make sure A-z0-9 are set to "w " for completeness + (let ((c 0)) + (setq c ?0) + (while (<= c ?9) + (setq c (1+ c)) + (modify-syntax-entry c "w " table)) + (setq c ?A) + (while (<= c ?Z) + (setq c (1+ c)) + (modify-syntax-entry c "w " table)) + (setq c ?a) + (while (<= c ?z) + (setq c (1+ c)) + (modify-syntax-entry c "w " table))) + (modify-syntax-entry 10 " > " table) ; Comment (generic) + (modify-syntax-entry ?: ". " table) ; Symbol-char + (modify-syntax-entry ?_ "_ " table) ; Symbol-char + (modify-syntax-entry ?\" "!1 " table) ; Comment (generic) + (modify-syntax-entry ?' "\" " table) ; String + (modify-syntax-entry ?# "' " table) ; Symbol or Array constant + (modify-syntax-entry ?\( "() " table) ; Grouping + (modify-syntax-entry ?\) ")( " table) ; Grouping + (modify-syntax-entry ?\[ "(] " table) ; Block-open + (modify-syntax-entry ?\] ")[ " table) ; Block-close + (modify-syntax-entry ?{ "(} " table) ; Array-open + (modify-syntax-entry ?} "){ " table) ; Array-close + (modify-syntax-entry ?$ "/ " table) ; Character literal + (modify-syntax-entry ?! ". " table) ; End message / Delimit defs + (modify-syntax-entry ?\; ". " table) ; Cascade + (modify-syntax-entry ?| ". " table) ; Temporaries + (modify-syntax-entry ?^ ". " table) ; Return + ;; Just to make sure these are not set to "w " + (modify-syntax-entry ?< ". " table) + (modify-syntax-entry ?> ". " table) + (modify-syntax-entry ?+ ". " table) ; math + (modify-syntax-entry ?- ". " table) ; math + (modify-syntax-entry ?* ". " table) ; math + (modify-syntax-entry ?/ ".2 " table) ; math + (modify-syntax-entry ?= ". " table) ; bool/assign + (modify-syntax-entry ?% ". " table) ; valid selector + (modify-syntax-entry ?& ". " table) ; boolean + (modify-syntax-entry ?\\ ". " table) ; ??? + (modify-syntax-entry ?~ ". " table) ; misc. selector + (modify-syntax-entry ?@ ". " table) ; Point + (modify-syntax-entry ?, ". " table) ; concat + table) + "Syntax table used by Smalltalk mode") + +;; ---[ Abbrev table ]------------------------------------------------ + +(defvar smalltalk-mode-abbrev-table nil + "Abbrev table in use in smalltalk-mode buffers.") +(define-abbrev-table 'smalltalk-mode-abbrev-table ()) + +;; ---[ Keymap ]------------------------------------------------------ + +(defvar smalltalk-template-map + (let ((keymap (make-sparse-keymap))) + (define-key keymap "p" 'smalltalk-private-template) + (define-key keymap "c" 'smalltalk-class-template) + (define-key keymap "i" 'smalltalk-instance-template) + keymap) + "Keymap of template creation keys") + +(defvar smalltalk-mode-map + (let ((keymap (make-sparse-keymap))) + (define-key keymap "\n" 'smalltalk-newline-and-indent) + (define-key keymap "\C-c\C-a" 'smalltalk-begin-of-defun) + (define-key keymap "\C-c\C-e" 'smalltalk-end-of-defun) + (define-key keymap "\C-c\C-f" 'smalltalk-forward-sexp) + (define-key keymap "\C-c\C-b" 'smalltalk-backward-sexp) + (define-key keymap "\C-c\C-p" 'smalltalk-goto-previous-keyword) + (define-key keymap "\C-c\C-n" 'smalltalk-goto-next-keyword) + ;; the following three are deprecated + (define-key keymap "\C-\M-a" 'smalltalk-begin-of-defun) + (define-key keymap "\C-\M-f" 'smalltalk-forward-sexp) + (define-key keymap "\C-\M-b" 'smalltalk-backward-sexp) + (define-key keymap "!" 'smalltalk-bang) + (define-key keymap ":" 'smalltalk-colon) + (define-key keymap "\C-ct" smalltalk-template-map) + + ;; ----- + + (define-key keymap "\C-cd" 'smalltalk-doit) + (define-key keymap "\C-cf" 'smalltalk-filein-buffer) + (define-key keymap "\C-cm" 'gst) + (define-key keymap "\C-cp" 'smalltalk-print) + (define-key keymap "\C-cq" 'smalltalk-quit) + (define-key keymap "\C-cs" 'smalltalk-snapshot) + + keymap) + "Keymap for Smalltalk mode") + +(defconst smalltalk-binsel "\\([-+*/~,<>=&?]\\{1,2\\}\\|:=\\|||\\)" + "Smalltalk binary selectors") + +(defconst smalltalk-font-lock-keywords + (list + '("#[A-z][A-z0-9_]*" . font-lock-constant-face) + '("\\<[A-z][A-z0-9_]*:" . font-lock-function-name-face) + (cons smalltalk-binsel 'font-lock-function-name-face) +; '("\\^" . font-lock-keyword-face) + '("\\$." . font-lock-string-face) ;; Chars + '("\\<[A-Z]\\sw*\\>" . font-lock-type-face)) + "Basic Smalltalk keywords font-locking") + +(defconst smalltalk-font-lock-keywords-1 + smalltalk-font-lock-keywords + "Level 1 Smalltalk font-locking keywords") + +(defconst smalltalk-font-lock-keywords-2 + (append smalltalk-font-lock-keywords-1 + (list + '("\\<\\(true\\|false\\|nil\\|self\\|super\\)\\>" + . font-lock-builtin-face) + '(":[a-z][A-z0-9_]*" . font-lock-variable-name-face) + '(" |" . font-lock-type-face) + '("<.*>" . font-lock-builtin-face))) + + "Level 2 Smalltalk font-locking keywords") + +(defvar smalltalk-last-category "" + "Category of last method") + +;; ---[ Interactive functions ]--------------------------------------- + +(defun smalltalk-mode () + "Major mode for editing Smalltalk code. + +Commands: +\\{smalltalk-mode-map} +" + (interactive) + (kill-all-local-variables) + (setq major-mode 'smalltalk-mode) + (setq mode-name "Smalltalk") + + (use-local-map smalltalk-mode-map) + (set-syntax-table smalltalk-mode-syntax-table) + (setq local-abbrev-table smalltalk-mode-abbrev-table) + + ;; Buffer locals + + (set (make-local-variable 'paragraph-start) + (concat "^$\\|" page-delimiter)) + (set (make-local-variable 'paragraph-separate) + paragraph-start) + (set (make-local-variable 'paragraph-ignore-fill-prefix) t) + (set (make-local-variable 'indent-line-function) + 'smalltalk-indent-line) + (set (make-local-variable 'require-final-newline) t) + (set (make-local-variable 'comment-start) "\"") + (set (make-local-variable 'comment-end) "\"") + (set (make-local-variable 'comment-column) 32) + (set (make-local-variable 'comment-start-skip) "\" *") + ;; Doesn't seem useful...? + (set (make-local-variable 'comment-indent-function) + 'smalltalk-comment-indent) + ;; For interactive f-b sexp + (set (make-local-variable 'parse-sexp-ignore-comments) t) + + ;; font-locking + (set (make-local-variable 'font-lock-defaults) + '((smalltalk-font-lock-keywords + smalltalk-font-lock-keywords-1 + smalltalk-font-lock-keywords-2) + nil nil nil nil)) + + ;; tags + (set (make-local-variable 'find-tag-default-function) + 'smalltalk-find-message) + ;; Run hooks, must be last + (run-hooks 'smalltalk-mode-hook)) + +(defun smalltalk-tab () + (interactive) + (let (col) + ;; round up, with overflow + (setq col (* (/ (+ (current-column) smalltalk-indent-amount) + smalltalk-indent-amount) + smalltalk-indent-amount)) + (indent-to-column col))) + +(defun smalltalk-bang-begin-of-defun () + (let ((parse-sexp-ignore-comments t) here delim start) + (setq here (point)) + (while (and (search-backward "!" nil 'to-end) + (setq delim (smalltalk-in-string))) + (search-backward delim)) + (setq start (point)) + (if (looking-at "!") + (forward-char 1)) + (smalltalk-forward-whitespace) + ;; check to see if we were already at the start of a method + ;; in which case, the semantics are to go to the one preceeding + ;; this one + (if (and (= here (point)) + (/= start (point-min))) + (progn + (goto-char start) + (smalltalk-backward-whitespace) ;may be at ! "foo" ! + (if (= (preceding-char) ?!) + (backward-char 1)) + (smalltalk-begin-of-defun))))) ;and go to the next one + +(defun smalltalk-scope-begin-of-defun () + (let (here prev (start (smalltalk-current-scope-point))) + (if (and start (/= (point) start)) + (progn + (backward-char 1) + (skip-chars-backward " \t") + (if (bolp) + (backward-char 1) + (end-of-line)) + (setq here (point)) + (goto-char start) + (skip-chars-forward "^[") + (forward-char 1) + (condition-case nil + (while (< (point) here) + (if (looking-at "[ \t]*\\[") (setq prev (point))) + (forward-sexp 1)) + (error t)) + (if prev + (progn + (goto-char prev) + (condition-case nil + (progn + (forward-sexp 1) + (if (and (< (point) here) + (= (char-before) ?\])) + (progn + (skip-syntax-forward " \t") + (setq prev (point))))) + (error t)) + (goto-char prev) + (beginning-of-line) + (skip-chars-forward " \t")) + (goto-char start)))))) + +(defun smalltalk-begin-of-defun () + "Skips to the beginning of the current method. If already at +the beginning of a method, skips to the beginning of the previous +one." + (interactive) + (if (smalltalk-in-bang-syntax) + (smalltalk-bang-begin-of-defun) + (smalltalk-scope-begin-of-defun))) + +(defun smalltalk-begin-of-scope () + "Skips to the beginning of the current method. If already at +the beginning of a method, skips to the beginning of the previous +one." + (interactive) + (let ((start (smalltalk-current-scope-point))) + (if start (goto-char start)))) + + +(defun smalltalk-forward-sexp (n) + "Move point left to the next smalltalk expression." + (interactive "p") + (let (i) + (cond ((< n 0) + (smalltalk-backward-sexp (- n))) + ((null parse-sexp-ignore-comments) + (forward-sexp n)) + (t + (while (> n 0) + (smalltalk-forward-whitespace) + (forward-sexp 1) + (setq n (1- n))))))) + +(defun smalltalk-backward-sexp (n) + "Move point right to the next smalltalk expression." + (interactive "p") + (let (i) + (cond ((< n 0) + (smalltalk-forward-sexp (- n))) + ((null parse-sexp-ignore-comments) + (backward-sexp n)) + (t + (while (> n 0) + (smalltalk-backward-whitespace) + (backward-sexp 1) + (setq n (1- n))))))) + +(defun smalltalk-reindent () + (interactive) + (smalltalk-indent-line)) + +(defun smalltalk-newline-and-indent () + "Called basically to do newline and indent. Sees if the current line is a +new statement, in which case the indentation is the same as the previous +statement (if there is one), or is determined by context; or, if the current +line is not the start of a new statement, in which case the start of the +previous line is used, except if that is the start of a new line in which case +it indents by smalltalk-indent-amount." + (interactive) + (newline) + (smalltalk-indent-line)) + +(defun smalltalk-colon () + "Possibly reindents a line when a colon is typed. +If the colon appears on a keyword that's at the start of the line (ignoring +whitespace, of course), then the previous line is examined to see if there +is a colon on that line, in which case this colon should be aligned with the +left most character of that keyword. This function is not fooled by nested +expressions." + (interactive) + (let (needs-indent state (parse-sexp-ignore-comments t)) + (setq state (parse-partial-sexp (point-min) (point))) + + (if (null (nth 3 state)) ;we're not in string or comment + (progn + (save-excursion + (skip-chars-backward "A-z0-9_") + (if (and (looking-at smalltalk-name-regexp) + (not (smalltalk-at-begin-of-defun))) + (setq needs-indent (smalltalk-white-to-bolp)))) + (and needs-indent + (smalltalk-indent-for-colon)))) + ;; out temporarily + ;; (expand-abbrev) ;I don't think this is the "correct" + ;; ;way to do this...I suspect that + ;; ;some flavor of "call interactively" + ;; ;is better. + (self-insert-command 1))) + +(defun smalltalk-bang () + "Go to the end of the method definition" + (interactive) + (cond ((or (smalltalk-in-string) (smalltalk-in-comment)) (insert "!")) + ((smalltalk-in-bang-syntax) + (progn (insert "!") + (save-excursion + (beginning-of-line) + (if (looking-at "^[ \t]+!") + (delete-horizontal-space))))) + (t (smalltalk-end-of-defun)))) + +(defun smalltalk-end-of-defun () + (interactive) + (if (smalltalk-in-bang-syntax) + (progn (search-forward "!") + (forward-char 1) + (if (looking-at "[ \t\n]+!") + (progn (search-forward 1) + (forward-char 1)))) + (progn (end-of-line) + (smalltalk-begin-of-defun) + (skip-chars-forward "^[") + (forward-sexp 1) + (skip-chars-forward " \t\n")))) + +(defun smalltalk-last-category-name () + smalltalk-last-category) + +(defun smalltalk-insert-indented-line (string) + (insert (format "%s\n" string)) + (save-excursion + (backward-char 1) + (smalltalk-indent-line))) + +(defun smalltalk-maybe-insert-spacing-line (n) + (if (not (save-excursion + (previous-line n) + (looking-at "^[ \t]*$"))) + (insert "\n"))) + +(defun smalltalk-insert-method-body (selector-name category-name) + (let (insert-at-top) + (beginning-of-line) + (smalltalk-forward-whitespace) + (beginning-of-line) + (setq insert-at-top (smalltalk-at-begin-of-defun)) + (if (not insert-at-top) + (progn (smalltalk-end-of-defun) + (beginning-of-line))) + (smalltalk-maybe-insert-spacing-line 1) + (smalltalk-insert-indented-line (format "%s [" selector-name)) + (save-excursion + (insert "\n") + (if (not (equal category-name "")) + (smalltalk-insert-indented-line (format "" category-name))) + (smalltalk-insert-indented-line "]") + (smalltalk-maybe-insert-spacing-line 0)) + (smalltalk-indent-line) + (end-of-line))) + +(defun smalltalk-instance-template-fn (class-name selector-name category-name) + (setq smalltalk-last-category category-name) + (smalltalk-exit-class-scope) + (smalltalk-insert-method-body + (if (equal class-name (smalltalk-current-class-name)) + selector-name + (format "%s >> %s" class-name selector-name)) + category-name)) + +(defun smalltalk-class-template-fn (class-name selector-name category-name) + (setq smalltalk-last-category category-name) + (if (and (equal selector-name "") + (equal class-name (smalltalk-current-class-name))) + (progn (smalltalk-insert-method-body (format " %s class" class-name) "") + (setq smalltalk-last-category "instance creation")) + (smalltalk-insert-method-body + (if (and (smalltalk-in-class-scope) + (equal class-name (smalltalk-current-class-name))) + selector-name + (format "%s class >> %s" class-name selector-name)) + category-name))) + +(defun smalltalk-private-template-fn (class-name selector-name) + (if (smalltalk-in-class-scope) + (smalltalk-class-template-fn class-name selector-name "private") + (smalltalk-instance-template-fn class-name selector-name "private"))) + +(defun smalltalk-maybe-read-class (with-class) + (if (= with-class 1) + (smalltalk-current-class-name) + (read-string "Class: " (smalltalk-current-class-name)))) + +(defun smalltalk-instance-template (with-class) + (interactive "p") + (smalltalk-instance-template-fn + (smalltalk-maybe-read-class with-class) + (read-string "Selector: ") + (read-string "Category: " (smalltalk-last-category-name)))) + +(defun smalltalk-class-template (with-class) + (interactive "p") + (let* ((class-name (smalltalk-maybe-read-class with-class)) + (selector-name (read-string "Selector: ")) + (category-name (if (equal selector-name "") "" + (read-string "Category: " + (smalltalk-last-category-name))))) + (smalltalk-class-template-fn class-name selector-name category-name))) + + +(defun smalltalk-private-template (with-class) + (interactive "p") + (smalltalk-private-template-fn + (smalltalk-maybe-read-class with-class) + (read-string "Selector: "))) + +;; ---[ Non-interactive functions ]----------------------------------- + +;; This is used by indent-for-comment +;; to decide how much to indent a comment in Smalltalk code +;; based on its context. +(defun smalltalk-comment-indent () + (if (looking-at "^\"") + 0 ;Existing comment at bol stays there. + (save-excursion + (skip-chars-backward " \t") + (max (1+ (current-column)) ;Else indent at comment column + comment-column)))) ; except leave at least one space. + +(defun smalltalk-indent-line () + (smalltalk-indent-to-column + (save-excursion + (beginning-of-line) + (skip-chars-forward " \t") + (if (and (not (smalltalk-in-comment)) + (looking-at "[A-z][A-z0-9_]*:") + (not (smalltalk-at-begin-of-defun))) + (smalltalk-indent-for-colon) + (smalltalk-calculate-indent))))) + +(defun smalltalk-toplevel-indent (for-scope) + (let (orig) + (condition-case nil + (save-excursion + (save-restriction + (widen) + (end-of-line) + (setq orig (line-number-at-pos)) + (if for-scope (smalltalk-begin-of-scope) (smalltalk-begin-of-defun)) + (smalltalk-forward-whitespace) + (if (= orig (line-number-at-pos)) + (smalltalk-current-column) + (+ smalltalk-indent-amount (smalltalk-current-column))))) + (error 0)))) + +(defun smalltalk-statement-indent () + (let (needs-indent indent-amount done c state orig start-of-line close + (parse-sexp-ignore-comments nil)) + (save-excursion + (save-restriction + (widen) + (beginning-of-line) + (setq close (looking-at "[ \t]*\]")) + (narrow-to-region (point-min) (point)) ;only care about what's before + (setq state (parse-partial-sexp (point-min) (point))) + (cond ((nth 4 state) ;in a comment + (save-excursion + (smalltalk-backward-comment) + (setq indent-amount + (+ (current-column) (if (= (current-column) 0) 0 1))))) + ((equal (nth 3 state) ?') ;in a string + (setq indent-amount 0)) + (close ;just before a closing bracket + (save-excursion + (condition-case nil + (progn (widen) + (smalltalk-forward-whitespace) + (forward-char) + (backward-sexp 1) + (beginning-of-line) + (smalltalk-forward-whitespace) + (setq indent-amount (current-column)))))) + (t + (save-excursion + (smalltalk-backward-whitespace) + (if (or (bobp) + (= (preceding-char) ?!)) + (setq indent-amount 0))))) + (if (null indent-amount) + (progn + (smalltalk-narrow-to-method) + (beginning-of-line) + (setq state (smalltalk-parse-sexp-and-narrow-to-paren)) + (smalltalk-backward-whitespace) + (cond ((bobp) ;must be first statment in block or exp + (if (nth 1 state) ;we're in a paren exp + (if (looking-at "$") + ;; block with no statements, indent by 4 + (setq indent-amount (+ (smalltalk-current-indent) + smalltalk-indent-amount)) + + ;; block with statements, indent to first non-whitespace + (setq indent-amount (smalltalk-current-column))) + + ;; we're top level + (setq indent-amount (smalltalk-toplevel-indent nil)))) + ((smalltalk-at-end-of-statement) ;end of statement or after temps + (smalltalk-find-statement-begin) + (setq indent-amount (smalltalk-current-column))) + ((= (preceding-char) ?:) + (beginning-of-line) + (smalltalk-forward-whitespace) + (setq indent-amount (+ (smalltalk-current-column) + smalltalk-indent-amount))) + ((= (preceding-char) ?>) ;maybe + (save-excursion + (beginning-of-line) + (if (looking-at "[ \t]*<[ \t]*[a-zA-Z]+:") + (setq indent-amount (smalltalk-toplevel-indent nil)))))))) + (or indent-amount + (save-excursion + (condition-case nil + (smalltalk-find-statement-begin) + (error (beginning-of-line))) + (+ (smalltalk-current-column) + smalltalk-indent-amount))))))) + +(defun smalltalk-at-end-of-statement () + (save-excursion + (or (= (preceding-char) ?.) + (and (= (preceding-char) ?|) + (progn + (backward-char 1) + (while (and (not (bobp)) (looking-back "[ \t\na-zA-Z]")) + (skip-chars-backward " \t\n") + (skip-chars-backward "a-zA-Z")) + (if (= (preceding-char) ?|) + (progn + (backward-char 1) + (skip-chars-backward " \t\n"))) + (bobp)))))) + +(defun smalltalk-calculate-indent () + (cond + ((smalltalk-at-begin-of-scope) (smalltalk-toplevel-indent t)) + ((smalltalk-at-begin-of-defun) (smalltalk-toplevel-indent t)) + (t (smalltalk-statement-indent)))) + + +(defun smalltalk-in-string () + "Returns non-nil delimiter as a string if the current location is +actually inside a string or string like context." + (let (state) + (setq state (parse-partial-sexp (point-min) (point))) + (and (nth 3 state) + (char-to-string (nth 3 state))))) + +(defun smalltalk-in-comment () + "Returns non-nil if the current location is inside a comment" + (let (state) + (setq state (parse-partial-sexp (point-min) (point))) + (nth 4 state))) + +(defun smalltalk-forward-whitespace () + "Skip white space and comments forward, stopping at end of buffer +or non-white space, non-comment character" + (while (looking-at (concat "[" smalltalk-whitespace "]")) + (skip-chars-forward smalltalk-whitespace) + (if (= (following-char) ?\") + (forward-comment 1)))) + +;; (defun smalltalk-forward-whitespace () +;; "Skip white space and comments forward, stopping at end of buffer +;; or non-white space, non-comment character" +;; (forward-comment 1) +;; (if (= (following-char) ?\n) +;; (forward-char))) + +(defun smalltalk-backward-whitespace () + "Like forward whitespace only going towards the start of the buffer" + (while (progn (skip-chars-backward smalltalk-whitespace) + (= (preceding-char) ?\")) + (search-backward "\"" nil t 2))) + +(defun smalltalk-current-column () + "Returns the current column of the given line, regardless of narrowed buffer." + (save-restriction + (widen) + (current-column))) ;this changed in 18.56 + +(defun smalltalk-current-indent () + "Returns the indentation of the given line, regardless of narrowed buffer." + (save-excursion + (save-restriction + (widen) + (beginning-of-line) + (skip-chars-forward " \t") + (current-column)))) + +(defun smalltalk-find-statement-begin () + "Leaves the point at the first non-blank, non-comment character of a new +statement. If begininning of buffer is reached, then the point is left there. +This routine only will return with the point pointing at the first non-blank +on a line; it won't be fooled by multiple statements on a line into stopping +prematurely. Also, goes to start of method if we started in the method +selector." + (let (start ch) + (if (= (preceding-char) ?.) ;if we start at eos + (backward-char 1)) ;we find the begin of THAT stmt + (while (and (null start) (not (bobp))) + (smalltalk-backward-whitespace) + (cond ((= (setq ch (preceding-char)) ?.) + (let (saved-point) + (setq saved-point (point)) + (smalltalk-forward-whitespace) + (if (smalltalk-white-to-bolp) + (setq start (point)) + (goto-char saved-point) + (smalltalk-backward-sexp 1)) + )) + ((= ch ?^) ;HACK -- presuming that when we back + ;up into a return that we're at the + ;start of a statement + (backward-char 1) + (setq start (point))) + ((= ch ?!) + (smalltalk-forward-whitespace) + (setq start (point))) + (t + (smalltalk-backward-sexp 1)))) + (if (null start) + (progn + (goto-char (point-min)) + (smalltalk-forward-whitespace) + (setq start (point)))) + start)) + +(defun smalltalk-match-paren (state) + "Answer the closest previous open paren. +Actually, skips over any block parameters, and skips over the whitespace +following on the same line." + (let ((paren-addr (nth 1 state)) + start c done) + (if (not paren-addr) + () + (save-excursion + (goto-char paren-addr) + (setq c (following-char)) + (cond ((or (eq c ?\() (eq c ?{)) + (1+ (point))) + ((eq c ?\[) + (forward-char 1) + + ;; Now skip over the block parameters, if any + (setq done nil) + (while (not done) + (skip-chars-forward " \t") + (setq c (following-char)) + (cond ((eq c ?:) + (smalltalk-forward-sexp 1)) + ((eq c ?|) + (forward-char 1) ;skip vbar + (skip-chars-forward " \t") + (setq done t)) ;and leave + (t + (setq done t)))) + + ;; Now skip over the block temporaries, if any + (cond ((eq (following-char) ?|) + (setq done nil) + (forward-char 1)) + (t + (setq done t))) + + (while (not done) + (skip-chars-forward " \t") + (setq c (following-char)) + (cond ((eq c ?|) + (forward-char 1) ;skip vbar + (skip-chars-forward " \t") + (setq done t)) ;and leave + (t + (smalltalk-forward-sexp 1)))) + + (point))))))) + +(defun smalltalk-parse-sexp-and-narrow-to-paren () + "Narrows the region to between point and the closest previous open paren. +Actually, skips over any block parameters, and skips over the whitespace +following on the same line." + (let* ((parse-sexp-ignore-comments t) + (state (parse-partial-sexp (point-min) (point))) + (start (smalltalk-match-paren state))) + (if (null start) () (narrow-to-region start (point))) + state)) + +(defun smalltalk-at-begin-of-scope () + "Returns T if at the beginning of a class or namespace definition, otherwise nil" + (save-excursion + (end-of-line) + (if (smalltalk-in-bang-syntax) + (let ((parse-sexp-ignore-comments t)) + (and (bolp) + (progn (smalltalk-backward-whitespace) + (= (preceding-char) ?!)))) + (let ((curr-line-pos (line-number-at-pos))) + (if (smalltalk-begin-of-scope) + (= curr-line-pos (line-number-at-pos))))))) + +(defun smalltalk-at-begin-of-defun () + "Returns T if at the beginning of a method definition, otherwise nil" + (save-excursion + (end-of-line) + (if (smalltalk-in-bang-syntax) + (let ((parse-sexp-ignore-comments t)) + (and (bolp) + (progn (smalltalk-backward-whitespace) + (= (preceding-char) ?!)))) + (let ((curr-line-pos (line-number-at-pos))) + (if (smalltalk-begin-of-defun) + (= curr-line-pos (line-number-at-pos))))))) + +(defun smalltalk-indent-for-colon () + (let (indent-amount c start-line state done default-amount + (parse-sexp-ignore-comments t)) + ;; we're called only for lines which look like "foo:" + (save-excursion + (save-restriction + (widen) + (beginning-of-line) + (smalltalk-end-of-paren) + (smalltalk-narrow-to-method) + (setq state (smalltalk-parse-sexp-and-narrow-to-paren)) + (narrow-to-region (point-min) (point)) + (setq start-line (point)) + (smalltalk-backward-whitespace) + (cond + ((bobp) + (setq indent-amount (smalltalk-toplevel-indent t))) + ((eq (setq c (preceding-char)) ?\;) ; cascade before, treat as stmt continuation + (smalltalk-find-statement-begin) + (setq indent-amount (+ (smalltalk-current-column) + smalltalk-indent-amount))) + ((eq c ?.) ; stmt end, indent like it (syntax error here?) + (smalltalk-find-statement-begin) + (setq indent-amount (smalltalk-current-column))) + (t ;could be a winner + (smalltalk-find-statement-begin) + ;; we know that since we weren't at bobp above after backing + ;; up over white space, and we didn't run into a ., we aren't + ;; at the beginning of a statement, so the default indentation + ;; is one level from statement begin + (setq default-amount + (+ (smalltalk-current-column) ;just in case + smalltalk-indent-amount)) + ;; might be at the beginning of a method (the selector), decide + ;; this here + (if (not (looking-at smalltalk-keyword-regexp )) + ;; not a method selector + (while (and (not done) (not (eobp))) + (smalltalk-forward-sexp 1) ;skip over receiver + (smalltalk-forward-whitespace) + (cond ((eq (following-char) ?\;) + (setq done t) + (setq indent-amount default-amount)) + ((and (null indent-amount) ;pick up only first one + (looking-at smalltalk-keyword-regexp)) + (setq indent-amount (smalltalk-current-column)))))) + (and (null indent-amount) + (setq indent-amount default-amount)))))) + (or indent-amount (smalltalk-current-indent)))) + +(defun smalltalk-end-of-paren () + (let ((prev-point (point))) + (smalltalk-safe-forward-sexp) + (while (not (= (point) prev-point)) + (setq prev-point (point)) + (smalltalk-safe-forward-sexp)))) + +(defun smalltalk-indent-to-column (col) + (if (/= col (smalltalk-current-indent)) + (save-excursion + (beginning-of-line) + (delete-horizontal-space) + (indent-to col))) + (if (bolp) + ;;delete horiz space may have moved us to bol instead of staying where + ;; we were. this fixes it up. + (move-to-column col))) + +(defun smalltalk-narrow-to-method () + "Narrows the buffer to the contents of the method, exclusive of the +method selector and temporaries." + (let ((end (point)) + (parse-sexp-ignore-comments t) + done handled) + (save-excursion + (smalltalk-begin-of-defun) + (if (looking-at "[a-zA-z]") ;either unary or keyword msg + ;; or maybe an immediate expression... + (progn + (forward-sexp) + (if (= (following-char) ?:) ;keyword selector + (progn ;parse full keyword selector + (backward-sexp 1) ;setup for common code + (smalltalk-forward-keyword-selector)) + ;; else maybe just a unary selector or maybe not + ;; see if there's stuff following this guy on the same line + (let (here eol-point) + (setq here (point)) + (end-of-line) + (setq eol-point (point)) + (goto-char here) + (smalltalk-forward-whitespace) + (if (< (point) eol-point) ;if there is, we're not a method + ; (a heuristic guess) + (beginning-of-line) + (goto-char here))))) ;else we're a unary method (guess) + ;; this must be a binary selector, or a temporary + (if (= (following-char) ?|) + (progn ;could be temporary + (end-of-line) + (smalltalk-backward-whitespace) + (if (= (preceding-char) ?|) + (progn + (setq handled t))) + (beginning-of-line))) + (if (not handled) + (progn + (skip-chars-forward (concat "^" smalltalk-whitespace)) + (smalltalk-forward-whitespace) + (skip-chars-forward smalltalk-name-chars)))) ;skip over operand + (if (not (smalltalk-in-bang-syntax)) + (progn (skip-chars-forward "^[") + (forward-char))) + (smalltalk-forward-whitespace) + + ;;sbb 6-Sep-93 14:58:54 attempted fix(skip-chars-forward smalltalk-whitespace) + (if (= (following-char) ?|) ;scan for temporaries + (progn + (forward-char) ;skip over | + (smalltalk-forward-whitespace) + (while (and (not (eobp)) + (looking-at "[a-zA-Z_]")) + (skip-chars-forward smalltalk-name-chars) + (smalltalk-forward-whitespace) + ) + (if (and (= (following-char) ?|) ;only if a matching | as a temp + (< (point) end)) ;and we're after the temps + (narrow-to-region (1+ (point)) end))) ;do we limit the buffer + ;; added "and <..." Dec 29 1991 as a test + (and (< (point) end) + (narrow-to-region (point) end)))))) + +(defun smalltalk-forward-keyword-selector () + "Starting on a keyword, this function skips forward over a keyword selector. +It is typically used to skip over the actual selector for a method." + (let (done) + (while (not done) + (if (not (looking-at "[a-zA-Z_]")) + (setq done t) + (skip-chars-forward smalltalk-name-chars) + (if (= (following-char) ?:) + (progn + (forward-char) + (smalltalk-forward-sexp 1) + (smalltalk-forward-whitespace)) + (setq done t) + (backward-sexp 1)))))) + +(defun smalltalk-white-to-bolp () + "Returns T if from the current position to beginning of line is whitespace. +Whitespace is defined as spaces, tabs, and comments." + (let (done is-white line-start-pos) + (save-excursion + (save-excursion + (beginning-of-line) + (setq line-start-pos (point))) + (while (not done) + (and (not (bolp)) + (skip-chars-backward " \t")) + (cond ((bolp) + (setq done t) + (setq is-white t)) + ((= (char-after (1- (point))) ?\") + (backward-sexp) + (if (< (point) line-start-pos) ;comment is multi line + (setq done t))) + (t + (setq done t)))) + is-white))) + + +(defun smalltalk-backward-comment () + (search-backward "\"") ;find its start + (while (= (preceding-char) ?\") ;skip over doubled ones + (backward-char 1) + (search-backward "\""))) + +(defun smalltalk-current-class () + (let ((here (point)) + curr-hit-point curr-hit new-hit-point new-hit) + (save-excursion + (if (setq curr-hit-point + (search-backward-regexp "^![ \t]*\\(\\(\\w+\\.\\)*\\w+\\)[ \t]+" nil t)) + (setq curr-hit (buffer-substring + (match-beginning 1) + (match-end 1))))) + + (save-excursion + (if (setq new-hit-point + (search-backward-regexp + "^[ \t]*\\(\\w+\\)[ \t]+class[ \t]+\\[" nil t)) + (setq new-hit (buffer-substring + (match-beginning 1) + (match-end 1))))) + (if (and new-hit-point + (or (not curr-hit-point) (> new-hit-point curr-hit-point)) + (smalltalk-in-class-scope-of here new-hit-point)) + (progn (setq curr-hit-point new-hit-point) + (setq curr-hit new-hit))) + + (save-excursion + (if (setq new-hit-point + (search-backward-regexp + "^[ \t]*\\(\\(\\w+\\.\\)*\\w+\\)[ \t]+extend[ \t]+\\[" nil t)) + (setq new-hit (buffer-substring + (match-beginning 1) + (match-end 1))))) + (if (and new-hit-point + (or (not curr-hit-point) (> new-hit-point curr-hit-point))) + (progn (setq curr-hit-point new-hit-point) + (setq curr-hit new-hit))) + + (save-excursion + (if (setq new-hit-point + (search-backward-regexp + "^[ \t]*\\(\\w+\\.\\)*\\w+[ \t]+\\(variable\\|variableWord\\|variableByte\\)?subclass:[ \t]+#?\\(\\w+\\)" nil t)) + (setq new-hit (buffer-substring + (match-beginning 3) + (match-end 3))))) + (if (and new-hit-point + (or (not curr-hit-point) (> new-hit-point curr-hit-point))) + (progn (setq curr-hit-point new-hit-point) + (setq curr-hit new-hit))) + (cons curr-hit curr-hit-point))) + +(defun smalltalk-current-scope-point () + (defun smalltalk-update-hit-point (current search) + (save-excursion + (let ((new-hit-point (funcall search))) + (if (and new-hit-point + (or (not current) (> new-hit-point current))) + new-hit-point + current)))) + (let ((curr-hit-point (smalltalk-current-class-point))) + (setq curr-hit-point + (smalltalk-update-hit-point curr-hit-point + #'(lambda ()(search-backward-regexp "^[ \t]*Eval[ \t]+\\[" nil t)))) + (setq curr-hit-point + (smalltalk-update-hit-point curr-hit-point + #'(lambda ()(search-backward-regexp "^[ \t]*Namespace[ \t]+current:[ \t]+[A-Za-z0-9_.]+[ \t]+\\[" nil t)))) + curr-hit-point)) + +(defun smalltalk-current-class-point () + (cdr (smalltalk-current-class))) + +(defun smalltalk-current-class-name () + (car (smalltalk-current-class))) + +(defun smalltalk-in-bang-syntax () + (let ((curr-hit-point (smalltalk-current-class-point))) + (and curr-hit-point + (save-excursion + (goto-char curr-hit-point) + (beginning-of-line) + (looking-at "!"))))) + +(defun smalltalk-in-class-scope-of (orig curr-hit-point) + (save-excursion + (goto-char curr-hit-point) + (skip-chars-forward " \t") + (skip-chars-forward smalltalk-name-chars) + (skip-chars-forward " \t") + (and (= (following-char) ?c) + ;; check if the class scope ends after the point + (condition-case nil + (progn (skip-chars-forward "^[") + (forward-sexp 1) + (> (point) orig)) + (error t))))) + +(defun smalltalk-in-class-scope () + (let ((curr-hit-point (smalltalk-current-class-point))) + (and curr-hit-point + (smalltalk-in-class-scope-of (point) curr-hit-point)))) + +(defun smalltalk-exit-class-scope () + (interactive) + (if (smalltalk-in-class-scope) + (progn (smalltalk-begin-of-scope) + (skip-chars-forward "^[") + (smalltalk-end-of-defun)))) + +(defun smalltalk-find-message () + (save-excursion + (smalltalk-goto-beginning-of-statement) + (cond + ((smalltalk-looking-at-unary-send) + (if (not (smalltalk-has-sender)) + (progn + (smalltalk-safe-forward-sexp) + (smalltalk-safe-forward-sexp) + (smalltalk-find-message)) + (buffer-substring-no-properties (point) (progn (smalltalk-safe-forward-sexp)(point))))) + ((smalltalk-looking-at-keyword-send) + (concat (smalltalk-find-beginning-of-keyword-send) (smalltalk-find-end-of-keyword-send)))))) + +(defun smalltalk-safe-backward-sexp () + (let (prev-point) + (condition-case nil + (progn + (setq prev-point (point)) + (smalltalk-backward-sexp 1)) + (error (goto-char prev-point))))) + +(defun smalltalk-safe-forward-sexp () + (let (prev-point) + (condition-case nil + (progn + (setq prev-point (point)) + (smalltalk-forward-sexp 1)) + (error (goto-char prev-point))))) + +(defun smalltalk-goto-beginning-of-statement () + (if (not (looking-back "[ \t\n]")) + (smalltalk-safe-backward-sexp))) + +(defun smalltalk-has-sender () + (save-excursion + (smalltalk-backward-whitespace) + (looking-back "[]})A-Za-z0-9']"))) + +(defun smalltalk-looking-at-binary-send () + (looking-at "[^]A-Za-z0-9:_(){}[;.\'\"]+[ \t\n]")) + +(defun smalltalk-looking-at-unary-send () + (looking-at "[A-Za-z][A-Za-z0-9]*[ \t\n]")) + +(defun smalltalk-looking-at-keyword-send () + (looking-at "[A-Za-z][A-Za-z0-9_]*:")) + +(defun smalltalk-looking-back-keyword-send () + (looking-back "[A-z][A-z0-9_]*:")) + +(defun smalltalk-find-end-of-keyword-send () + (save-excursion + (smalltalk-forward-whitespace) + (if (or (looking-at "[.;]") (= (smalltalk-next-keyword) (point))) + "" + (progn + (smalltalk-goto-next-keyword) + (concat (buffer-substring-no-properties (save-excursion (progn (smalltalk-safe-backward-sexp) (point))) (point)) + (smalltalk-find-end-of-keyword-send)))))) + +(defun smalltalk-find-beginning-of-keyword-send () + (save-excursion + (let ((begin-of-defun (smalltalk-at-begin-of-defun))) + (smalltalk-backward-whitespace) + (if (or (if begin-of-defun + (looking-back "[].;]") + (looking-back "[.;]")) + (= (smalltalk-previous-keyword) (point))) + "" + (progn + (smalltalk-goto-previous-keyword) + (concat (smalltalk-find-beginning-of-keyword-send) + (buffer-substring-no-properties (point) (progn (smalltalk-safe-forward-sexp)(+ (point) 1))))))))) + +(defun smalltalk-goto-previous-keyword () + "Go to the previous keyword of the current message send" + (goto-char (smalltalk-previous-keyword))) + +(defun smalltalk-goto-next-keyword () + "Go to the next keyword of the current message send" + (goto-char (smalltalk-next-keyword))) + +(defun smalltalk-previous-keyword-1 () + (smalltalk-backward-whitespace) + (if (looking-back "[>[({.^]") ;; not really ok when > is sent in a keyword arg + nil + (if (= (point) (save-excursion (smalltalk-safe-backward-sexp) (point))) + nil + (progn + (smalltalk-safe-backward-sexp) + (if (smalltalk-looking-at-keyword-send) + (point) + (smalltalk-previous-keyword-1)))))) + +(defun smalltalk-next-keyword-1 () + (smalltalk-forward-whitespace) + (if (looking-at "[])};.]") + nil + (if (= (point) (save-excursion (smalltalk-safe-forward-sexp) (point))) + nil + (progn + (smalltalk-safe-forward-sexp) + (skip-chars-forward ":") + (if (smalltalk-looking-back-keyword-send) + (point) + (smalltalk-next-keyword-1)))))) + +(defun smalltalk-previous-keyword () + (or (save-excursion (smalltalk-previous-keyword-1)) (point))) + +(defun smalltalk-next-keyword () + (or (save-excursion (smalltalk-next-keyword-1)) (point))) + +(provide 'smalltalk-mode) + diff --git a/local/tunnel.el b/local/tunnel.el new file mode 100644 index 0000000..09b95dd --- /dev/null +++ b/local/tunnel.el @@ -0,0 +1,10 @@ +(defun tunnel (port host) + (interactive "sPort: \nsHost: ") + (let ((buffer "SSH Tunnel")) + (async-shell-command + (concat "ssh -C -N -D " port " " host) + buffer) + (with-current-buffer buffer + (insert (concat "Starting tunnel on " host " port " port))))) + +(provide 'tunnel) diff --git a/local/workflow.el b/local/workflow.el new file mode 100644 index 0000000..f5559a6 --- /dev/null +++ b/local/workflow.el @@ -0,0 +1,175 @@ +;;; workflow.el --- basic daily workflow -*- lexical-binding: t; -*- + +;; Copyright (C) 2016 Nicolas Petton + +;; Author: Nicolas Petton +;; Keywords: convenience + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; + +;;; Code: + +(require 'url) +(require 'seq) +(require 'password-store) +(require 'org-pomodoro) + +(defun work-start () + "Start the work day." + (interactive) + (let ((messages '("Hi guys!" + "Good morning everyone!" + "Hello there!" + "Hej Företagsplatsers!"))) + (slack-say (seq-random-elt messages)) + (slack-set-active) + (org-revert-all-org-buffers) + (work-clock-in) + (work-send-weekly-email))) + +(defun work-stop () + "End of the day!" + (interactive) + (let ((messages '("Time to go, see you guys!" + "I'm off for the day, see you!" + ":house: :walking: Cya!" + "Leaving, have a nice evening everyone :-)"))) + (slack-say (seq-random-elt messages)) + (slack-set-away) + (work-clock-out) + (save-some-buffers))) + +(defun work-lunch () + "Stop the clock for lunch." + (interactive) + (let ((messages '("Lunch time!" + "Food guys, see you!" + "Time to get some food"))) + (slack-set-away) + (slack-say (seq-random-elt messages))) + (work-clock-out)) + +(defun work-back-from-lunch () + "Start the clock again when coming back from lunch." + (interactive) + (let ((messages '("I'm back!" + "Back from lunch" + "Back!" + "Back to business"))) + (slack-set-active) + (slack-say (seq-random-elt messages))) + (work-clock-in)) + +(defun slack-token () + "Return the slack token from pass." + (password-store-get "slack-token")) + +(defun slack-say (message) + "Send MESSAGE on the general channel." + (let ((token (slack-token)) + (team "foretagsplatsen") + (channel "C02N47RE1")) + (url-retrieve (format "https://%s.slack.com/api/chat.postMessage?token=%s&channel=%s&text=%s&as_user=true" + team + token + channel + message) + (lambda (&rest _))))) + +(defun slack-set-presence (presence) + "The the presence to PRESENCE on Slack." + (let ((token (slack-token)) + (team "foretagsplatsen")) + (url-retrieve (format "https://%s.slack.com/api/presence.set?presence=%s&token=%s&as_user=true" + team + presence + token) + (lambda (&rest _))))) + +(defun slack-set-away () + "Set the Slack presence to away." + (slack-set-presence "away")) + +(defun slack-set-active () + "Set the slack presence to active." + (slack-set-presence "active")) + +(defun work-clock-in () + (interactive) + (with-current-buffer (find-file-noselect "~/org/gtd.org") + (save-excursion + (save-restriction + (widen) + (goto-char (org-find-entry-with-id "work-clock")) + (org-clock-in))))) + +(defun work-clock-out () + (interactive) + (with-current-buffer (find-file-noselect "~/org/gtd.org") + (save-excursion + (save-restriction + (widen) + (goto-char (org-find-entry-with-id "work-clock")) + (org-clock-out))))) + +(defun work-slack-say-pomodoro-started () + (slack-say "I started a pomodoro, talk to me in 25'!") + (slack-set-away)) + +(defun work-slack-say-pomodoro-finished () + (message "Pomodoro finished!") + (slack-say "I finished a pomodoro, you can now talk to me!") + (slack-set-active)) + +(dolist (hook '(org-pomodoro-started-hook)) + (add-hook hook #'work-slack-say-pomodoro-started)) + +(dolist (hook '(org-pomodoro-killed-hook + org-pomodoro-finished-hook)) + (add-hook hook #'work-slack-say-pomodoro-finished)) + +;;; Send emails as recurring tasks + +(defun work-send-email (from to subject body) + "Send an email from FROM to TO with SUBJECT and BODY." + (with-temp-buffer + (insert (format "From: %s\n" from)) + (insert (format "to: %s\n" to)) + (insert (format "subject: %s\n--text follows this line--\n" subject)) + (insert body) + (message-send-mail))) + +(defun work-day-of-week () + "Return the current day of week number." + (calendar-day-of-week (calendar-current-date))) + +(defun work-current-week-number () + "Return the current week number of the year." + (org-days-to-iso-week (time-to-day-in-year (current-time)))) + +(defun work-send-weekly-email () + "Send a mail every monday about the coming week." + (interactive) + (when (= (work-day-of-week) 1) ;; send this email every Monday + (work-send-email "nicolas@petton.fr" + "ftgp@googlegroups.com" + (format "[Week %s] What does your week look like?" (work-current-week-number)) + "Dear FTGP-ers,\n\nNew week, new opportunities!\nWhat does your week look like?"))) + +(provide 'workflow) +;;; workflow.el ends here diff --git a/places b/places new file mode 100644 index 0000000..9720f37 --- /dev/null +++ b/places @@ -0,0 +1,114 @@ +;;; -*- coding: utf-8 -*- +(("/home/nico/.emacs.d/lib/" + (dired-filename . "/home/nico/.emacs.d/lib/ftgp")) + ("/home/nico/.emacs.d/lib/ftgp/" + (dired-filename . "/home/nico/.emacs.d/lib/ftgp/ftgp.el")) + ("/home/nico/.emacs.d/lib/ftgp/ftgp.el" . 8323) + ("/home/nico/.emacs.d/hosts/" + (dired-filename . "/home/nico/.emacs.d/hosts/blueberry")) + ("/home/nico/.emacs.d/hosts/blueberry/" + (dired-filename . "/home/nico/.emacs.d/hosts/blueberry/init-org.el")) + ("/home/nico/.emacs.d/hosts/blueberry/init-org.el" . 2817) + ("/home/nico/.emacs.d.old/" + (dired-filename . "/home/nico/.emacs.d.old/custom.el")) + ("/home/nico/.emacs.d/" + (dired-filename . "/home/nico/.emacs.d/custom.el")) + ("/home/nico/.emacs.d/custom.el" . 23884) + ("/home/nico/.emacs.d/recentf" . 1307) + ("/home/nico/.emacs.d/.gitmodules" . 52) + ("/home/nico/org/contacts.org" . 154) + ("/home/nico/work/ftgp/monitor/monitor/Monitor.Web.Ui/Client/" + (dired-filename . "/home/nico/work/ftgp/monitor/monitor/Monitor.Web.Ui/Client/js")) + ("/home/nico/.emacs.d/init.el" . 10598) + ("/home/nico/.emacs.d/lib/org/" + (dired-filename . "/home/nico/.emacs.d/lib/org/contrib")) + ("/home/nico/.emacs.d/lib/org/contrib/" + (dired-filename . "/home/nico/.emacs.d/lib/org/contrib/lisp")) + ("/home/nico/.emacs.d/lib/org/contrib/lisp/" . 43) + ("/home/nico/config/emacs.d/" + (dired-filename . "/home/nico/config/emacs.d/ac-comphist.dat")) + ("/home/nico/.emacs.d/local/" + (dired-filename . "/home/nico/.emacs.d/local/eshellbmk.el")) + ("/home/nico/.emacs.d/lib/notmuch/" + (dired-filename . "/home/nico/.emacs.d/lib/notmuch/AUTHORS")) + ("/home/nico/.emacs.d/hosts/blueberry/init-notmuch.el" . 182) + ("/usr/share/emacs/25.2/lisp/loaddefs.el" . 398817) + ("/home/nico/config/emacs.d/init/init-eshell.el" . 5236) + ("/usr/share/emacs/25.2/lisp/textmodes/flyspell.el.gz" . 9711) + ("/home/nico/config/emacs.d/init/init-flyspell.el" . 945) + ("/home/nico/config/emacs.d/init/init-hydra.el" . 2433) + ("/home/nico/config/emacs.d/init/init-ivy.el" . 403) + ("/home/nico/config/emacs.d/init/init-js.el" . 617) + ("/home/nico/.emacs.d/lib/tern/" + (dired-filename . "/home/nico/.emacs.d/lib/tern/AUTHORS")) + ("/home/nico/.emacs.d/lib/widgetjs/" + (dired-filename . "/home/nico/.emacs.d/lib/widgetjs/widgetjs-autoloads.el")) + ("/home/nico/config/emacs.d/init/init-magit.el" . 736) + ("/home/nico/.emacs.d/local/tunnel.el" . 274) + ("/home/nico/.emacs.d/local/open-url-at-point.el" . 308) + ("/home/nico/config/emacs.d/init/init-misc.el" . 7976) + ("/home/nico/config/emacs.d/init/init-slime.el" . 114) + ("/home/nico/config/emacs.d/init/init-tramp.el" . 53) + ("/home/nico/config/emacs.d/init/init-web-mode.el" . 597) + ("/home/nico/config/emacs.d/init/init-whitespace.el" . 607) + ("/home/nico/config/emacs.d/init/init-ws-butler.el" . 66) + ("/home/nico/.local/" + (dired-filename . "/home/nico/.local/share")) + ("/home/nico/config/emacs.d/local-packages/eshellbmk.el" . 521) + ("/home/nico/config/emacs.d/local-packages/" . 1007) + ("/home/nico/.emacs.d/hosts/strawberry/init-strawberry.el" . 228) + ("/home/nico/.emacs.d/hosts/strawberry/" + (dired-filename . "/home/nico/.emacs.d/hosts/strawberry/init-strawberry-appearance.el")) + ("/home/nico/.emacs.d/hosts/losedows/" + (dired-filename . "/home/nico/.emacs.d/hosts/losedows/init-losedows.el")) + ("/home/nico/.emacs.d/hosts/blueberry/init-epg.el" . 33) + ("/home/nico/config/emacs.d/hosts/" + (dired-filename . "/home/nico/config/emacs.d/hosts/blueberry")) + ("/home/nico/config/emacs.d/init/init-elisp.el" . 853) + ("/home/nico/config/emacs.d/init/init-dired.el" . 1814) + ("/home/nico/config/emacs.d/init/init-drag-stuff.el" . 233) + ("/home/nico/config/emacs.d/init/init-ediff.el" . 178) + ("/home/nico/config/emacs.d/init/init-erc.el" . 108) + ("/home/nico/config/emacs.d/custom.el" . 15667) + ("/home/nico/config/emacs.d/init/init-company.el" . 231) + ("/home/nico/config/emacs.d/init.el" . 1110) + ("/home/nico/config/emacs.d/init/init-abbrev.el" . 618) + ("/home/nico/config/emacs.d/init/init-anzu.el" . 365) + ("/home/nico/config/emacs.d/init/init-apg.el" . 464) + ("/home/nico/config/emacs.d/init/init-auth-password-store.el" . 89) + ("/home/nico/config/emacs.d/init/init-pass.el" . 120) + ("/home/nico/config/emacs.d/init/init-avy.el" . 73) + ("/home/nico/.emacs.d/.git/modules/" + (dired-filename . "/home/nico/.emacs.d/.git/modules/auth-password-store")) + ("/home/nico/.emacs.d/.git/" + (dired-filename . "/home/nico/.emacs.d/.git/config")) + ("/home/nico/.emacs.d/.git/config" . 2233) + ("/home/nico/config/emacs.d/init/init-backups.el" . 448) + ("/home/nico/config/emacs.d/init/init-multiple-cursors.el" . 360) + ("/home/nico/config/emacs.d/init/init-private-modules.el" . 188) + ("/home/nico/config/emacs.d/init/init-projectile.el" . 138) + ("/home/nico/config/emacs.d/init/init-restclient.el" . 175) + ("/home/nico/.emacs.d/lib/know-your-http-well/emacs/" + (dired-filename . "/home/nico/.emacs.d/lib/know-your-http-well/emacs/know-your-http-well.el")) + ("/home/nico/.emacs.d/lib/know-your-http-well/" + (dired-filename . "/home/nico/.emacs.d/lib/know-your-http-well/emacs")) + ("/home/nico/config/emacs.d/init/init-clojure.el" . 605) + ("/home/nico/config/emacs.d/init/init-css.el" . 82) + ("/home/nico/.emacs.d/lib/know-your-http-well/know-your-http-well-autoloads.el" . 89) + ("/home/nico/org/reference/password-store/appleId.gpg" . 58) + ("/home/nico/.emacs.d/lib/pass/pass.el" . 1360) + ("/home/nico/.emacs.d/local/apg.el" . 1344) + ("/home/nico/" + (dired-filename . "/home/nico/.emacs.d")) + ("/home/nico/.emacs.d.old/init.el" . 1038) + ("/usr/share/emacs/25.2/lisp/gnus/gnus-dired.el.gz" . 3690) + ("/home/nico/.emacs.d/lib/emacs-js/" + (dired-filename . "/home/nico/.emacs.d/lib/emacs-js/emacs-js.el")) + ("/home/nico/.emacs.d/lib/use-package/use-package.el" . 52598) + ("/usr/share/emacs/25.2/lisp/reveal.el.gz" . 1663) + ("/home/nico/.emacs.d.old/init/" . 121) + ("/home/nico/config/emacs.d/init/init-appearance.el" . 568) + ("/home/nico/config/emacs.d/hosts/blueberry/init-blueberry-appearance.el" . 91) + ("/home/nico/config/" + (dired-filename . "/home/nico/config/emacs.d")) + ("/usr/share/emacs/25.2/lisp/saveplace.el.gz" . 1306)) diff --git a/projectile-bookmarks.eld b/projectile-bookmarks.eld new file mode 100644 index 0000000..c5a04ba --- /dev/null +++ b/projectile-bookmarks.eld @@ -0,0 +1 @@ +("~/.emacs.d/" "~/org/" "~/config/emacs.d/" "~/.emacs.d/lib/use-package/") \ No newline at end of file diff --git a/projectile.cache b/projectile.cache new file mode 100644 index 0000000..a7d9917 --- /dev/null +++ b/projectile.cache @@ -0,0 +1 @@ +#s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ()) \ No newline at end of file