How to set Firefox as the default browser under Windows 10 when it does not show up in the default program list under “Default apps”

 

1 Summary: after re-install Firefox (version 65.01 64-bit), I cannot set it as the default browser of Windows 10. It turned out that the registry entry of Firefox was messed up.

1.1 symptoms

  • under Windows 10, Firefox did not appear in the program list under “Default apps”Set_FF_default_browser
  • after the fix, Firefox reappeared in the program list

1.2 the two major Firefox registry entries are: FirefoxHTML, FirefoxURL

1.3 detailed settings

  • FirefoxHTML
    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxHTML]
    @="Firefox Document"
    "FriendlyTypeName"="Firefox Document"
    "EditFlags"=dword:00000002
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxHTML\DefaultIcon]
    @="C:\\Program Files\\Mozilla Firefox\\firefox.exe,1"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxHTML\shell]
    @="open"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxHTML\shell\open]
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxHTML\shell\open\command]
    @="\"C:\\Program Files\\Mozilla Firefox\\firefox.exe\" -osint -url \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxHTML\shell\open\ddeexec]
    @=""
    
    
  • FirefoxURL
    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxURL]
    @="Firefox URL"
    "FriendlyTypeName"="Firefox URL"
    "URL Protocol"=""
    "EditFlags"=dword:00000002
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxURL\DefaultIcon]
    @="C:\\Program Files\\Mozilla Firefox\\firefox.exe,1"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxURL\shell]
    @="open"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxURL\shell\open]
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxURL\shell\open\command]
    @="\"C:\\Program Files\\Mozilla Firefox\\firefox.exe\" -osint -url \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxURL\shell\open\ddeexec]
    @=""
    

1.4 how I figured out this is the issue

  • I compared the settings of Chrome, which also has ChromeHTML and ChromeURL
  • I also found the FirefoxHTML and FirefoxURL entries, but the original settings were strange (the “kernel32::GetLongPathNameW” lines below):
    • FirefoxHTML
      Windows Registry Editor Version 5.00
      
      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxHTML]
      @="Firefox HTML Document"
      "FriendlyTypeName"="Firefox HTML Document"
      "EditFlags"=dword:00000002
      
      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxHTML\Application]
      
      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxHTML\DefaultIcon]
      @="C:\\Program Files\\Mozilla Firefox\\firefox.exe,0"
      
      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxHTML\shell]
      @="open"
      
      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxHTML\shell\open]
      
      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxHTML\shell\open\command]
      @="\"kernel32::GetLongPathNameW(w R8, w .R7, i 1024)i .R6\" -osint -url \"%1\""
      
      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxHTML\shell\open\ddeexec]
      @=""
      
    • FirefoxURL
      Windows Registry Editor Version 5.00
      
      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxURL]
      @="Firefox URL"
      "FriendlyTypeName"="Firefox URL"
      "URL Protocol"=""
      "EditFlags"=dword:00000002
      
      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxURL\DefaultIcon]
      @="kernel32::GetLongPathNameW(w R8, w .R7, i 1024)i .R6,1"
      
      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxURL\shell]
      @="open"
      
      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxURL\shell\open]
      
      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxURL\shell\open\command]
      @="\"kernel32::GetLongPathNameW(w R8, w .R7, i 1024)i .R6\" -osint -url \"%1\""
      
      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxURL\shell\open\ddeexec]
      @=""
      
  • I also found in the registry another pair of FirefoxHTML-XXXXX and FirefoxURL-XXXXX (with XXXXX being a random alphanumeric string). So I thought, maybe the messy FirefoxHTML and FirefoxURL were from the old installation, and the -XXXXX version were the correct version.
    • I then just backed up the messy registry entries, removed them, and renamed the -XXXXX version into FirefoxHTML and FirefoxURL
    • PROJ-DONE then problem solved

Configurations for beautifying Emacs org mode

Configurations for beautifying Emacs org mode

1 Summary

  1. Purpose of the configuration: to beautify org-mode’s appearance with some eye-candies
  2. The configuration contains the following parts
    • choose the right font and fall-back font
    • enable utf coding
    • select org-bullet symbol set
    • select org-ellipsis symbol
    • define the faces of org-bullet

2 choose the font and fall-back font

;; set the fall-back font
;; this is critical for displaying various unicode symbols, such as those used in my init-org.el settings
;; http://endlessparentheses.com/manually-choose-a-fallback-font-for-unicode.html
(set-fontset-font "fontset-default" nil 
                  (font-spec :size 20 :name "Symbola"))

;; Setting English Font
(set-face-attribute
  'default nil :stipple nil :height 130 :width 'normal :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant 'normal :weight 'normal :foundry "outline" :family "DejaVu Sans Mono for Powerline")

3 enable utf coding

;; disable CJK coding/encoding (Chinese/Japanese/Korean characters)
(setq utf-translate-cjk-mode nil)

(set-language-environment 'utf-8)
(setq locale-coding-system 'utf-8)

;; set the default encoding system
(prefer-coding-system 'utf-8)
(setq default-file-name-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
;; backwards compatibility as default-buffer-file-coding-system
;; is deprecated in 23.2.
(if (boundp buffer-file-coding-system)
    (setq buffer-file-coding-system 'utf-8)
  (setq default-buffer-file-coding-system 'utf-8))

;; Treat clipboard input as UTF-8 string first; compound text next, etc.
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))

4 select org-bullet symbol set

  1. my candidate symbol lists
    • hexagrams

      “✡” “⎈” “✽” “✲” “✱” “✻” “✼” “✽” “✾” “✿” “❀” “❁” “❂” “❃” “❄” “❅” “❆” “❇”

    • circles

      “○” “☉” “◎” “◉” “○” “◌” “◎” “●” “◦” “◯” “⚪” “⚫” “⚬” “❍” “○” “⊙” “⊚” “⊛” “∙” “∘”

    • special circles

      “◐” “◑” “◒” “◓” “◴” “◵” “◶” “◷” “⚆” “⚇” “⚈” “⚉” “♁” “⊖” “⊗” “⊘”

    • crosses

      “✙” “♱” “♰” “☥” “✞” “✟” “✝” “†” “✠” “✚” “✜” “✛” “✢” “✣” “✤” “✥”

    • poker sybmols

      “♠” “♣” “♥” “♦” “♤” “♧” “♡” “♢”

    • yinyang

      “☯” “☰” “☱” “☲” “☳” “☴” “☵” “☶” “☷”

    • special symbols

      “☀” “♼” “☼” “☾” “☽” “☣” “§” “¶” “‡” “※” “✕” “△” “◇” “▶” “◀” “◈”

  2. my related org-mode settings
    ;; use org-bullets-mode for utf8 symbols as org bullets
    (require 'org-bullets)
    ;; make available "org-bullet-face" such that I can control the font size individually
    (setq org-bullets-face-name (quote org-bullet-face))
    (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
    (setq org-bullets-bullet-list '("✙" "♱" "♰" "☥" "✞" "✟" "✝" "†" "✠" "✚" "✜" "✛" "✢" "✣" "✤" "✥"))
    

5 select org-ellipsis symbols

  1. my collection of org-ellipsis candidate symbols
    • right arrows

      “↝” “⇉” “⇝” “⇢” “⇨” “⇰” “➔” “➙” “➛” “➜” “➝” “➞”

      “➟” “➠” “➡” “➥” “➦” “➧” “➨”

      “➩” “➪” “➮” “➯” “➱” “➲”

      “➳” “➵” “➸” “➺” “➻” “➼” “➽”

    • arrow heads

      “➢” “➣” “➤” “≪”, “≫”, “«”, “»”

    • other arrows

      “↞” “↠” “↟” “↡” “↺” “↻”

    • lightening

      “⚡”

    • other symbols

      …, ▼, ↴, , ∞, ⬎, ⤷, ⤵

  2. my org-mode settings
    ;; org ellipsis options, other than the default Go to Node...
    ;; not supported in common font, but supported in Symbola (my fall-back font) ⬎, ⤷, ⤵
    (setq org-ellipsis "⚡⚡⚡");; ⤵ ≫
    

6 define the related faces

  1. trick 1: set the variable “org-bullets-face-name”, such that org-mode will use the face-name specified
    ;; make available "org-bullet-face" such that I can control the font size individually
    (setq org-bullets-face-name (quote org-bullet-face))
    
    
    1. Note: org-bullet-face is a face I set up myself. You can set this up using:
(custom-set-faces
 '(org-bullet-face ((t (:foreground "burlywood" :weight normal :height 1.5)))))
  1. trick 2: set the org-bullet-face (I defined this name in the previous line) to have a large font
    (set-face-attribute 'org-bullet-face 
        t :foreground "burlywood" :weight 'normal :height 1.6)
    

7 Appearance of the org buffer after the above configuration

appearance
org-ellipsis-appearance

Author: Da Zhang

Created: 2016-02-15 Mon 02:08

Emacs 25.0.91.1 (Org mode 8.3.3)

 

Implementing pwdw pwdc, a summary of manipulating directory name strings in Emacs lisp

1 Summary

  1. this article summaries several technical tricks for implementing two functions
    • pwdw: copy the dir name of the current buffer (in Windows format) to the kill-ring (clip-board)
    • pwdc: copy the dir name of the current buffer (in cygwin format) to the kill-ring (clip-board)
  2. These two functions are lisp alternatives to my shell functions pwdw and pwdc, for passing the current working directory from cygwin to windows and other programs.
  3. Emacs-lisp code:
    ;; pwdw and pwdc
    (defun pwdw ()
      "Copy the dir name of the current buffer (in Windows format) to the kill-ring (clip-board)."
      (interactive)
      (kill-new (replace-regexp-in-string "/" "\\\\"
                                          (file-name-directory (expand-file-name (buffer-file-name)))))
      )
    (defun pwdc ()
      "Copy the dir name of the current buffer (in cygwin format) to the kill-ring (clip-board)."
      (interactive)
      (kill-new
       (replace-regexp-in-string "\\([a-zA-Z]\\):" "/cygdrive/\\1"
                                 (file-name-directory (expand-file-name (buffer-file-name)))))
      )
    
  4. shell code (compatible with bash and zsh)
    # note: you need -d to convert unix line-ending to dos line-ending for Windows
    alias pwdw='cygpath -w $PWD | tee >(putclip -d)'
    alias pwdc='echo -En $PWD | putclip'
    

2 Technical tricky points in these functions

  1. about path and file names
  2. replace-regexp-in-string: replacing / with \ or c:/ with cygdrive/c
  3. kill-new: to make the text in the kill ring:
  4. about regex in Emacs

Author: Da Zhang

Created: 2016-02-12 Fri 16:54

Emacs 25.0.90.3 (Org mode 8.3.3)

 

How to achieve auto-compilation for the org–>latex–>pdf publishing chain — configurations around latexmk

1 Summary:

  1. how to set up latexmk, a perl program that monitors the status of a tex and run compilation automatically
  2. my Emacs, bash/zsh, and latexmkrc configurations around this tool
  3. my workflow of generating org–>latex–>pdf using this tool
  4. a few notes/tricks

3 installation/configuration of latexmk

  1. no need to install, latexmk is included within MikTex package, CTex, and TexLive
    which latexmk
    latexmk is /cygdrive/c/CTEX/MiKTeX/miktex/bin/latexmk
    
  2. but the INSTALL file in the downloaded package is quite info-rich
  3. check availability and if it is working properly:
    latexmk -v
    

4 Workflow

  1. in the org file, have the following headers (the following uses beamer)
    +LATEX_CLASS: beamer
    
  2. in Emacs, edit org file, then C-c C-e l l to export to latex
  3. open a mintty shell (consolez will not work properly)
    1. type
      latexmk -pvc -pdf -view=none paper.tex
      
    2. a latexmk process will run, and keeps monitoring the status of the tex file “paper.tex”
    3. you can then type
      sumatrapdf -reuse-instance paper.pdf
      
    4. the tex will be automatically compiled into pdf, and sumatrapdf will update the view automatically
  4. why consolez does not work
    1. the $TERM type needs to be xterm-256 or xterm, for properly stopping the latexmk program by typing Control-C
    2. in zsh or bash of consolez, the $TERM is “cygwin”, and Control-C will not work

5 Configurations

  1. my .latexmkrc file in ~
    1. note the default location of .latexmkrc is in your $HOME directory
    2. the language of this configuration file is perl
    3. I specified sumatrapdf as the viewer, because Adobe will lock the file
    4. I added additional extensions for clean_ext
      $pdf_previewer = 'sumatrapdf -reuse-instance %O %S';
      $clean_ext = 'paux lox pdfsync out';
      
  2. my aliases in bash/zsh:
    # for viewing pdf but not locking the file
    alias pdfview='sumatrapdf -reuse-instance'
    
    # for easily use latexmk
    alias mklatex='latexmk -pvc -pdf'
    # -f for non stop
    alias mktex='latexmk -f -pvc -pdf -view=pdf'
    
  3. my set up for different latex classes in init-org:
    (add-to-list 'org-latex-classes
                 '("compact"
                   "\\documentclass [letterpaper, 10pt]{article}
    \\usepackage{fullpage}
    \\usepackage{setspace}
    \\singlespacing
    \\usepackage{times}
    \\usepackage[compact]{titlesec}
    \\titlespacing{\\section}{0pt}{*0}{*0}
    \\titlespacing{\\subsection}{0pt}{*0}{*0}
    \\titlespacing{\\subsubsection}{0pt}{*0}{*0}
    \\usepackage{mdwlist}
    \\usepackage[T1]{fontenc}
    \\usepackage[left=2cm,top=1cm,right=2cm,nohead,nofoot]{geometry}"
                   ("\\section{%s}" . "\\section*{%s}")
                   ("\\subsection{%s}" . "\\subsection*{%s}")
                   ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
                   ("\\subsubsubsection{%s}" . "\\subsubsubsection*{%s}")))
    
    (add-to-list 'org-latex-classes
                 '("article"
                   "\\documentclass [letterpaper, 11pt]{article}\n
    \\usepackage{fullpage}\n
    \\usepackage{setspace}\n
    \\doublespacing\n
    \\usepackage{amssymb}\n
    \\usepackage{graphicx}\n
    \\usepackage{subfigure}\n
    \\usepackage{float}\n
    \\usepackage{amsmath}\n
    \\usepackage{cite}\n
    \\usepackage{times}\n
    \\usepackage[T1]{fontenc}\n
    \\usepackage[pdfpagemode = colorlinks, pdffitwindow = true, bookmarks = true, pdftoolbar = false, pdfmenubar = true, pdfnewwindow = true]{hyperref}\n
    \\usepackage[left]{lineno}\n"
                   ("\\section{%s}" . "\\section*{%s}")
                   ("\\subsection{%s}" . "\\subsection*{%s}")
                   ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
                   ("\\paragraph{%s}" . "\\paragraph*{%s}")
                   ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
    
    (add-to-list 'org-latex-classes
                 '("beamer"
                   "\\documentclass[red]{beamer}\n
         \\usetheme{Darmstadt}\n
         \\usefonttheme[onlylarge]{structurebold}\n
         \\setbeamerfont*{frametitle}{size=\\normalsize,series=\\bfseries}\n
         \\setbeamertemplate{navigation symbols}{}\n
         \\usepackage[english]{babel}\n
         \\usepackage{times}\n
         \\usepackage[T1]{fontenc}\n
         \\usepackage{graphicx}\n
         \\usepackage{color}\n
         \\usepackage{tikz}\n
         \\usetikzlibrary{arrows}\n
         \\tikzstyle{block}=[draw opacity=0.7,line width=1.4cm]\n
         \\usepackage{listings}
         \\lstset{numbers=none,language=[ISO]C++,tabsize=4,
         frame=single,
         basicstyle=\\small,
         showspaces=false,showstringspaces=false,
         showtabs=false,
         keywordstyle=\\color{blue}\\bfseries,
         commentstyle=\\color{red},
         }\n
         \\institute{BIDMC}\n"
                   ("\\section{%s}" . "\\section*{%s}")
                   ("\\begin{frame}[fragile]\\frametitle{%s}"
                    "\\end{frame}"
                    "\\begin{frame}[fragile]\\frametitle{%s}"
                    "\\end{frame}")))
    

6 How to run this file as a demo

  1. C-c C-e l l to create the tex file
  2. invoke the latexmk command in a mintty terminal
mktex latex_auto_compilation.tex
  1. open the resultant pdf file in sumatrapdf
pdfview latex_auto_compilation.pdf
  1. change the option line #+LATEX_CLASS:compact, among report, article, MP (not working well now), beamer
  2. repeat step 1 and you will see the latexmk and sumatrapdf working automatically for you.

tabbar mode rocks with customization!

 

 

Why doing this

I like tabbar mode, and it gives Emacs a “modern” feeling – similar to that available in most web browsers such as my
favorite Firefox.

However, I don’t like the default settings of tabbar mode. So here comes my customization:

color and separator

my current tabbar tabs looks:


And the customization code in .emacs file are:

(setq tabbar-background-color "#959A79") ;; the color of the tabbar background
(custom-set-faces
 '(tabbar-default ((t (:inherit variable-pitch :background "#959A79" :foreground "black" :weight bold))))
 '(tabbar-button ((t (:inherit tabbar-default :foreground "dark red"))))
 '(tabbar-button-highlight ((t (:inherit tabbar-default))))
 '(tabbar-highlight ((t (:underline t))))
 '(tabbar-selected ((t (:inherit tabbar-default :background "#95CA59"))))
 '(tabbar-separator ((t (:inherit tabbar-default :background "#95CA59"))))
 '(tabbar-unselected ((t (:inherit tabbar-default)))))

key bindings:

I use C-S-< and C-S-> to jump among tabs in the same group, and use C-S-n and C-S-p to switch among groups. Here is the
code in .emacs file:

(global-set-key (kbd "C-S-p") 'tabbar-backward-group)
(global-set-key (kbd "C-S-n") 'tabbar-forward-group)
(global-set-key (kbd "C-<") 'tabbar-backward)
(global-set-key (kbd "C->") 'tabbar-forward) ;; tabbar.el, put all the buffers on the tabs.

my favorite tabbar customization: to toggle between 2 different grouping schemes

  • grouping tabs by major mode (the default)
  • grouping tabs by dir the files belonging to

here is the effect:

  • grouping by dir (see how the org, tex, html, and bbl buffers under the same publishing project are grouped together)

  • grouping by major modes (see how all org buffers are grouped together)

here is the code

(defun tabbar-buffer-groups-by-dir ()
        "Put all files in the same directory into the same tab bar"
        (with-current-buffer (current-buffer)
          (let ((dir (expand-file-name default-directory)))
            (cond ;; assign group name until one clause succeeds, so the order is important
             ((eq major-mode 'dired-mode)
              (list "Dired"))
             ((memq major-mode
                    '(help-mode apropos-mode Info-mode Man-mode))
              (list "Help"))
             ((string-match-p "\*.*\*" (buffer-name))
              (list "Misc"))
             (t (list dir))))))

(defun tabbar-switch-grouping-method (&optional arg)
  "Changes grouping method of tabbar to grouping by dir.
With a prefix arg, changes to grouping by major mode."
  (interactive "P")
  (ignore-errors
    (if arg
      (setq tabbar-buffer-groups-function 'tabbar-buffer-groups) ;; the default setting
        (setq tabbar-buffer-groups-function 'tabbar-buffer-groups-by-dir))))

misc settings

(setq tabbar-cycle-scope (quote tabs))
(setq table-time-before-update 0.1)
(setq tabbar-use-images t)

Date: 2012-09-21

Author: Da Zhang

Org version 7.9.1 with Emacs version 24

Validate XHTML 1.0

LeechBlock – the killer of timekillers

Procrastination, the time-wasting and beating-around-the-bush type of behavior before any progress could be made on the real important things, is very typical among many people, including me.

I found that visiting my favorite websites before I start working is almost irresistible.

From Matt Might’s Productivity tips, tricks and hacks for academics and Boost your productivity: Cripple your technology, I learned about LeechBlock, which is perfect to block my favorite websites during hours I am supposed to work.

I can set up what to block (for example, http://www.cnn.com), when to block (e.g., 0900-1730), how long to block (e.g., 1 min in every hour), what to show when a page is blocked (for me, I used the Journal of Medical Physics website for most recent articles)

To protect the disciplines from being violated, the LeechBlock is actually designed in a quite tricky and clever way:

  • I can set up password to the Option dialog box of LeechBlock for someone else, like my wife, to help them fighting procrastination together;
  • or I can let LeechBlock to require me to type in a 64 or 32 digit long randomly generated combination of letters and numbers before accessing its Option dialog box, which is really a pain. (see the pictures below)

When the path toward surfing online becomes more difficult to approach, it becomes easier for me to resist the desire to do so.

BTW, I don’t think I need to block IE, because I feel that using IE to surf online is as painful as by-passing the control of LeechBlock :-).

Date: 2012-03-25 17:38:16 Eastern Daylight Time

Author: Da Zhang

Org version 7.8.03 with Emacs version 24

Validate XHTML 1.0

My color theme color-theme-dawn-night is updated and uploaded to the marmalade repository (updated)

I have been spending time to tweak and design my own color themes since 2007, and published previous
versions (switch-color-theme-matlab-latex.el) on this blog (https://zhangda.wordpress.com/2009/04/08/my-own-emacs-color-themes-i-use-f6-c-u-f6-to-switch-between-them/).

I think now it’s a good time to move the package to the more popular host, marmalade, so anyone interested could use the
emacs package management tool (package.el) to obtain it. If marmalade is included in your package-archives list (see the
code below for this), you should be able to see the package “color-theme-dawn-night” after firing up list-packages.

(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
                          ("marmalade" . "http://marmalade-repo.org/packages/")))

You can also download the color-theme-dawn-night.el via http://marmalade-repo.org/packages/color-theme-dawn-night-1.0.el

Here is a brief description of the color theme:

color-theme-dawn-night.el contains two customized color themes:

(1) cl-night
is a dark-background theme, designed for normal programming,
org/muse mode editing and LaTeX editing. The foreground colors are designed
to be somewhat aqua, with a bright and warm feeling.

(2) cl-dawn
is designed with a bright and warm background. The color setup was inspired
by the light yellow background and visual effect of the Matlab programming
environment.

Call function switch-dawn-night to change to the dark face, and call C-u
switch-dawn-night for the bright background face.

Install the theme:
(1)Place color-theme-dawn-night.el into your load-path.

(2)In your .emacs, add:
(require ‘color-theme-dawn-night)

(3)optional keybinding
(global-set-key [f6] ‘switch-dawn-night)

 

One good thing to tweak the color theme is that you can have a full control of the appearance of Emacs. For example, I adjusted different faces of tabbar to make them appear uniformly and as if in a real tabbar system.  Another example is the color of the line numbers on the left fringe — I made them slim and in a “dark gold” color.

Here are some screen shots of my color themes.

color theme dawn night:  night

color-theme-dawn-night: night

color theme dawn night:  dawn

color-theme-dawn-night: dawn

Date: 2012-03-24

Author: Da Zhang

Validate XHTML 1.0