X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=emacs.el;h=525a118458858be6824c27450ddac722006a9526;hb=85c4238d46e71c1ded36f9ba912d66a6de4db708;hp=0f196540801556885c89698e11efff69b664e9b6;hpb=2aed80dfca45ed89267c1f7c3c576002f4fa0e05;p=elisp.git diff --git a/emacs.el b/emacs.el index 0f19654..525a118 100644 --- a/emacs.el +++ b/emacs.el @@ -428,7 +428,8 @@ load-warning buffer in case of failure." (ff/configure-faces '( - (escape-glyph :foreground "#c0c0c0" :weight 'bold) + ;; (escape-glyph :foreground "#c0c0c0" :weight 'bold) + (escape-glyph :foreground "green3" :weight 'bold) (default :background "gray90" :foreground "black") (cperl-array-face :background "gray90" :foreground "blue" :weight 'bold) (cperl-hash-face :background "gray90" :foreground "purple" :weight 'bold) @@ -683,8 +684,8 @@ occurrences " (load "ps-print") (setq ps-print-color-p nil - ;; ps-paper-type 'letter - ps-paper-type 'a4 + ps-paper-type 'letter + ;; ps-paper-type 'a4 ;; ps-top-margin (* 1.75 56.692) ;; ps-left-margin 56.692 ;; ps-bottom-margin 56.692 @@ -829,8 +830,10 @@ printer." (ff/battery-percent "energy")))) ((string= battery-status "Discharging") - (format "B%d%%" (max (ff/battery-percent "charge") - (ff/battery-percent "energy")))) + (let* ((c (max (ff/battery-percent "charge") + (ff/battery-percent "energy"))) + (s (format "B%d%%" c))) + (if (>= c 20) s (propertize s 'face 'font-lock-warning-face)))) (t battery-status) @@ -1429,20 +1432,16 @@ universal argument starts xfig even if the .fig does not exist" \\usepackage[utf8]{inputenc} \\usepackage{amsmath} \\usepackage{amssymb} +\\usepackage[pdftex]{graphicx} \\usepackage{microtype} +\\usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue,citecolor=blue]{hyperref} -%% \\usepackage[pdftex]{graphicx} -%% \\usepackage{eurosym} +\\setlength{\\parindent}{0cm} +\\setlength{\\parskip}{12pt} +\\renewcommand{\\baselinestretch}{1.3} -\\usepackage{hyperref} - -\\hypersetup{ - pdfborder={0 0 0}, - colorlinks=true, - linkcolor=blue, - urlcolor=blue, - citecolor=blue -} +\\def\\argmax{\\operatornamewithlimits{argmax}} +\\def\\argmin{\\operatornamewithlimits{argmin}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Sans serif fonts @@ -1452,12 +1451,16 @@ universal argument starts xfig even if the .fig does not exist" %% \\renewcommand{\\ttdefault}{pcr} %% \\renewcommand*\\familydefault{\\sfdefault} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% \\def\\argmax{\\operatornamewithlimits{argmax}} -%% \\def\\argmin{\\operatornamewithlimits{argmin}} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% \\setlength{\\parindent}{0cm} -%% \\setlength{\\parskip}{12pt} -%% \\renewcommand{\\baselinestretch}{1.3} +%% The \\todo command +\\newcounter{nbdrafts} +\\setcounter{nbdrafts}{0} +\\makeatletter +\\newcommand{\\checknbdrafts}{ +\\ifnum \\thenbdrafts > 0 +\\@latex@warning@no@line{*WARNING* The document contains \\thenbdrafts \\space draft note(s)} +\\fi} +\\newcommand{\\todo}[1]{\\addtocounter{nbdrafts}{1}{\\color{red} #1}} +\\makeatother %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \\begin{document} @@ -2113,6 +2116,9 @@ This may be a useful alternative binding for \\[delete-other-windows] (setq longlines-show-hard-newlines t longlines-auto-wrap t ;; longlines-show-effect #("|\n" 0 2 (face escape-glyph)) + ;; longlines-show-effect #("∴\n" 0 2 (face escape-glyph)) + longlines-show-effect #("•\n" 0 2 (face escape-glyph)) + ;; longlines-show-effect #("↵\n" 0 2 (face escape-glyph)) ) ;; (defun ff/auto-longlines () @@ -2496,6 +2502,7 @@ with a time tag, and save this file" (define-key ff/map [(control o)] 'selector/quick-pick-recent) (define-key ff/map "s" 'selector/quick-move-in-buffer) (define-key ff/map "S" 'selector/search-sentence) +(define-key ff/map "t" (lambda () (interactive) (find-file "~/private/TODO.txt"))) (define-key ff/map "h" 'ff/tidy-html) (define-key ff/map "c" 'ff/count-char) (define-key ff/map [(control p)] 'ff/print-to-file)