You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(add-to-list'default-frame-alist '(font ."DejaVu Sans Mono-16"))
;; Use org-mode
(use-packageorg:ensuret:mode ("\\.org$". org-mode))
(setq org-log-done 'time)
(setq org-agenda-include-diary t)
(setq diary-file "~/.emacs.d/diarydata")
(setq org-agenda-files '("~/org"))
(setq org-export-with-section-numbers nil)
(setq org-export-with-smart-quotes t)
(setq org-export-with-sub-superscripts t)
(setq org-export-with-toc t)
(eval-after-load"org"
'(require'ox-mdnilt))
;;(setq org-clock-persist 'history);;(org-clock-persistence-insinuate)
(global-set-key"\C-cl"'org-store-link)
(global-set-key"\C-cb"'org-iswitchb)
(add-to-list'load-path"~/.emacs.d/org/lisp")
(add-to-list'load-path"~/.emacs.d/org/contrib/lisp"t)
;; The following lines are always needed. Choose your own keys.
(add-hook'org-mode-hook'turn-on-font-lock) ; not needed when global-font-lock-mode is on;; See also list of keys at top of config;; Enable block comments (in theory);;(require 'org-exp-blocks)
(setq org-todo-keywords
'((sequence "TODO""RESEARCH""|""DONE""DELEGATED""CANCELLED")))
(setq org-enforce-todo-dependencies t)
(add-hook'org-finalize-agenda-hook
(lambda ()
(setq appt-message-warning-time 10;; warn 10 min in advance
appt-display-diary nil;; don't display diary when (appt-activate) is called
appt-display-mode-line t;; show in the modeline
appt-display-format 'window;; display notification in window
calendar-mark-diary-entries-flag t) ;; mark diary entries in calendar
(org-agenda-to-appt) ;; copy all agenda schedule to appointments
(appt-activate1))) ;; active appt (appointment notification);; display agenda in a single window;;(add-hook 'org-agenda-finalize-hook (lambda () (delete-other-windows)));; begin agenda with today and extend out a month
(setq org-agenda-start-on-weekday nil)
(setq org-agenda-span 31)
(setq cal-tex-holidays t) ;; printed calendars show the holidays in calendar-holidays
(setq cal-tex-diary t) ;; printed calendars show diary entries;;(calendar-set-date-style 'iso)
(setq calendar-bahai-all-holidays-flag t)
(setq calendar-christian-all-holidays-flag t)
(setq calendar-hebrew-all-holidays-flag t)
(setq calendar-islamic-all-holidays-flag t)
(global-set-key"\C-ca"'org-agenda)
;;(setq org-hide-emphasis-markers t)
(font-lock-add-keywords'org-mode
'(("^ +\\([-*]\\) "
(0 (prog1 () (compose-region (match-beginning1) (match-end1) "•"))))))
(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.
'(package-selected-packages
(quote
(init-magit org-link-minor-mode pandoc-mode elfeed-web elfeed-org use-package ace-jump-mode yaoddmuse pdf-tools magit melpa-upstream-visit org))))
(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.
'(org-document-title ((t (:inheritdefault:weightbold:foreground"black":family"Sans Serif":height1.5:underlinenil))))
'(org-level-1 ((t (:inheritdefault:weightbold:foreground"black":family"Sans Serif":height1.75))))
'(org-level-2 ((t (:inheritdefault:weightbold:foreground"black":family"Sans Serif":height1.5))))
'(org-level-3 ((t (:inheritdefault:weightbold:foreground"black":family"Sans Serif":height1.25))))
'(org-level-4 ((t (:inheritdefault:weightbold:foreground"black":family"Sans Serif":height1.1))))
'(org-level-5 ((t (:inheritdefault:weightbold:foreground"black":family"Sans Serif"))))
'(org-level-6 ((t (:inheritdefault:weightbold:foreground"black":family"Sans Serif"))))
'(org-level-7 ((t (:inheritdefault:weightbold:foreground"black":family"Sans Serif"))))
'(org-level-8 ((t (:inheritdefault:weightbold:foreground"black":family"Sans Serif")))))
Abbreviations
(setq-default abbrev-mode t)
;; save abbreviations upon exiting emacs
(setq save-abbrevs t)
;; set the file storing the abbreviations
(setq abbrev-file-name "~/.emacs.d/my-abbreviations.el")
;; read the abbreviations file on startup
(quietly-read-abbrev-file)
Show kill ring (Xah Lee)
(defunxah-show-kill-ring ()
"Insert all `kill-ring' content in a new buffer.URL `http://ergoemacs.org/emacs/emacs_show_kill_ring.html'Version 2017-06-19"
(interactive)
(let (($buf (generate-new-buffer"untitled")))
(progn
(switch-to-buffer $buf)
(funcall'fundamental-mode)
(setq buffer-offer-save t)
(dolist (x kill-ring )
(insert x "\n--------------------------------------------------\n\n"))
(goto-char (point-min)))))
(global-set-key (kbd"M-y") 'xah-show-kill-ring)
;; conflicts with clocking;;(eval-after-load "org";; '(require 'ox-md nil t))
Live word count (Sacha Chua)
(defvarcount-words-buffernil"*Number of words in the buffer.")
(defunwicked/update-wc ()
(interactive)
(setq count-words-buffer (number-to-string (count-words-buffer)))
(force-mode-line-update))
; only setup timer once
(unless count-words-buffer
;; seed count-words-paragraph;; create timer to keep count-words-paragraph updated
(run-with-idle-timer1t'wicked/update-wc))
;; add count words paragraph the mode line
(unless (memq'count-words-buffer global-mode-string)
(add-to-list'global-mode-string"words: "t)
(add-to-list'global-mode-string'count-words-buffert))
;; count number of words in current paragraph
(defuncount-words-buffer ()
"Count the number of words in the current paragraph."
(interactive)
(save-excursion
(goto-char (point-min))
(let ((count0))
(while (not (eobp))
(forward-word1)
(setq count (1+ count)))
count)))
;; checks (on saving) whether the file you edit contains a shebang, ;; and if yes, makes it executable
(add-hook'after-save-hook'executable-make-buffer-file-executable-if-script-p)
Unfill paragraph (Sacha Chua)
(defununfill-paragraph (&optionalregion)
"Takes a multi-line paragraph and makes it into a single line of text."
(interactive (progn
(barf-if-buffer-read-only)
(listt)))
(let ((fill-column (point-max)))
(fill-paragraphnilregion)))
(global-set-key (kbd"M-Q") 'unfill-paragraph)
Yubnub
(defunyubnub (command)
"Use `browse-url' to submit a command to yubnub and openresult in an external browser defined in `browse-url-browser-function'.To get started, `M-x yubnub <RET> ls <RET>' will return a list of all yubnub commands."
(interactive"sYubnub: ")
(browse-url
(concat"http://yubnub.org/parser/parse?command=" command)))
(global-set-key (kbd"s-x") 'yubnub)