-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
675 lines (354 loc) · 17.8 KB
/
Copy pathindex.html
File metadata and controls
675 lines (354 loc) · 17.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
<title>Emacs Fodder</title>
<meta name="author" content="Jason Milkins">
<meta name="description" content="<a href="/soothe-theme.el" class="btn
btn-primary btn-large">soothe-theme.el Screenshots ">
<!-- http://t.co/dKP3o1e -->
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="canonical" href="http://emacsfodder.github.com/">
<link href="/favicon.png" rel="icon">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
<script src="/javascripts/modernizr-2.0.js"></script>
<script src="/javascripts/ender.js"></script>
<script src="/javascripts/octopress.js" type="text/javascript"></script>
<link href="/atom.xml" rel="alternate" title="Emacs Fodder" type="application/atom+xml">
<!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
</head>
<body >
<header role="banner"><img src="/emacs-fodder-head.png" />
</header>
<nav role="navigation"><ul class="subscription" data-subscription="rss">
<li><a href="/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
</ul>
<form action="http://google.com/search" method="get">
<fieldset role="search">
<input type="hidden" name="q" value="site:emacsfodder.github.com" />
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
</fieldset>
</form>
<ul class="main-navigation">
<li><a href="/">Blog</a></li>
<li><a href="/blog/archives">Archives</a></li>
</ul>
</nav>
<div id="main">
<div id="content">
<div class="blog-index">
<article>
<header>
<h1 class="entry-title"><a href="/blog/2012/07/17/soothe-theme/">Soothe Theme</a></h1>
<p class="meta">
<time datetime="2012-07-17T00:00:00+10:00" pubdate data-updated="true">Jul 17<span>th</span>, 2012</time>
</p>
</header>
<div class="entry-content"><p><a href="/soothe-theme.el" class="btn
btn-primary btn-large">soothe-theme.el</a></p>
<h1>Screenshots</h1>
<p><img src="/soothe-ruby.png" alt="" /></p>
<p><img src="/soothe-html.png" alt="" /></p>
</div>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/blog/2012/07/03/jadedragon-theme/">Jade Dragon Theme</a></h1>
<p class="meta">
<time datetime="2012-07-03T00:00:00+10:00" pubdate data-updated="true">Jul 3<span>rd</span>, 2012</time>
</p>
</header>
<div class="entry-content"><p><a href="/Jadedragon-theme.el" class="btn
btn-primary btn-large">Jadedragon-theme.el</a></p>
<h3>emacs-lisp</h3>
<p><img src="/jadedragon-emacslisp.png" alt="emacs-lisp" /></p>
<h3>ObjC</h3>
<p><img src="/jadedragon-objc.png" alt="SleepDisplay console utility" /></p>
</div>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/blog/2012/07/02/tangerine-theme/">Tangerine Theme</a></h1>
<p class="meta">
<time datetime="2012-07-02T00:00:00+10:00" pubdate data-updated="true">Jul 2<span>nd</span>, 2012</time>
</p>
</header>
<div class="entry-content"><p>Amber CRTs, Tangerine Dream, retro-futuristic, kandy kolored tangerine
flake streamline baby… all these things held some influence over
the creation of this theme. Well, those things, and the fact I like orange.</p>
<p><a href="/Tangerine-theme.el" class="btn
btn-primary btn-large">Tangerine-theme.el</a></p>
<h2>Obligatory screenshots</h2>
<p><img src="/tangerine-clojure.png" alt="Sample Clojure" /></p>
<h3>Tangerine shell</h3>
<p><img src="/tangerine-shell.png" alt="Sample Shell script" /></p>
<h3>Tangerine Perl</h3>
<p><img src="/tangerine-perls.png" alt="Sample Perl code Git.pm" /></p>
</div>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/blog/2012/06/30/hexrgb-some-convenient-functions/">HexRGB.el With Some Extras</a></h1>
<p class="meta">
<time datetime="2012-06-30T00:00:00+10:00" pubdate data-updated="true">Jun 30<span>th</span>, 2012</time>
</p>
</header>
<div class="entry-content"><p>If you use a lot of CSS we have a number of useful CSS DSLs, like
<a href="http://sass-lang.com">SASS</a> and <a href="http://lesscss.org">LESS</a> both of
which give us a collection of color manipulation functions.</p>
<p>Adding a few of these helpful color functions to Emacs is relatively
simple and the bulk of the work required is already done by Drew Adams
in his <a href="http://www.emacswiki.org/cgi-bin/wiki/hexrgb.el">hexrgb.el</a>
extension.</p>
<p>I’ve added a few small modifications in
<a href="https://gist.github.com/3022890">this version</a>, the
function: <code>hexrgb-hsv-to-hex</code> accepts an additional argument
<code>nb-digits</code> so that hex colors returned are with 2 digits per r,g,b
value.</p>
<pre><code>(hexrgb-hsv-to-hex 0.05 0.7 0.4 2)
;;------------------ ^ ---- ^ --- ^ ----- ^ -------
;; hue sat light nb-digits
</code></pre>
<p>Which returns <span style="color: white; background-color:#6639B8;
padding:4px; border-radius: 3px;">#6639B8</span></p>
<p>Previously, <strong>hexrgb.el</strong> returned hex colors with 4 digits per
channel (r, g, b), I’m not sure why, but obviously for a large number
of people, this isn’t all that useful.</p>
<p>I’ve also added a few convenience functions that provide color
manipulation direct from hex colors. Currently these just work in
eshell or ielm (interactive emacs lisp modes.)</p>
<p>For example:</p>
<pre><code>(hexrgb-hex-set-brightness "#ff0000" 0.3)
</code></pre>
<p>returns <span style="color:white;background-color:#4C0000; padding:4px; border-radius: 3px;">#4C0000</span></p>
<pre><code>(hexrgb-hex-set-saturation "#ff0000" 0.5)
</code></pre>
<p>returns <span style="color:white;background-color:#FF7F7F; padding:4px; border-radius: 3px;">#FF7F7F</span></p>
<pre><code>(hexrgb-hex-set-hue "#FF0000" 0.6)
</code></pre>
<p>returns <span style="color:white;background-color:#0066FF; padding:4px; border-radius: 3px;">#0066FF</span></p>
<p>These functions aren’t complicated, they use the hex-to-hsv existing
function, grab the h, s or v values and then convert back to a hex
color value. This makes working with colors easier, for example, you
could add <code>(require 'hexrgb)</code> to a theme definition and use the
functions to manipulate theme colors, or just switch on
<a href="https://github.com/emacsmirror/rainbow-mode"><em>rainbow-mode</em></a> when
you’re in eshell, and play.</p>
<p>Here’s the function definitions:</p>
<pre><code>(defun hexrgb-hex-set-brightness
(hex brightness)
"set brightness of a hex color, amount values from 0-1
returns a 6 digit hex color"
(let* ((hsv (hexrgb-hex-to-hsv hex))
(h (first hsv)) (s (second hsv)) (v (third hsv)))
(hexrgb-hsv-to-hex h s (* v brightness) 2)))
(defun hexrgb-hex-set-saturation
(hex saturation)
"set saturation of a hex color, amount values from 0-1
returns a 6 digit hex color"
(let* ((hsv (hexrgb-hex-to-hsv hex))
(h (first hsv)) (s (second hsv)) (v (third hsv)))
(hexrgb-hsv-to-hex h (* s saturation) v 2)))
(defun hexrgb-hex-set-hue
(hex hue)
"set hue of a hex color, amount values from 0-1
returns a 6 digit hex color"
(let* ((hsv (hexrgb-hex-to-hsv hex))
(s (second hsv)) (v (third hsv)))
(hexrgb-hsv-to-hex hue s v 2)))
</code></pre>
</div>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/blog/2012/06/29/two-new-emacs24-themes/">Two New Emacs24 Themes</a></h1>
<p class="meta">
<time datetime="2012-06-29T00:00:00+10:00" pubdate data-updated="true">Jun 29<span>th</span>, 2012</time>
</p>
</header>
<div class="entry-content"><p><a href="#newthemes">Jump directly to the new themes…</a></p>
<p>I have a number of Emacs color themes that were built a few years ago, they use the old <code>color-theme.el</code> system, I’d also adapted a web-based theme creator, so that it could load existing themes, as long as they were in a fixed format, the same as used by <a href="http://themes.sweyla.com/">http://themes.sweyla.com/</a></p>
<p>Anyway, I’ve begun to convert some of my regular themes over to the new <code>deftheme</code> format. The main advangatge is there’s no reliance on <code>color-theme</code> anymore. The only drawback for me is that I will need to update my existing theme-editor.</p>
<p>But in the meantime, it’s possible to create <code>deftheme</code> style themes with <code>customize-create-theme</code> but it’s not the best way to to it, frankly, even if I converted my existing theme tool, it would still be very limited.</p>
<p>The best thing to do is learn how to work with theme source code, which like everything that extends Emacs, is written in emacs lisp.</p>
<p>The basic template for making a theme is as follows:</p>
<pre><code>;;; Filename: name-theme.el
(deftheme name
"DOCSTRING")
;; Not a bad idea to define a palette...
(let (
(color-1 "#ffffff")
(color-2 "#ff0000")
(color-3 "#00ff00")
(color-4 "#0000ff"))
;; Set faces
(custom-theme-set-faces
'name ;; you must use the same theme name here...
'(default ((t (:foreground ,color-1 :background black))))
'(cursor ((t (:background ,color-4))))
'(fringe ((t (:background ,color-3))))
;;; etc...
;;; don't use these settings of course,
;;; they're horrible.
)
;; Set variables
(custom-theme-set-variables
'name ;; again specify the same theme name...
'(any-variable EXPR)
(provide-theme 'name)
;;; name-theme.el ends here
</code></pre>
<p>For a more advanced example to work from, look at the new built in themes, I’d recommend <code>tango-theme.el</code> which you’ll be able to find using, <code>M-x describe-theme</code> and then type <code>tango</code>.</p>
<p>The help buffer will give you a link to the source code, and you can study it further, (if you have questions, I’m very happy to answer them in the comments.)</p>
<p><a name="newthemes" /></p>
<hr />
<h1>Two new themes…</h1>
<h2>DeepBlueDay and MechanicalTurq</h2>
<p><img src="/emacs24.themes.vol1.png" alt="" /></p>
<h1>Download…</h1>
<p><a href="/DeepBlueDay-theme.el">DeepBlueDay-theme.el</a></p>
<p><a href="/MechanicalTurq-theme.el">MechanicalTurq-theme.el</a></p>
<p>Save them to your emacs custom theme folder, <code>~/.emacs.d/</code> by default, and in Emacs use <code>M-x enable-theme</code> to load and enable them (TAB completion will be available there, to make your life easier.)</p>
<p>If you have questions, let me know.</p>
</div>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/blog/2012/06/20/powerline-enhanced/">Powerline.el Enhanced</a></h1>
<p class="meta">
<time datetime="2012-06-20T00:00:00+10:00" pubdate data-updated="true">Jun 20<span>th</span>, 2012</time>
</p>
</header>
<div class="entry-content"><p>Powerline is an awesome little enhancement for Emacs, by an original
author unknown, you can find the original version at <a href="http://emacswiki.org/emacs/powerline.el">http://emacswiki.org/emacs/powerline.el</a></p>
<p>I’ve added a few different xpm shapes as alternatives to the arrows or
flatshapes, a rounded or folded corner, and a set of diagonals.</p>
<p>Grab the updated powerline from here: <a href="https://gist.github.com/2945235">https://gist.github.com/2945235</a> <span class="icon-download icon-white"></span></p>
<p>Put it somewhere in your Emacs load path (e.g. <code>~/.emacs.d</code>) and add
the following lines to the end of your <code>.emacs</code> / <code>init.el</code> - to load
it, set the colors and graphic shape:</p>
<pre><code>(require 'powerline)
;; colors...
(setq powerline-color1 "#222") ;; dark grey;
(setq powerline-color2 "#444") ;; slightly lighter grey
;; shape...
(setq powerline-arrow-shape 'arrow) ;; mirrored arrows,
;; see below for the shape options
</code></pre>
<h2>Shapes</h2>
<pre><code>(setq powerline-arrow-shape 'arrow) ;; 18px high arrows
</code></pre>
<p><img src="/arrow.png" alt="" /></p>
<pre><code>(setq powerline-arrow-shape 'arrow14) ;; 14px high arrows
</code></pre>
<p><img src="/arrow14.png" alt="" /></p>
<pre><code>(setq powerline-arrow-shape 'half) ;; flat
</code></pre>
<p><img src="/half.png" alt="" /></p>
<pre><code>(setq powerline-arrow-shape 'percent) ;; ...? (I have no idea)
</code></pre>
<p><img src="/percent.png" alt="" /></p>
<pre><code>(setq powerline-arrow-shape 'curve) ;; scallop curve
</code></pre>
<p><img src="/curve.png" alt="" /></p>
<h2>New shapes in this version</h2>
<pre><code>(setq powerline-arrow-shape 'rounded) ;; new, round corner
</code></pre>
<p><img src="/rounded.png" alt="" /></p>
<pre><code>(setq powerline-arrow-shape 'chamfer) ;; new, folded corner
</code></pre>
<p><img src="/chamfer.png" alt="" /></p>
<pre><code>(setq powerline-arrow-shape 'slant-left) ;; new, diagonal from left
</code></pre>
<p><img src="/slant-left.png" alt="" /></p>
<pre><code>(setq powerline-arrow-shape 'slant-right) ;; new, diagonal from right
</code></pre>
<p><img src="/slant-right.png" alt="" /></p>
<pre><code>(setq powerline-arrow-shape 'slant) ;; mirrored diagonals
</code></pre>
<p><img src="/slant.png" alt="" /></p>
</div>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/blog/2012/06/20/emacs-binaries/">Emacs 24.1.5 OSX Fullscreen Binaries</a></h1>
<p class="meta">
<time datetime="2012-06-20T00:00:00+10:00" pubdate data-updated="true">Jun 20<span>th</span>, 2012</time>
</p>
</header>
<div class="entry-content"><p>For convenience, I’ve built a couple of OS X binaries of Emacs24.1.5,</p>
<p>First, built with Lion OS X 10.7.4 and patched to use Lion’s new
fullscreen mode, I have tested it only on 10.7.4 (in fact I’m writing
this post with it.) but, personally I prefer the old
<em>ns-toggle-fullscreen</em> style of Fullscreen, as I use multiple
monitors. However, it’s useful if you have one screen and prefer the
Mission control screen swiping style. Non Mac users, suspend your
teeth nashing.</p>
<p>The binary can be downloaded from here:</p>
<blockquote><p><img src="https://github.com/jasonm23/emacs-icons-project/raw/master/thumb/emacs-card-british-racing-green.png" alt="" />
<br/> <a href="/emacs-24.1.5-lion-fullscreen-os-x-10.7.4.tar.7z">emacs-24.1.5-lion-fullscreen-os-x-10.7.4.tar.7z</a></p></blockquote>
<p><em>(You’ll need 7z/tar to uncompress it, <a href="http://wakaba.c3.cx/s/apps/unarchiver.html">The Unarchiver</a> will do the trick.)</em></p>
<p>I’ve also built a 10.6.8 (and up) compatible build of Emacs24.1.5
with the older <em>ns-toggle-fullscreen</em> patch, which does non-exclusive
fullscreen, TBH, I’d recommend you get this one unless you’re <em>really</em>
wanting the little Lion OS X fullscreen window widget.</p>
<p>It’s quite possible to get the same mission control style operation,
but you’ll need to drag it to it’s own space… yeah, I know, the
things I make you do.</p>
<p>The link for this binary is:</p>
<blockquote><p><img src="https://github.com/jasonm23/emacs-icons-project/raw/master/thumb/emacs-card-british-racing-green.png" alt="" />
<br/> <a href="/emacs-24.1.5-ns-fullscreen-osx-10.6.8.tar.7z">emacs-24.1.5-ns-fullscreen-osx-10.6.8.tar.7z</a></p></blockquote>
<p>Ok, so that’s the first post here. Enjoy.</p>
<p>Coming soon, <code>powerline.el</code> with some new styling addons.</p>
</div>
</article>
<div class="pagination">
<a href="/blog/archives">Blog Archives</a>
</div>
</div>
<aside class="sidebar">
<section>
<h1>Recent Posts</h1>
<ul id="recent_posts">
<li class="post">
<a href="/blog/2012/07/17/soothe-theme/">Soothe theme</a>
</li>
<li class="post">
<a href="/blog/2012/07/03/jadedragon-theme/">Jade Dragon theme</a>
</li>
<li class="post">
<a href="/blog/2012/07/02/tangerine-theme/">Tangerine Theme</a>
</li>
<li class="post">
<a href="/blog/2012/06/30/hexrgb-some-convenient-functions/">HexRGB.el with some extras</a>
</li>
<li class="post">
<a href="/blog/2012/06/29/two-new-emacs24-themes/">Two New Emacs24 Themes</a>
</li>
</ul>
</section>
</aside>
</div>
</div>
<footer role="contentinfo"><p>
Copyright © 2012 - Jason Milkins -
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
</p>
</footer>
<script type="text/javascript">
(function(){
var twitterWidgets = document.createElement('script');
twitterWidgets.type = 'text/javascript';
twitterWidgets.async = true;
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
})();
</script>
</body>
</html>