-
-
Notifications
You must be signed in to change notification settings - Fork 102
/
ChmouelBoudjnah
93 lines (78 loc) · 3.14 KB
/
ChmouelBoudjnah
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
== Information ==
My name is Chmouel Boudjnah ([::chmouel]) and I am a French living in Sydney, Australia.
I use EmacsForDOS, and EmacsOnGnuLinux at work and at home since a couple of years (7).
* [http://www.emacswiki.org/cgi-bin/wiki?action=rc&all=1&showedit=1&from=1&rcuseronly=chmouel Contributions to the Wiki]
* [http://www.chmouel.com/ Web Page]
* Email: [mailto:chmouel@chmouel.com chmouel@chmouel.com]
* Emacs Blog: http://www.chmouel.com/blog/category/emacs/
== Code ==
Some of my code i like to keep (got to put somewhere in the wiki but i hardfly find where) :
<pre>
;; Search Google at point:
(defun my-search-google (w)
"Launch google on the Word at Point"
(interactive
(list (let* ((word (thing-at-point 'symbol))
(input (read-string (format "Google%s: "
(if (not word) "" (format " (default %s)" word))))))
(if (string= input "") (if (not word)
(error "No keyword to search given") word) input) ;sinon input
)))
(browse-url (format "http:/www.google.com/search?q=%s" w))
)
(global-set-key (read-kbd-macro "C-c j") 'my-search-google)
</pre>
<pre>
;;Compilation Frame (i should really use special-display-regexps instead)
(defvar my-compilation-frame 'nil)
(defun my-compilation-frame ( )
(interactive)
(if (not (frame-live-p my-compilation-frame))
(progn
(select-frame (or (and (frame-live-p my-compilation-frame) my-compilation-frame)
(setq my-compilation-frame
(make-frame '((name . "*Compilation*")(minibuffer . t)
(width . 100)(height . 15)
)) )))
(switch-to-buffer "*compilation*")
(modify-frame-parameters my-compilation-frame (list (cons 'menu-bar-lines 0)))
(buffer-disable-undo)
(setq buffer-read-only t)
(set-visited-file-name "")
)
(progn
(if (eq (selected-frame) my-compilation-frame)
(delete-frame my-compilation-frame)
(select-frame-set-input-focus my-compilation-frame)))
)
)
(global-set-key '[(f6)] 'my-compilation-frame)
</pre>
<pre>
;; Fast from switches (i know there is posting-styles personalities and such but i just need that mostly
(defvar my-email-adresses
'(("chmouel@chmouel.com") ("chmouel@squiz.net")("chmouel@yahoo.fr"))
)
(defun my-email-adress-switch ()
(interactive)
(save-excursion
(let* ((completion-ignore-case t)
(item (assoc-ignore-case
(completing-read "Email adress: " my-email-adresses nil t)
my-email-adresses))
(email-adress (car item)))
(beginning-of-buffer)
(if (re-search-forward "^From:" nil t)
(delete-region (point) (progn (end-of-line)(point)))
(insert "From:"))
(insert (concat " " user-full-name " <" email-adress ">"))
(if (not (eolp))(insert "\n"))
))
)
</pre>
== Talk ==
Welcome to the wiki! -- PierreGaston
[new]
The way I usually set up a page alias involves PermanentAnchors. Thus, the permanent anchor [[kensanata]] can be linked to like any other page, but it points to a place on my page. -- AlexSchroeder
----
CategoryHomePage