June 7, 2005

Bulk view

Adding an arbitrary extension to your planner files

Do you want all of your planner files to have a TXT extension so that
they’ll be searched by tools such as Google Desktop or Apple Spotlight?

Use the ‘rename’ tool to add .txt extensions to all of your files, or
use the following code to rename all of your planner files from a
running Planner setup:

(defun my-rename-planner-files ()
  "Rename all my planner files to .txt if they don't have that extension yet."
  (interactive)
  (mapcar
   (lambda (file)
     (unless (string-match "\\.txt$" (cdr file))
       (rename-file (cdr file) (concat (cdr file) ".txt"))
       (message "%s" (cdr file))))
   (planner-file-alist))
  (with-planner
    (emacs-wiki-refresh-file-alist)))

Then add this to your ~/.emacs before you load Planner:

(setq emacs-wiki-ignored-extensions-regexp "\\.txt")

(defadvice emacs-wiki-find-file (around extension activate)
  "Open the Emacs Wiki page WIKI by name.
If COMMAND is non-nil, it is the function used to visit the file.
If DIRECTORY is non-nil, it is the directory in which the Wiki
page will be created if it does not already exist."
  (unless (interactive-p)
    (setq wiki (cons wiki
                     (cdr (assoc wiki (emacs-wiki-file-alist))))))
  ;; At this point, `wiki' is (GIVEN-PAGE FOUND-FILE).
  (if (cdr wiki)
      (let ((buffer (funcall (or command 'find-file) (cdr wiki))))
        (if (= (prefix-numeric-value current-prefix-arg) 16)
            (with-current-buffer buffer
              (set (make-variable-buffer-local 'emacs-wiki-directories)
                   (cons (file-name-directory (cdr wiki))
                         emacs-wiki-directories))
              (set (make-variable-buffer-local 'emacs-wiki-file-alist)
                   nil)))
        buffer)
    (let* ((dirname (or directory
                        (emacs-wiki-maybe t)
                        (car emacs-wiki-directories)))
           (filename (expand-file-name (car wiki) dirname)))
      (unless (file-exists-p dirname)
        (make-directory dirname t))
      (funcall (or command 'find-file) (concat filename ".txt")))))

新しいパソコンを買うつもりで金を溜めているんだ。 I am saving money in order to buy a new personal computer.

On Technorati: , ,

Software Freedom Day

1. Why Sept. 10? What’s the significance of that date?

Hehe… well, that wss the day that Open Minds (now the Opensource
Technology Association of the Philippines) declared “war” on
Microsoft in a press conference back in 2002.

Note that the Software Freedom Day, worldwide, strongly discourages
bashing of any companies or individuals. Including Microsoft.

It’s not about war. It’s about freedom.

For consumers, it could be as simple as the freedom to take advantage
of freely-available quality software that they might not know about.
Tell your friends about Mozilla Firefox, GAIM, GIMP, and other neat
programs that run on even Microsoft Windows.

For students and hobbyists, it could be the freedom to participate in
world-wide projects and make a difference not only through code but
also through equally valuable efforts like art, translation, and
documentation.

For companies, it could be the freedom to deploy best-of-breed
solutions without having to allocate budget for yearly licensing.

This is your opportunity to show people what they can do. Listen to
their needs and help them find answers.

Most people don’t care about being anti-Microsoft. If people think
that the best arguments we can make for Free software is that it’s not
Microsoft and it doesn’t cost a thing, then we’re even further from
Freedom than we thought.

その限られた性能のために私はコンピユーターに幻滅を感じている。 Its limited capability has disenchanted me with computer.

On Technorati: , ,