From 3dc7ccc943c54180d31e6a28761778562f8c0be2 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Thu, 25 Aug 2016 20:03:21 -0700 Subject: [PATCH] misc bug fixes and cleanup --- .gitignore | 4 +- dev.org | 8 ++++ init.el | 3 +- my-init.org | 132 +++++++++++++++++++++++++++------------------------- 4 files changed, 81 insertions(+), 66 deletions(-) create mode 100644 dev.org diff --git a/.gitignore b/.gitignore index cbbab4e..4e66516 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,6 @@ /.ido.last /info /ltxpng -/my-init.el /network-security.data /org-clock-save.el /.org-id-locations @@ -27,6 +26,9 @@ *.elc +# artifacts I create +/my-init.el +/dev.el ## ignore mail/gnus cruft for those who keep mail in this directory drafts diff --git a/dev.org b/dev.org new file mode 100644 index 0000000..f7bcedd --- /dev/null +++ b/dev.org @@ -0,0 +1,8 @@ +Things in development in this separate file, because +we recompile / reparse my-init.org whenever it changes, +and since it's pretty big, it's a bit annoying. + +We need at least one of these, even a blank one to avoid error on startup. +#+begin_src emacs-lisp + +#+end_src diff --git a/init.el b/init.el index b3312e4..16be261 100644 --- a/init.el +++ b/init.el @@ -86,6 +86,7 @@ org-info org-jsinfo org-irc org-mew org-mhe org-rmail org-vm org-wl org-w3m org-habit org-drill org-mobile))) - (org-babel-load-file (expand-file-name "my-init.org" init-dir)))) + (org-babel-load-file (expand-file-name "my-init.org" init-dir)) + (org-babel-load-file (expand-file-name "dev.org" init-dir)))) ;;; init.el ends here diff --git a/my-init.org b/my-init.org index b854dbe..c7efdac 100644 --- a/my-init.org +++ b/my-init.org @@ -19,7 +19,7 @@ * things that should be at the beginning #+begin_src emacs-lisp ;; todo, evaluating this manually disables debug on error instead of toggling it -;;(toggle-debug-on-error) ;uncomment to help debug and catch errors +(toggle-debug-on-error) ;uncomment to help debug and catch errors #+end_src @@ -161,6 +161,8 @@ If it is different, emacs will give a message about recovering it when you open * TODO shell mode reverse search hides 2nd+ line of multi-line result +* TODO report bug in latest emacs, +c-c ', does't exit org-mode src editing mode. * TODO button for switching to scratch buffer * TODO figure out browsing files with broken nfs mount causes emacs to freeze until I kill -9 it. @@ -197,7 +199,9 @@ bad code, the comment this relates to was removed, but not the comment The change in status_notify's return is just passing more information from what it did already. No changes at all inside this function. - +* TODO consider whether to bind indent-for-tab-command +I removed it from m-tab for terminal compatibility. +It's the default tab command, which yasnippet replaces. * TODO readline-complete: remove the hardcoded rlc-no-readline-hook * TODO isearch doesn't automatically wrap in info * TODO look into fixing shell mode reverse search @@ -813,6 +817,47 @@ Things I tried which didn't work, which intuitively I think should work better: :PROPERTIES: :tangle: no :END: +** org mode website + +#+begin_src emacs-lisp +;; use org-publish-current-project with a project file open +(setq org-publish-project-alist + '(("org" + :base-directory "/a/h/src" + :publishing-directory "/a/h/output" + :base-extension "org" + ;;:publishing-function org-org-publish-to-org + :publishing-function org-html-publish-to-html + :preserve-breaks t + :html-postamble "Everything here is \"Creative" + :html-head "" + :htmlized-source t) + ("othersrc" + :base-directory "/a/h/src" + :base-extension "css\\|el\\|" + :publishing-directory "/a/h/output" + :publishing-function org-publish-attachment) + ("other" + :base-directory "/a/h/other" + :base-extension ".*" + :publishing-directory "/a/h/output" + :publishing-function org-publish-attachment))) +;; default is xhtml-strict. don't really care, but this is more common +(setq org-html-doctype "html4-strict") + +;; this is needed for worg +;; todo: for my own site, I need to define the css in a separate file +;; in order to use this setting. see the variable help for info +(setq org-export-htmlize-output-type t) + + +#+end_src + ** bash-completion #+begin_src emacs-lisp ;; this eventually gets set in @@ -1959,6 +2004,8 @@ currently makes emacs hang a bunch. dunno why. just using eclipse instead * modes with little configuration needed #+begin_src emacs-lisp +(load-file "/a/h/iank-mod.el") + (require 'ws-butler) (ws-butler-global-mode) @@ -3094,46 +3141,16 @@ clicking on info links (org-clock-in))) -;; use org-publish-current-project with a project file open -(setq org-publish-project-alist - '(("org" - :base-directory "/a/h/src" - :publishing-directory "/a/h/output" - :base-extension "org" - ;;:publishing-function org-org-publish-to-org - :publishing-function org-html-publish-to-html - :preserve-breaks t - :html-postamble "Everything here is \"Creative" - :html-head "" - :htmlized-source t) - ("othersrc" - :base-directory "/a/h/src" - :base-extension "css\\|el\\|" - :publishing-directory "/a/h/output" - :publishing-function org-publish-attachment) - ("other" - :base-directory "/a/h/other" - :base-extension ".*" - :publishing-directory "/a/h/output" - :publishing-function org-publish-attachment))) -;; default is xhtml-strict. don't really care, but this is more common -(setq org-html-doctype "html4-strict") - -;; this is needed for worg -;; todo: for my own site, I need to define the css in a separate file -;; in order to use this setting. see the variable help for info -(setq org-export-htmlize-output-type t) - ;; based on http://stackoverflow.com/questions/3758139/variable-pitch-for-org-mode-fixed-pitch-for-tables ;; keywords: proportional font, monospace -(add-hook 'fundamental-mode-hook 'variable-pitch-mode) -(add-hook 'text-mode-hook 'variable-pitch-mode) + +(defun variable-pitch-on () + (variable-pitch-mode 1)) +(add-hook 'fundamental-mode-hook 'variable-pitch-on) +(add-hook 'org-mode-hook 'variable-pitch-on) +(add-hook 'text-mode-hook 'variable-pitch-on) + (set-face-attribute 'org-table nil :family (face-attribute 'fixed-pitch :family)) (set-face-attribute 'org-code nil :family (face-attribute 'fixed-pitch :family)) (set-face-attribute 'org-formula nil :family (face-attribute 'fixed-pitch :family)) @@ -6150,6 +6167,7 @@ macro end / call [ #+begin_src emacs-lisp (global-set-key (kbd "C-M-a") 'kmacro-end-or-call-macro) + (add-hook 'perl-mode-hook (lambda () (define-key perl-mode-map (kbd "C-M-a") nil))) (add-hook 'LaTeX-mode-hook (lambda () (define-key LaTeX-mode-map (kbd "C-M-a") nil))) (add-hook 'c-mode-hook (lambda () (define-key c-mode-map (kbd "C-M-a") nil))) @@ -6671,16 +6689,9 @@ SCHEDULED: <2014-03-27 Thu> :DRILL_LAST_QUALITY: 5 :DRILL_LAST_REVIEWED: <2014-02-04 Tue 11:42> :END: -yas-expand - [ - #+begin_src emacs-lisp -;; yas keymaps are already initialized when this runs, -;; but I use a hook because it the way I do it for all other minor modes - (add-hook 'yas-minor-mode-hook (lambda () - (define-key yas-minor-mode-map (kbd "") 'yas-expand) - (define-key yas-keymap (kbd "") 'yas-next-field-or-maybe-expand))) - (global-set-key (kbd "") 'yas-insert-snippet) -#+end_src +--- +[ +in terminal, it's just TAB, duplicate keybind. ] *** [M-tab] :drill: SCHEDULED: <2014-03-14 Fri> @@ -6697,14 +6708,9 @@ SCHEDULED: <2014-03-14 Fri> :DRILL_LAST_QUALITY: 4 :DRILL_LAST_REVIEWED: <2014-02-19 Wed 16:35> :END: -indent line +--- [ -#+begin_src emacs-lisp - - (global-set-key (kbd "") 'indent-for-tab-command) - - ; todo, overrides calculator mode map -#+end_src +in terminal it's duplicated of C-M-i ] *** C-M-tab :PROPERTIES: @@ -7486,18 +7492,12 @@ SCHEDULED: <2014-03-19 Wed> :DRILL_LAST_QUALITY: 4 :DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:45> :END: -comment-dwim - [ -#+begin_src emacs-lisp - (global-set-key (kbd "C-;") 'comment-dwim) - (add-hook 'flyspell-mode-hook - (lambda () (define-key flyspell-mode-map (kbd "C-;") nil))) -#+end_src -] +used in flyspell, not sure what for, otherwise unbound *** M-; :PROPERTIES: :CUSTOM_ID: 211e76d9-d89a-4cc6-abce-69397d456fda :END: +comment-dwim *** [C-M-;] :drill: SCHEDULED: <2014-04-07 Mon> :PROPERTIES: @@ -8044,6 +8044,9 @@ org-edit-special (add-hook 'org-mode-hook (lambda () (define-key org-mode-map (kbd "C-SPC") 'org-edit-special) + ;; org-src-mode-map is broken in git version of emacs. + ;; temporarily use this for exiting edit-special mode. + (global-set-key (kbd "C-M--") 'org-edit-src-exit) (define-key org-src-mode-map (kbd "C-SPC") 'org-edit-src-exit))) #+end_src ] @@ -8443,6 +8446,7 @@ insert-apache :PROPERTIES: :CUSTOM_ID: 6febc7ea-9cc7-488c-af34-538b8e69633b :END: +org-edit-src-exit *** C-S-- :PROPERTIES: :CUSTOM_ID: c73af1d7-61f2-4c1b-935e-43f077d8d915 -- 2.30.2