;; Xft.antialias: true
;; Xft.rgba: rgb
-(set-frame-font "Inconsolata 14")
+;;(set-frame-font "Inconsolata 14")
;; (package-initialize)
;; Where I keep my own scripts
-(add-to-list 'load-path "~/sources/gpl/elisp")
-(add-to-list 'load-path "~/sources/elisp")
+(add-to-list 'load-path "~/src/gpl/elisp")
+(add-to-list 'load-path "~/src/elisp")
(add-to-list 'load-path "~/local/elisp")
;; No, I do not like menus
;; (fringe :background "black" :foreground "gray90")
(fringe :background "gray80")
(ff/date-info-face :foreground "white")
- (ff/battery-info-face :foreground "black")
+ (ff/battery-info-face :foreground "blue")
(ff/battery-info-alarm-face :foreground "red")
;; (ff/mail-alarm-face :foreground "white" :background "red2")
;; (alarm-vc-face :foreground "black" :background "yellow" :weight 'normal)
(defun ff/show-compilation-buffer-split-window ()
"Split the window vertically and show the compilation buffer in the newly created right one"
(interactive)
- (show-buffer (split-window-right) "*compilation*")
+
+ (let ((b (get-buffer "*compilation*")))
+ (if b (show-buffer (split-window-right) b)
+ (error "Cannot find a compilation buffer"))
+ )
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
)
)
- ;; (`unknown "✱")
- (`unknown "F")
+ (`unknown (propertize "☼" 'face 'ff/battery-info-face))
+ ;; (`unknown "☼")
+ ;; (`unknown "F")
(_ "?"))
(error nil))
)
(when (ff/load-or-alert "alarm-vc" t)
(setq alarm-vc-mode-exceptions "^VM"))
-(when (ff/load-or-alert "git")
- (setq git-show-unknown nil)
- )
+;; (when (ff/load-or-alert "git")
+ ;; (setq git-show-unknown nil)
+ ;; )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Makes .sh and others files executable automagically
(process-kill-without-query xdvi-process))))
))
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defun ff/save-window-configuration (universal) (interactive "P")
+ (if universal
+ (progn
+ (setq ff/window-configuration (current-window-configuration))
+ (message "Window configuration stored")
+ )
+ (set-window-configuration ff/window-configuration))
+ )
+
+(define-key global-map [(control =)] 'ff/save-window-configuration)
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Tex mode
(goto-char (point-min))
(insert "%% -*- mode: latex; mode: reftex; mode: flyspell; coding: utf-8; tex-command: \"pdflatex.sh\" -*-
-\\documentclass[12pt,a4paper,twoside]{article}
+\\documentclass[11pt,a4paper,twoside]{article}
\\usepackage[a4paper,top=2.5cm,bottom=2cm,left=2.5cm,right=2.5cm]{geometry}
\\usepackage[utf8]{inputenc}
-\\usepackage{amsmath}
-\\usepackage{amssymb}
+\\usepackage{amsmath,amssymb,dsfont}
\\usepackage[pdftex]{graphicx}
-\\usepackage{microtype}
\\usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue,citecolor=blue]{hyperref}
\\usepackage{tikz}
+\\usepackage[round]{natbib}
+\\usepackage{cmbright}
+%\\usepackage{showframe}
\\setlength{\\parindent}{0cm}
\\setlength{\\parskip}{12pt}
-\\renewcommand{\\baselinestretch}{1.3}
+%\\renewcommand{\\baselinestretch}{1.3}
%\\setlength{\\tabcolsep}{0pt}
%\\renewcommand{\\arraystretch}{1.0}
\\def\\argmax{\\operatornamewithlimits{argmax}}
\\def\\argmin{\\operatornamewithlimits{argmin}}
+\\def\\expect{\\mathds{E}}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Open sans font
-%%\\usepackage[default]{opensans}
-%%\\usepackage{cmbright}
-%%\\renewcommand{\\familydefault}{fos}
-%%\\renewcommand{\\seriesdefault}{l}
-%%\\renewcommand{\\bfdefault}{sb}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% The \\todo command
\\newcounter{nbdrafts}
(goto-char (point-max))
(insert "
+\\bibliographystyle{abbrvnat}
+
+\\bibliography{dlc}
+
+\\checknbdrafts
+
\\end{document}
"))
(latex-mode))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\\begin{frame}{")
+\\begin{frame}[fragile]{")
(save-excursion (insert "}{}
"))
(insert "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\\begin{frame}{")
+\\begin{frame}[fragile]{")
(save-excursion (insert "}{}
(define-key global-map [(shift f1)] 'compile)
(define-key global-map [f2] 'next-error)
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Horrible hack
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defun dont-delay-compile-warnings (fun type &rest args)
+ (if (eq type 'bytecomp)
+ (let ((after-init-time t))
+ (apply fun type args))
+ (apply fun type args)))
+(advice-add 'display-warning :around #'dont-delay-compile-warnings)
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Related to mail
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; (insert (format-time-string "%d.%m.%Y" (current-time))))
)
-(define-key ff/map [(control g)] 'ff/git-status)
+(define-key ff/map [(control g)] 'magit)
+;;(define-key ff/map [(control g)] 'ff/git-status)
;; (define-key ff/map [(control w)] 'server-edit)
(define-key ff/map [(control d)] 'ff/elisp-debug-on)
;; (define-key ff/map "d" 'diary)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Runs in server mode, so that emacsclient works
-(server-start)
+;; ;;(server-start)
-(defun ff/raise-frame-and-give-focus ()
- (when window-system
- (raise-frame)
- (x-focus-frame (selected-frame))
- (set-mouse-pixel-position (selected-frame) 4 4)
- ))
+;; (defun ff/raise-frame-and-give-focus ()
+ ;; (when window-system
+ ;; (raise-frame)
+ ;; (x-focus-frame (selected-frame))
+ ;; (set-mouse-pixel-position (selected-frame) 4 4)
+ ;; ))
-;; Raises the window when the server is invoked
+;; ;; Raises the window when the server is invoked
-(add-hook 'server-switch-hook 'ff/raise-frame-and-give-focus)
+;; (add-hook 'server-switch-hook 'ff/raise-frame-and-give-focus)