<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xml:lang="fr">

  <title type="html">Humus numericus - Mot-clé - emacs</title>
  <subtitle type="html"></subtitle>
  <link href="https://blog.nozav.org/feed/tag/emacs/atom" rel="self" type="application/atom+xml"/>
  <link href="https://blog.nozav.org/" rel="alternate" type="text/html"
  title=""/>
  <updated>2019-05-09T20:00:29+02:00</updated>
  <author>
    <name></name>
  </author>
  <id>urn:md5:c2531a830c9d2a52c5500061b4d5077e</id>
  <generator uri="http://www.dotclear.org/">Dotclear</generator>

  
  <entry>
    <title>Updated tangotango emacs color theme</title>
    <link href="https://blog.nozav.org/post/2010/07/12/Updated-tangotango-emacs-color-theme" rel="alternate" type="text/html"
    title="Updated tangotango emacs color theme" />
    <id>urn:md5:0f1851d93f2f10adc4cc4dda897e03f1</id>
    <published>2010-07-12T11:45:00+02:00</published>
          <updated>2012-10-14T21:00:08+02:00</updated>
            <author><name>Juba</name></author>
        <dc:subject>Emacs, Gnus</dc:subject>
        <dc:subject>emacs</dc:subject><dc:subject>gnus</dc:subject><dc:subject>org-mode</dc:subject><dc:subject>tangotango</dc:subject>
    <content type="html">    &lt;a class=&quot;FlattrButton&quot; style=&quot;display:none;&quot; rev=&quot;flattr;button:compact;&quot; href=&quot;http://github.com/juba/color-theme-tangotango&quot;&gt;&lt;/a&gt;



&lt;p&gt;&lt;strong&gt;EDIT&amp;#160;: This post is now quite deprecated. Installation instructions and new versions are posted on the &lt;a href=&quot;https://github.com/juba/color-theme-tangotango&quot; hreflang=&quot;en&quot;&gt;github project page&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;


&lt;p&gt;I just updated my &lt;a href=&quot;https://blog.nozav.org/post/2010/02/10/Tangotango-emacs-color-theme&quot; hreflang=&quot;en&quot;&gt;original &amp;#8221;tangotango&amp;#8221; emacs color theme&lt;/a&gt;, based on the tango palette colors. I&amp;#8217;ve tweaked some details and moved the source code to &lt;a href=&quot;http://github.com/juba/color-theme-tangotango&quot; hreflang=&quot;en&quot;&gt;github&lt;/a&gt;. Here are updated installation instructions and screenshots&amp;#160;:&lt;/p&gt;


&lt;h3&gt;Installation instructions&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Download and install the &lt;code&gt;color-theme&lt;/code&gt; emacs package either via your linux distribution or &lt;a href=&quot;http://www.nongnu.org/color-theme/#sec5&quot; hreflang=&quot;en&quot;&gt;via the source tarball&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Download and install &lt;code&gt;color-theme-tangotango.el&lt;/code&gt; &lt;a href=&quot;http://github.com/juba/color-theme-tangotango/raw/master/color-theme-tangotango.el&quot;&gt;from github&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Make sure that both &lt;code&gt;color-theme.el&lt;/code&gt; and &lt;code&gt;color-theme-tangotango.el&lt;/code&gt; are in your load path&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;There are several ways to load the &lt;em&gt;tangotango&lt;/em&gt; color theme from your &lt;code&gt;.emacs&lt;/code&gt;, as documented &lt;a href=&quot;http://www.emacswiki.org/emacs/ColorTheme&quot; hreflang=&quot;en&quot;&gt;on emacswiki&lt;/a&gt;. The way I currently use should work for a daemonized emacs and allows the selection of  different themes for GUI or console based frames&amp;#160;:&lt;/p&gt;

&lt;pre&gt;
(require 'color-theme)
(setq color-theme-load-all-themes nil)

(require 'color-theme-tangotango)

;; select theme - first list element is for windowing system, second is for console/terminal
;; Source : http://www.emacswiki.org/emacs/ColorTheme#toc9
(setq color-theme-choices 
      '(color-theme-tangotango color-theme-tangotango))

;; default-start
(funcall (lambda (cols)
    	   (let ((color-theme-is-global nil))
    	     (eval 
    	      (append '(if (window-system))
    		      (mapcar (lambda (x) (cons x nil)) 
    			      cols)))))
    	 color-theme-choices)

;; test for each additional frame or console
(require 'cl)
(fset 'test-win-sys 
      (funcall (lambda (cols)
    		 (lexical-let ((cols cols))
    		   (lambda (frame)
    		     (let ((color-theme-is-global nil))
		       ;; must be current for local ctheme
		       (select-frame frame)
		       ;; test winsystem
		       (eval 
			(append '(if (window-system frame)) 
				(mapcar (lambda (x) (cons x nil)) 
					cols)))))))
    	       color-theme-choices ))
;; hook on after-make-frame-functions
(add-hook 'after-make-frame-functions 'test-win-sys)

(color-theme-tangotango)
&lt;/pre&gt;


&lt;p&gt;Note that I also had to add a &lt;code&gt;(color-theme-tangotango)&lt;/code&gt; line at the end of my &lt;code&gt;.gnus&lt;/code&gt; file in order to apply the color theme to Gnus.&lt;/p&gt;


&lt;h3&gt;Screenshots&lt;/h3&gt;


&lt;p&gt;Here is a screenshot of the color theme with an emacs-lisp file&amp;#160;:&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;https://blog.nozav.org/public/images/tangotango_elisp.png&quot; alt=&quot;tangotango_elisp.png&quot; style=&quot;display:block; margin:0 auto;&quot; title=&quot;tangotango_elisp.png, juillet 2010&quot; /&gt;&lt;/p&gt;


&lt;p&gt;One with a Gnus summary and article buffers&amp;#160;:&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;https://blog.nozav.org/public/images/tangotango_gnus.png&quot; alt=&quot;tangotango_gnus.png&quot; style=&quot;display:block; margin:0 auto;&quot; title=&quot;tangotango_gnus.png, juillet 2010&quot; /&gt;&lt;/p&gt;


&lt;p&gt;And one with an org-mode buffer&amp;#160;:&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;https://blog.nozav.org/public/images/tangotango_org.png&quot; alt=&quot;tangotango_org.png&quot; style=&quot;display:block; margin:0 auto;&quot; title=&quot;tangotango_org.png, juillet 2010&quot; /&gt;&lt;/p&gt;</content>

    


      </entry>
  
  <entry>
    <title>Tangotango dark emacs color theme</title>
    <link href="https://blog.nozav.org/post/2010/02/10/Tangotango-emacs-color-theme" rel="alternate" type="text/html"
    title="Tangotango dark emacs color theme" />
    <id>urn:md5:b0030d2c51b71fedb2948876d4c2e300</id>
    <published>2010-02-10T16:54:00+01:00</published>
          <updated>2010-07-12T11:49:24+02:00</updated>
            <author><name>Juba</name></author>
        <dc:subject>Emacs, Gnus</dc:subject>
        <dc:subject>emacs</dc:subject><dc:subject>gnus</dc:subject><dc:subject>org-mode</dc:subject><dc:subject>tangotango</dc:subject>
    <content type="html">    &lt;p&gt;&lt;strong&gt;UPDATE&amp;#160;:&lt;/strong&gt; This entry is &lt;strong&gt;deprecated&lt;/strong&gt;&amp;#160;! Source code has been moved to Github and installation instructions &lt;a href=&quot;https://blog.nozav.org/post/2010/07/12/Updated-tangotango-emacs-color-theme&quot; hreflang=&quot;en&quot;&gt;have been rewritten&lt;/a&gt;.&lt;/p&gt;



&lt;p&gt;I always have used the default Emacs color theme, with a white background. Recently I wanted to switch to a dark background but didn&amp;#8217;t find a color scheme taht I&amp;#8217;d like enough to use, so Is tarted to create one myself. In fact I started with &lt;a href=&quot;http://www.emacswiki.org/emacs/color-theme-tango.el&quot; hreflang=&quot;en&quot;&gt;the tango color theme on EmacsWiki&lt;/a&gt;, modified a bit, and added some faces to support gnus and org-mode as I use them a lot.&lt;/p&gt;


&lt;p&gt;The result is a color theme named &lt;em&gt;tangotango&lt;/em&gt; whose code is the following&amp;#160;:&lt;/p&gt;

&lt;pre&gt;
(defun color-theme-tangotango ()
  &amp;quot;A color theme based on Tango Palette.&amp;quot;
  (interactive)
  (color-theme-install
   '(color-theme-tango
     ((background-color . &amp;quot;#2e3436&amp;quot;)
      (background-mode . dark)
      (border-color . &amp;quot;#888a85&amp;quot;)
      (cursor-color . &amp;quot;#fce94f&amp;quot;)
      (foreground-color . &amp;quot;#eeeeec&amp;quot;)
      (mouse-color . &amp;quot;#8ae234&amp;quot;))
     ((help-highlight-face . underline)
      (ibuffer-dired-buffer-face . font-lock-function-name-face)
      (ibuffer-help-buffer-face . font-lock-comment-face)
      (ibuffer-hidden-buffer-face . font-lock-warning-face)
      (ibuffer-occur-match-face . font-lock-warning-face)
      (ibuffer-read-only-buffer-face . font-lock-type-face)
      (ibuffer-special-buffer-face . font-lock-keyword-face)
      (ibuffer-title-face . font-lock-type-face))
     (highlight ((t (:background &amp;quot;brown4&amp;quot; :foreground nil))))
     (border ((t (:background &amp;quot;#888a85&amp;quot;))))
     (fringe ((t (:background &amp;quot;grey10&amp;quot;))))
     (mode-line ((t (:foreground &amp;quot;#bbbbbc&amp;quot; :background &amp;quot;#222222&amp;quot; :box (:line-width 1 :color nil :style released-button)))))
     (mode-line-inactive ((t (:foreground &amp;quot;#bbbbbc&amp;quot; :background &amp;quot;#555753&amp;quot;))))
     (mode-line-buffer-id ((t (:bold t :foreground &amp;quot;orange&amp;quot; :background nil))))
     (region ((t (:background &amp;quot;dark slate blue&amp;quot;))))
     (link ((t (:underline t :foreground &amp;quot;dodger blue&amp;quot;))))
     (custom-link ((t (:inherit 'link))))
     (match ((t (:bold t :background &amp;quot;#e9b96e&amp;quot; :foreground &amp;quot;#2e3436&amp;quot;))))
     (tool-tips ((t (:inherit 'variable-pitch :foreground &amp;quot;black&amp;quot; :background &amp;quot;lightyellow&amp;quot;))))
     (tooltip ((t (:inherit 'variable-pitch :foreground &amp;quot;black&amp;quot; :background &amp;quot;lightyellow&amp;quot;))))
     (bold ((t (:bold t :underline nil :background nil))))
     (italic ((t (:italic t :underline nil :background nil))))
     (font-lock-builtin-face ((t (:foreground &amp;quot;#729fcf&amp;quot;))))
     (font-lock-comment-face ((t (:foreground &amp;quot;#888a85&amp;quot;))))
     (font-lock-constant-face ((t (:foreground &amp;quot;#8ae234&amp;quot;))))
     (font-lock-doc-face ((t (:foreground &amp;quot;#888a85&amp;quot;))))
     (font-lock-keyword-face ((t (:foreground &amp;quot;#729fcf&amp;quot; :bold t))))
     (font-lock-string-face ((t (:foreground &amp;quot;#ad7fa8&amp;quot; :italic t))))
     (font-lock-type-face ((t (:foreground &amp;quot;#8ae234&amp;quot; :bold t))))
     (font-lock-variable-name-face ((t (:foreground &amp;quot;tomato&amp;quot;))))
     (font-lock-warning-face ((t (:bold t :foreground &amp;quot;#f57900&amp;quot;))))
     (font-lock-function-name-face ((t (:foreground &amp;quot;#edd400&amp;quot; :bold t))))
     (comint-highlight-input ((t (:italic t :bold t))))
     (comint-highlight-prompt ((t (:foreground &amp;quot;#8ae234&amp;quot;))))
     (isearch ((t (:background &amp;quot;#f57900&amp;quot; :foreground &amp;quot;#2e3436&amp;quot;))))
     (isearch-lazy-highlight-face ((t (:foreground &amp;quot;#2e3436&amp;quot; :background &amp;quot;#e9b96e&amp;quot;))))
     (show-paren-match-face ((t (:foreground &amp;quot;#2e3436&amp;quot; :background &amp;quot;#73d216&amp;quot;))))
     (show-paren-mismatch-face ((t (:background &amp;quot;#ad7fa8&amp;quot; :foreground &amp;quot;#2e3436&amp;quot;))))
     (minibuffer-prompt ((t (:foreground &amp;quot;#729fcf&amp;quot; :bold t))))
     (info-xref ((t (:foreground &amp;quot;#729fcf&amp;quot;))))
     (info-xref-visited ((t (:foreground &amp;quot;#ad7fa8&amp;quot;))))
     (diary-face ((t (:bold t :foreground &amp;quot;IndianRed&amp;quot;))))
     (eshell-ls-clutter-face ((t (:bold t :foreground &amp;quot;DimGray&amp;quot;))))
     (eshell-ls-executable-face ((t (:bold t :foreground &amp;quot;Coral&amp;quot;))))
     (eshell-ls-missing-face ((t (:bold t :foreground &amp;quot;black&amp;quot;))))
     (eshell-ls-special-face ((t (:bold t :foreground &amp;quot;Gold&amp;quot;))))
     (eshell-ls-symlink-face ((t (:bold t :foreground &amp;quot;White&amp;quot;))))
     (widget-button ((t (:bold t))))
     (widget-mouse-face ((t (:bold t :foreground &amp;quot;white&amp;quot; :background &amp;quot;brown4&amp;quot;))))
     (widget-field ((t (:foreground &amp;quot;orange&amp;quot; :background &amp;quot;gray30&amp;quot;))))
     (widget-single-line-field ((t (:foreground &amp;quot;orange&amp;quot; :background &amp;quot;gray30&amp;quot;))))
     (custom-group-tag ((t (:bold t :foreground &amp;quot;#edd400&amp;quot; :height 1.3))))
     (custom-variable-tag ((t (:bold t :foreground &amp;quot;#edd400&amp;quot; :height 1.1))))
     (custom-face-tag ((t (:bold t :foreground &amp;quot;#edd400&amp;quot; :height 1.1))))
     (custom-state-face ((t (:foreground &amp;quot;#729fcf&amp;quot;))))
     (custom-button  ((t (:box (:line-width 1 :style released-button) :background &amp;quot;grey50&amp;quot; :foreground &amp;quot;black&amp;quot;))))
     (custom-variable-button ((t (:inherit 'custom-button))))
     (custom-button-mouse  ((t (:inherit 'custom-button :background &amp;quot;grey60&amp;quot;))))
     (custom-button-unraised  ((t (:background &amp;quot;grey50&amp;quot; :foreground &amp;quot;black&amp;quot;))))
     (custom-button-mouse-unraised  ((t (:inherit 'custom-button-unraised :background &amp;quot;grey60&amp;quot;))))
     (custom-button-pressed  ((t (:inherit 'custom-button :box (:style pressed-button)))))
     (custom-button-mouse-pressed-unraised  ((t (:inherit 'custom-button-unraised :background &amp;quot;grey60&amp;quot;))))
     (custom-documentation ((t (:italic t))))
     (message-cited-text ((t (:foreground &amp;quot;#edd400&amp;quot;)))) 
     (gnus-cite-face-1 ((t (:foreground &amp;quot;#ad7fa8&amp;quot;))))
     (gnus-cite-face-2 ((t (:foreground &amp;quot;sienna4&amp;quot;))))
     (gnus-cite-face-3 ((t (:foreground &amp;quot;khaki4&amp;quot;))))
     (gnus-cite-face-4 ((t (:foreground &amp;quot;PaleTurquoise4&amp;quot;))))
     (gnus-group-mail-1-empty-face ((t (:foreground &amp;quot;light cyan&amp;quot;))))
     (gnus-group-mail-1-face ((t (:bold t :foreground &amp;quot;light cyan&amp;quot;))))
     (gnus-group-mail-2-empty-face ((t (:foreground &amp;quot;turquoise&amp;quot;))))
     (gnus-group-mail-2-face ((t (:bold t :foreground &amp;quot;turquoise&amp;quot;))))
     (gnus-group-mail-3-empty-face ((t (:foreground &amp;quot;#729fcf&amp;quot;))))
     (gnus-group-mail-3-face ((t (:bold t :foreground &amp;quot;#edd400&amp;quot;))))
     (gnus-group-mail-low-empty-face ((t (:foreground &amp;quot;dodger blue&amp;quot;))))
     (gnus-group-mail-low-face ((t (:bold t :foreground &amp;quot;dodger blue&amp;quot;))))
     (gnus-group-news-1-empty-face ((t (:foreground &amp;quot;light cyan&amp;quot;))))
     (gnus-group-news-1-face ((t (:bold t :foreground &amp;quot;light cyan&amp;quot;))))
     (gnus-group-news-2-empty-face ((t (:foreground &amp;quot;turquoise&amp;quot;))))
     (gnus-group-news-2-face ((t (:bold t :foreground &amp;quot;turquoise&amp;quot;))))
     (gnus-group-news-3-empty-face ((t (:foreground &amp;quot;#729fcf&amp;quot;))))
     (gnus-group-news-3-face ((t (:bold t :foreground &amp;quot;#edd400&amp;quot;))))
     (gnus-group-news-low-empty-face ((t (:foreground &amp;quot;dodger blue&amp;quot;))))
     (gnus-group-news-low-face ((t (:bold t :foreground &amp;quot;dodger blue&amp;quot;))))
     (gnus-header-name-face ((t (:bold t :foreground &amp;quot;#729fcf&amp;quot;))))
     (gnus-header-from ((t (:bold t :foreground &amp;quot;#edd400&amp;quot;))))
     (gnus-header-subject ((t (:foreground &amp;quot;#edd400&amp;quot;))))
     (gnus-header-content ((t (:italic t :foreground &amp;quot;#8ae234&amp;quot;))))
     (gnus-header-newsgroups-face ((t (:italic t :bold t :foreground &amp;quot;LightSkyBlue3&amp;quot;))))
     (gnus-signature-face ((t (:italic t :foreground &amp;quot;dark grey&amp;quot;))))
     (gnus-summary-cancelled-face ((t (:background &amp;quot;black&amp;quot; :foreground &amp;quot;yellow&amp;quot;))))
     (gnus-summary-high-ancient-face ((t (:bold t :foreground &amp;quot;rotal blue&amp;quot;))))
     (gnus-summary-high-read-face ((t (:bold t :foreground &amp;quot;lime green&amp;quot;))))
     (gnus-summary-high-ticked-face ((t (:bold t :foreground &amp;quot;tomato&amp;quot;))))
     (gnus-summary-high-unread-face ((t (:bold t :foreground &amp;quot;white&amp;quot;))))
     (gnus-summary-low-ancient-face ((t (:italic t :foreground &amp;quot;lime green&amp;quot;))))
     (gnus-summary-low-read-face ((t (:italic t :foreground &amp;quot;royal blue&amp;quot;))))
     (gnus-summary-low-ticked-face ((t (:italic t :foreground &amp;quot;dark red&amp;quot;))))
     (gnus-summary-low-unread-face ((t (:italic t :foreground &amp;quot;white&amp;quot;))))
     (gnus-summary-normal-ancient-face ((t (:foreground &amp;quot;royal blue&amp;quot;))))
     (gnus-summary-normal-read-face ((t (:foreground &amp;quot;lime green&amp;quot;))))
     (gnus-summary-normal-ticked-face ((t (:foreground &amp;quot;indian red&amp;quot;))))
     (gnus-summary-normal-unread-face ((t (:foreground &amp;quot;white&amp;quot;))))
     (gnus-summary-selected ((t (:background &amp;quot;brown4&amp;quot; :foreground &amp;quot;white&amp;quot;))))
     (message-header-name-face ((t (:foreground &amp;quot;tomato&amp;quot;))))
     (message-header-newsgroups-face ((t (:italic t :bold t :foreground &amp;quot;LightSkyBlue3&amp;quot;))))
     (message-header-other-face ((t (:foreground &amp;quot;LightSkyBlue3&amp;quot;))))
     (message-header-xheader-face ((t (:foreground &amp;quot;DodgerBlue3&amp;quot;))))
     (message-header-subject ((t (:foreground &amp;quot;white&amp;quot;))))
     (message-header-to ((t (:foreground &amp;quot;white&amp;quot;))))
     (message-header-cc ((t (:foreground &amp;quot;white&amp;quot;))))
     (org-hide ((t (:foreground &amp;quot;#2e3436&amp;quot;))))
     (org-level-1 ((t (:bold t :foreground &amp;quot;dodger blue&amp;quot; :height 1.5))))
     (org-level-2 ((t (:bold t :foreground &amp;quot;#6ac214&amp;quot; :height 1.2))))
     (org-level-3 ((t (:bold t :foreground &amp;quot;#edd400&amp;quot; :height 1.1))))
     (org-level-4 ((t (:bold t :foreground &amp;quot;tomato&amp;quot; :height 1.0))))
     (org-date ((t (:underline t :foreground &amp;quot;magenta3&amp;quot;))))
     (org-footnote  ((t (:underline t :foreground &amp;quot;magenta3&amp;quot;))))
     (org-link ((t (:foreground &amp;quot;skyblue2&amp;quot; :background &amp;quot;#2e3436&amp;quot;))))
     (org-special-keyword ((t (:foreground &amp;quot;brown&amp;quot;))))
     (org-verbatim ((t (:foreground &amp;quot;#eeeeec&amp;quot; :underline t :slant italic))))
     (org-block ((t (:foreground &amp;quot;#bbbbbc&amp;quot;))))
     (org-quote ((t (:inherit org-block :slant italic))))
     (org-verse ((t (:inherit org-block :slant italic))))
     (org-todo ((t (:bold t :foreground &amp;quot;Red&amp;quot;))))
     (org-done ((t (:bold t :foreground &amp;quot;ForestGreen&amp;quot;))))
     (anything-header ((t (:bold t :background &amp;quot;grey15&amp;quot; :foreground &amp;quot;#edd400&amp;quot;))))
)))
&lt;/pre&gt;


&lt;p&gt;Obviously you need to install and configure the color-theme Emacs extension to use it. You will find instructions on &lt;a href=&quot;http://www.emacswiki.org/emacs/ColorTheme&quot;&gt;the dedicated EmacsWiki page&lt;/a&gt;. The setup I use is the following&amp;#160;:&lt;/p&gt;

&lt;pre&gt;
(require 'color-theme)
(color-theme-initialize)
(setq color-theme-is-global t)
(setq color-theme-is-cumulative t)
(setq color-theme-load-all-themes nil)

(color-theme-tangotango)

(add-hook 'message-mode-hook 'color-theme-tangotango)
(add-hook 'gnus-article-mode-hook 'color-theme-tangotango)

(add-hook 'after-make-frame-functions
	  (lambda (frame)
	    (set-variable 'color-theme-is-global nil)
	    (select-frame frame)
	    (if window-system
		(color-theme-tangotango)
	      (color-theme-tty-dark))))

&lt;/pre&gt;


&lt;p&gt;Here is a screenshot of the color theme with an emacs-lisp file&amp;#160;:&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;https://blog.nozav.org/public/images/tangotango_elisp.png&quot; alt=&quot;tangotango_elisp.png&quot; style=&quot;display:block; margin:0 auto;&quot; title=&quot;tangotango_elisp.png, fév. 2010&quot; /&gt;&lt;/p&gt;


&lt;p&gt;One with a Gnus summary and article buffers&amp;#160;:&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;https://blog.nozav.org/public/images/tangotango_gnus.png&quot; alt=&quot;tangotango_gnus.png&quot; style=&quot;display:block; margin:0 auto;&quot; title=&quot;tangotango_gnus.png, fév. 2010&quot; /&gt;&lt;/p&gt;


&lt;p&gt;And one with an org-mode buffer&amp;#160;:&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;https://blog.nozav.org/public/images/tangotango_org.png&quot; alt=&quot;tangotango_org.png&quot; style=&quot;display:block; margin:0 auto;&quot; title=&quot;tangotango_org.png, fév. 2010&quot; /&gt;&lt;/p&gt;


&lt;p&gt;Feel free to give any feedback&amp;#160;!&lt;/p&gt;</content>

    


      </entry>
  
  <entry>
    <title>Textile mode</title>
    <link href="https://blog.nozav.org/post/2006/04/05/48-textile-mode" rel="alternate" type="text/html"
    title="Textile mode" />
    <id>urn:md5:5b5fc1bddab80807be5a09dd276be9e3</id>
    <published>2006-04-05T09:33:05+00:00</published>
              <updated>2006-04-05T09:33:05+00:00</updated>
        <author><name>Juba</name></author>
        <dc:subject>Emacs, Gnus</dc:subject>
        <dc:subject>emacs</dc:subject><dc:subject>script</dc:subject><dc:subject>textile</dc:subject>
    <content type="html">    &lt;p&gt;Youpi, youpla, je viens de créer mon premier &lt;em&gt;major mode&lt;/em&gt; pour Emacs. C'est un mode visant à faciliter l'écriture de document suivant la syntaxe de balisage Textile.&lt;/p&gt;


&lt;p&gt;Pour l'instant il ne fait pas grand-chose, c'est à dire seulement de la coloration syntaxique, et il est en version vraiment alpha, pas plus testée que ça. N'hésitez pas à me faire remonter tout bug ou commentaire.&lt;/p&gt;


&lt;p&gt;La dernière version du script peut être téléchargée là&amp;nbsp;:&lt;/p&gt;


&lt;p&gt;&lt;a href=&quot;http://svn.nozav.org/scripts/elisp/textile-mode/textile-mode.el&quot;&gt;http://svn.nozav.org/scripts/elisp/textile-mode/textile-mode.el&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;Pour plus d'informations sur Textile, vous pouvez consulter&amp;nbsp;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.textism.com/tools/textile/&quot;&gt;http://www.textism.com/tools/textile/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://hobix.com/textile/&quot;&gt;http://hobix.com/textile/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content>

    


      </entry>
  
  <entry>
    <title>erc2html</title>
    <link href="https://blog.nozav.org/post/2006/01/07/39-erc2html" rel="alternate" type="text/html"
    title="erc2html" />
    <id>urn:md5:9a353f19ff10d643d4a2aa7152e5ab3c</id>
    <published>2006-01-07T23:50:51+00:00</published>
              <updated>2006-01-07T23:50:51+00:00</updated>
        <author><name>Juba</name></author>
        <dc:subject>Emacs, Gnus</dc:subject>
        <dc:subject>emacs</dc:subject><dc:subject>ruby</dc:subject><dc:subject>script</dc:subject>
    <content type="html">    &lt;p&gt;Je viens de pondre un tout petit script en Ruby qui me permet de transformer un log de discussion IRC enregistré sous ERC (&lt;em&gt;Emacs Relay Chat&lt;/em&gt;) en fichier HTML pour publication. Le script supprime les sauts de ligne superflus, supprime les messages serveur et colorise deux trois bricoles. C'est loin d'être parfait, mais si ça peut être utile à quelqu'un...&lt;/p&gt;



&lt;pre&gt;require &quot;cgi&quot;

str = IO.read(&quot;/home/julien/lautre_20060107.log.txt&quot;)

titre = &quot;Titre de la page&quot;
charset = &quot;UTF-8&quot;

head = &amp;lt;&amp;lt;EOL
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;title&amp;gt;#{titre}&amp;lt;/title&amp;gt;
&amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=#{charset}&quot; /&amp;gt;
&amp;lt;style type=&quot;text/css&quot;&amp;gt;
 * {font-family: monospace;}
 .nick {font-weight: bold; color: #A00;}
 .ref {font-style: italic; color: #090;}
 .timestamp {color: #AAA;}
 .me {color: #00B;}
&amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;h1&amp;gt;#{titre}&amp;lt;/h1&amp;gt;
&amp;lt;p&amp;gt;
EOL

foot = &amp;lt;&amp;lt;EOL
&amp;lt;/p&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
EOL

str.gsub!(/^ERC&amp;gt;.*$/n, &quot;&quot;)
str.gsub!(/
\s+/n, &quot; &quot;)
str.gsub!(/[\d\d:\d\d]/) { |s| &quot;
&quot;+s+&quot;
&quot;}
str.gsub!(/\s+$/n, &quot;&quot;)
str.gsub!(/^\*\*\* .*$/n, &quot;&quot;)
5.times {str.gsub!(/
\s*
/n, &quot;
&quot;)}

str = CGI::escapeHTML(str)
str.gsub!(/^&amp;amp;lt;.*?&amp;amp;gt;/n) {|s| '&amp;lt;span class=&quot;nick&quot;&amp;gt;'+s+'&amp;lt;/span&amp;gt;'}
str.gsub!(/(&amp;lt;\/span&amp;gt;) (\w+\s?:)/n) {|s| $1+' &amp;lt;span class=&quot;ref&quot;&amp;gt;'+$2+'&amp;lt;/span&amp;gt;'}
str.gsub!(/[\d\d:\d\d]/) { |s| '&amp;lt;span class=&quot;timestamp&quot;&amp;gt;'+s+'&amp;lt;/span&amp;gt;'}
str.gsub!(/^\* .*$/n) {|s| '&amp;lt;span class=&quot;me&quot;&amp;gt;'+s+'&amp;lt;/span&amp;gt;'}
str.gsub!(/
/, &quot;&amp;lt;br /&amp;gt;
&quot;)

str = head + str
str = str + foot

puts str&lt;/pre&gt;</content>

    


      </entry>
  
  <entry>
    <title>Utiliser Jabber avec gaim ou emacs+erc+bitlbee derrière un firewall et/ou un proxy</title>
    <link href="https://blog.nozav.org/post/2005/01/25/17-utiliser-jabber-avec-gaim-ou-emacsercbitlbee-derriere-un-firewall-etou-un-proxy" rel="alternate" type="text/html"
    title="Utiliser Jabber avec gaim ou emacs+erc+bitlbee derrière un firewall et/ou un proxy" />
    <id>urn:md5:6b37468dca9765653b709a1e22aaa39b</id>
    <published>2005-01-25T00:15:46+00:00</published>
          <updated>2005-01-25T15:53:28+00:00</updated>
            <author><name>Juba</name></author>
        <dc:subject>Linux, Debian, etc.</dc:subject>
        <dc:subject>debian</dc:subject><dc:subject>emacs</dc:subject><dc:subject>linux</dc:subject>
    <content type="html">    &lt;p&gt;Je viens d'installer ma machine sur le réseau de mon nouveau lieu de travail, et cela a été l'occasion de me repencher sur le sujet de &quot;comment arriver à utiliser un client IM, en l'occurrence &lt;a href=&quot;http://www.jabber.org&quot; hreflang=&quot;en&quot;&gt;Jabber&lt;/a&gt;, à travers un firewall et un proxy http (pour discuter avec des collègues de travail sur des sujets strictement professionnels, cela va de soi).&lt;br /&gt;&lt;/p&gt;


&lt;p&gt;Lorsqu'il n'y a qu'un firewall, c'est assez simple, car en général celui-ci autorise les connexions au port 80. Il suffit donc de se créer une adresse sur un serveur du type jabber80.com, qui tourne justement sur un port 80, et le tour est joué en utilisant &lt;a href=&quot;http://gaim.sourceforge.net&quot; hreflang=&quot;en&quot;&gt;Gaim&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;


&lt;p&gt;Quand on a en plus un proxy http qui filtre les connexions, c'est un peu plus compliqué car les requêtes Jabber ne sont pas des requêtes http classiques. Le proxy risque donc de les bloquer, ce qui était mon cas. L'astuce réside alors à utiliser non pas le port 80, mais le port 443 (https),  car les requêtes destinées à ce port ne sont pas filtrables par le proxy si celui-ci les accepte. Or, de nombreux serveurs Jabber tournent sur le port 443, dont toute la série des amessage (amessage.info...) et bien d'autres (jabberes.org, chrome.pl...). Là encore, avec Gaim, pas de problème, tout se paramètre lors de la création/modification du compte.&lt;br /&gt;&lt;/p&gt;


&lt;p&gt;Jusque là, rien de très difficile et je ne fais que reprendre des infos présentes ici :&lt;br /&gt;&lt;/p&gt;


&lt;pre&gt;&lt;a href=&quot;http://web.amessage.info/firewalled/&quot; hreflang=&quot;en&quot;&gt;http://web.amessage.info/firewalled/&lt;/a&gt;&lt;/pre&gt;


&lt;p&gt;On va donc compliquer un peu&amp;nbsp;: et si je veux utiliser non plus Gaim, mais un bon vieux emacs avec Erc, le tout sous &lt;a href=&quot;http://www.bitlbee.org&quot; hreflang=&quot;en&quot;&gt;Bitlbee&lt;/a&gt; (en fait, n'importe quel client IRC sous Bitlbee)&amp;nbsp;? A priori, suffit de faire pareil en commençant par indiquer les paramètres du proxy dans le fichier bitlbee.conf (le plus souvent dans /etc). Sauf qu'il n'est pas possible, en tous cas je n'ai pas trouvé l'option, de modifier le port par défaut pour la connexion aux serveurs Jabber dans les comptes sous Bitlbee. Gloups. Prenant mon courage à deux mains, j'ai donc décidé de tenter un gros hack bien sale et tout con mais qui a le mérite de marcher&amp;nbsp;: modifier le port par défaut de connexion aux serveurs Jabber de 5222 et 5223 à 443 dans les sources de Bitlbee et recompiler la chose. Il va de soi que cette &quot;astuce&quot; au bulldozer ne pourra vous intéresser que si vous êtes sûr de ne vouloir vous connecter qu'à des ports 443 pour les serveurs Jabber de ce Bitlbee-là.&lt;br /&gt;&lt;/p&gt;


&lt;p&gt;La manip sous Debian est assez simple. En premier lieu, il faut récupérer le paquet source avec un :&lt;br /&gt;&lt;/p&gt;


&lt;pre&gt;# apt-get source bitlbee&lt;br /&gt;&lt;/pre&gt;


&lt;p&gt;Il faut ensuite remplacer 5222 et 5223 par 443 dans les lignes suivantes du fichier protocols/jabber/jabber.c :&lt;br /&gt;&lt;/p&gt;


&lt;pre&gt;#define DEFAULT_PORT 5222
#define DEFAULT_PORT_SSL 5223&lt;br /&gt;&lt;/pre&gt;


&lt;p&gt;C'est fait&amp;nbsp;! Il n'y a plus qu'à reconstruire le package avec un petit dpkg-buildpackage, puis à l'installer avec un dpkg -i et le tour est joué.&lt;br /&gt;&lt;/p&gt;


&lt;p&gt;Enfin, dernier intérêt, les connexions entre la machine faisant tourner Bitlbee et le serveur Jabber, si je ne me gourre,  devraient être chiffrées. Ce qui n'est pas sans intérêt pour des conversations professionnelles hautement confidentielles...&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;


&lt;p&gt;&lt;strong&gt;&lt;em&gt;Post-Scriptum :&lt;/em&gt;&lt;/strong&gt; en fait non, je viens de vérifier pour le chiffrement des communications, et c'est à moitié vrai. Pour que ça marche sous Gaim, il faut cocher &quot;forcer l'ancien SSL&quot; dans la configuration du compte. Pour bitlbee, il faut modifier à nouveau le code source du fichier jabber.c, et plus précisément mettre &quot;ssl=1&quot; dans la portion de code suivante :&lt;br /&gt;&lt;/p&gt;


&lt;pre&gt;(...)
static void gjab_start(gjconn gjc)
{
   struct aim_user *user;
   int port = -1, ssl = 1;
(...)&lt;/pre&gt;</content>

    


      </entry>
  
  <entry>
    <title>Utiliser Mozilla Firefox pour ouvrir les liens sous Emacs/Gnus</title>
    <link href="https://blog.nozav.org/post/2004/10/21/13-utiliser-mozilla-firefox-pour-ouvrir-les-liens-sous-emacsgnus" rel="alternate" type="text/html"
    title="Utiliser Mozilla Firefox pour ouvrir les liens sous Emacs/Gnus" />
    <id>urn:md5:5a0b9c0bcc71c39ab607e1d82d9752b0</id>
    <published>2004-10-21T10:59:02+00:00</published>
          <updated>2005-02-04T15:36:16+00:00</updated>
            <author><name>Juba</name></author>
        <dc:subject>Emacs, Gnus</dc:subject>
        <dc:subject>emacs</dc:subject><dc:subject>firefox</dc:subject><dc:subject>gnus</dc:subject>
    <content type="html">    &lt;p&gt;La commande utilisée sous Emacs (et donc sous Gnus) pour ouvrir et afficher le contenu d'url contenues dans des documents ou des mails est à définir sous la forme d'une fonction à rattacher à la fonction browse-url-browser-function. Il existe un cetain nombre de fonctions par défaut, mais aucune pour Mozilla Firefox (en tous cas pour ma version d'Emacs, la 21.3.1). Grâce à &lt;a href=&quot;http://www.emacswiki.org&quot;&gt;EmacsWiki&lt;/a&gt; et à &lt;a href=&quot;http://groups.google.com&quot;&gt;Google Groups&lt;/a&gt;, j'ai pu bricoler une fonction qui permet d'ouvrir le lien dans un nouveau tab si une instance de Firefox tourne déjà, et de lancer le navigateur sinon.&lt;/p&gt;


&lt;p&gt;A priori ça fonctionne pour Firefox 0.9 et au-delà. Voici le code à rajouter dans votre .emacs&amp;nbsp;:&lt;/p&gt;


&lt;pre&gt;(defun browse-url-firefox-new-tab (url &amp;amp;optional new-window)
  &quot;Open URL in a new tab in Firefox.&quot;
  (interactive (browse-url-interactive-arg &quot;URL: &quot;))
  (let ((cmd (shell-command-to-string
              (concat &quot;mozilla-firefox -a firefox -remote 'openURL(&quot;
                        url &quot;,new-tab)' &amp;gt; /dev/null&quot;))))
    (unless (string= &quot;&quot; cmd)
      (message &quot;Starting Firefox...&quot;)
      (start-process (concat &quot;firefox &quot; url) nil &quot;/bin/sh&quot; &quot;-c&quot; 
               (concat &quot;mozilla-firefox &quot; url &quot;|| true&quot;))
      (message &quot;Starting Firefox...done&quot;))))&lt;/pre&gt;


&lt;pre&gt;(setq browse-url-browser-function 'browse-url-firefox-new-tab)&lt;/pre&gt;</content>

    


      </entry>
  
  <entry>
    <title>Lire des fils RSS avec Gnus</title>
    <link href="https://blog.nozav.org/post/2004/10/21/12-lire-des-fils-rss-avec-gnus" rel="alternate" type="text/html"
    title="Lire des fils RSS avec Gnus" />
    <id>urn:md5:1c87fd112caa3af35c8f1e4151ad8487</id>
    <published>2004-10-21T10:15:42+00:00</published>
          <updated>2005-02-04T15:34:45+00:00</updated>
            <author><name>Juba</name></author>
        <dc:subject>Emacs, Gnus</dc:subject>
        <dc:subject>emacs</dc:subject><dc:subject>gnus</dc:subject>
    <content type="html">    &lt;p&gt;&lt;a href=&quot;http://www.gnus.org/&quot;&gt;Gnus&lt;/a&gt; (le lecteur de news mail et autres sous Emacs) sait tout faire, ça n'est pas nouveau. Il sait aussi lire des fils d'informations au format XML-RSS, mais la marche à suivre indiquée dans la documentation ne fonctionne pas chez moi. Celle-ci suggère de créer un nouveau groupe à l'aide des touches G R, mais chez moi ça débouche sur un message d'erreur&amp;nbsp;:&lt;/p&gt;


&lt;pre&gt;No such newsgroup: nnrss:xxxxxxxxxx&lt;/pre&gt;


&lt;p&gt;Une autre méthode qui semble fonctionner est de créer le groupe dans un premier temps à l'aide de G m, de choisir un nom et  indiquer nnrss comme 'From method'. Ensuite, à la première ouverture du nouveau groupe, Gnus vous demandera l'url du fichier RSS, et le tour est joué&amp;nbsp;!&lt;/p&gt;</content>

    


      </entry>
  
</feed>
