This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun untabify-buffer () | |
(interactive) | |
(untabify 1 (point-max)) | |
(if (not (eq major-mode 'mew-draft-mode)) | |
;; delete-trailing-whitespace does not work in mew-draft-mode. | |
(delete-trailing-whitespace))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; http://article.gmane.org/gmane.emacs.orgmode/10256 | |
(defun org-get-heading-title () | |
"Returns the heading of the current entry as a string, without the leading stars, the TODO keyword or the tags." | |
(let ((title-with-props (org-get-heading t)) | |
(keyword (org-get-todo-state))) | |
(substring-no-properties title-with-props (if keyword (1+ (length keyword)))))) | |
(defun org-insert-heading-category () | |
"Insert a :CATEGORY: property and it's value to the PROPERTY drawer at point." | |
(interactive) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def e2j(eng) | |
eng.downcase.gsub("east", "東").gsub("north", "北").gsub("south", "南").gsub("west", "西").gsub("e", "東").gsub("n", "北").gsub("s", "南").gsub("w", "西") | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
#!/usr/bin/env ruby | |
# GET english examples from SpaceAlc | |
require 'uri' | |
require 'open-uri' | |
require 'rubygems' | |
require 'nokogiri' |
NewerOlder