SlideShare uma empresa Scribd logo
1 de 40
Baixar para ler offline
はじめての
anything-c-source-*
   Kenichirou Oyama
(k1LoW@fukuoka-emacs)
(self-intoroduce 'k1LoW)
    • type:
             –    Programmer
    • Emacs Lisp
        – http://emacswiki.org/k1LoW
    • Membership:
        – fukuoka-emacs
             –    Fusic Co.,Ltd >> http://fusic.co.jp
             –    codecheck.in >> http://trac.codecheck.in
    and 101000code / 3rdSTONE



-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   2
-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   3
ここ数年で発生し蔓延している
        感染症があります



-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   4
この中の人にも何人かいるかと
          思います



-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   5
感染源




-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   6
id:rubikitch




-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   7
病名




-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   8
anything脳




-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   9
症状
    • Em acs Lispの候補選択フレームワークであ
      るanything.elの操作性に慣れきってしまい、
      なんでもかんでも「完全一致」、「部分一致
      +AN D検索」、「正規表現」、「m igem o」
      で絞り込み検索ができないのか考えてしまう
      中毒症状。
    • Em acs環境以外でのプログラム生活で支障を
      きたし、「Em acsキーバインド以来の中毒性
      が見られる」と提言する専門家も。
    • anything.elのメンテナであるid:rubikitchも
      anything脳であることが本人の告白により明
      らかになっている。

-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   10
みなさん注意喚起を
                   お願いします!!



-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   11
さて




-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   12
はじめての
                anything-c-source-*



-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   13
anything-c-source-*
    •     anything.elの選択候補となるコード
    •     anything.elはanything-c-source-*を選
          択候補させるフレームワーク
             – anything.elはanything-c-
               source-*がないとはじまらない




-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   14
anything-c-source-*....?




-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   15
anything-config.el
    •     `anything-c-source-complex-command-history' (Complex Command History)
    •     `anything-c-source-extended-command-history' (Emacs Commands History)
    •     `anything-c-source-emacs-commands'            (Emacs Commands)
    •     `anything-c-source-lacarte'               (Lacarte)
    •     `anything-c-source-emacs-functions'             (Emacs Functions)
    •     `anything-c-source-emacs-functions-with-abbrevs' (Emacs Functions)
    •     `anything-c-source-emacs-variables' (Emacs Variables)
    •     `anything-c-source-bookmarks'        (Bookmarks)
    •     `anything-c-source-bookmark-set'      (Set Bookmark)
    •     `anything-c-source-bookmarks-ssh'     (Bookmarks-ssh)
    •     `anything-c-source-bookmarks-su'      (Bookmarks-root)
    •     `anything-c-source-bookmarks-local' (Bookmarks-Local)
    •     `anything-c-source-w3m-bookmarks'      (W3m Bookmarks)
    •     `anything-c-source-elisp-library-scan' (Elisp libraries (Scan))
    •     `anything-c-source-imenu'                          (Imenu)

-uuu:---F1 tokyo-emacs #x2009.9.6 02 All(1.0) (Emacs-Lisp ppt)----                16
anything-config.el
    •     `anything-c-source-ctags'                          (Exuberant ctags)
    •     `anything-c-source-semantic'                         (Semantic Tags)
    •     `anything-c-source-simple-call-tree-functions-callers' (Function is called by)
    •     `anything-c-source-simple-call-tree-callers-functions' (Function calls)
    •     `anything-c-source-commands-and-options-in-file'          (Commands/Options in file)
    •     `anything-c-source-customize-face' (Customize Face)
    •     `anything-c-source-colors'        (Colors)
    •     `anything-c-source-tracker-search' (Tracker Search)
    •     `anything-c-source-mac-spotlight' (mdfind)
    •     `anything-c-source-icicle-region' (Icicle Regions)
    •     `anything-c-source-kill-ring' (Kill Ring)
    •     `anything-c-source-mark-ring'        (mark-ring)
    •     `anything-c-source-global-mark-ring' (global-mark-ring)
    •     `anything-c-source-register' (Registers)
    •     `anything-c-source-fixme'                       (TODO/FIXME/DRY comments)

-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----                               17
anything-config.el
    •     `anything-c-source-rd-headline'                  (RD HeadLine)
    •     `anything-c-source-oddmuse-headline'               (Oddmuse HeadLine)
    •     `anything-c-source-emacs-source-defun'              (Emacs Source DEFUN)
    •     `anything-c-source-emacs-lisp-expectations'         (Emacs Lisp Expectations)
    •     `anything-c-source-emacs-lisp-toplevels'           (Emacs Lisp Toplevel / Level 4
          Comment / Linkd Star)
    •     `anything-c-source-org-headline'                 (Org HeadLine)
    •     `anything-c-source-yaoddmuse-emacswiki-edit-or-view' (Yaoddmuse Edit or View
          (EmacsWiki))
    •     `anything-c-source-yaoddmuse-emacswiki-post-library' (Yaoddmuse Post library
          (EmacsWiki))
    •     `anything-c-source-eev-anchor'                   (Anchors)
    •     `anything-c-source-picklist'        (Picklist)
    •     `anything-c-source-bbdb'            (BBDB)
    •     `anything-c-source-evaluation-result' (Evaluation Result)
    •     `anything-c-source-calculation-result' (Calculation Result)

-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----                            18
anything-config.el
    •     `anything-c-source-google-suggest'      (Google Suggest)
    •     `anything-c-source-surfraw'           (Surfraw)
    •     `anything-c-source-emms-streams'         (Emms Streams)
    •     `anything-c-source-emms-dired'          (Music Directory)
    •     `anything-c-source-jabber-contacts'     (Jabber Contacts)
    •     `anything-c-source-call-source'       (Call anything source)
    •     `anything-c-source-occur'            (Occur)
    •     `anything-c-source-create'            (Create)
    •     `anything-c-source-minibuffer-history' (Minibuffer History)
    •     `anything-c-source-elscreen'          (Elscreen)
    •     `anything-c-source-xrandr-change-resolution' (Change Resolution)
    •     `anything-c-source-xfonts'                (X Fonts)
    •     `anything-c-source-gentoo'                (Portage sources)
    •     `anything-c-source-use-flags'              (Use Flags)
    •     `anything-c-source-emacs-process'              (Emacs Process)

-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----           19
anything-function
    •     anything()を利用して独自の関数を作成
    •     anything-c-source-*をリストするだけでも
          OK
     (defun my-anything-find-file ()
      "My `anything'."
      (interactive)
      (anything (list anything-c-source-buffers
                  anything-c-source-files-in-current-dir
                  anything-c-source-file-name-history)
             initial-pattern
             "Find File: " nil))

-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   20
anything-function
    •     anything()を利用して独自の関数を作成
    •     anything-c-source-*をリストするだけでも
          OK
     (defun my-anything-find-file ()
      "My `anything'."
      (interactive)
      (anything (list anything-c-source-buffers
                  anything-c-source-files-in-current-dir
                  anything-c-source-file-name-history)
             initial-pattern
             "Find File: " nil))

-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   21
anything-function
    •     anything()を利用して独自の関数を作成
    •     anything-c-source-*をリストするだけでも
          OK
     (defun my-anything-find-file ()
      "My `anything'."
      (interactive)
      (anything (list anything-c-source-buffers
                  anything-c-source-files-in-current-dir
                  anything-c-source-file-name-history)
             initial-pattern
             "Find File: " nil))

-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   22
anything()の引数
    •     ANY-SOURCES
             –    anything-c-source-*リスト
    •     ANY-INPUT
             –    anything()に渡す初期入力
    •     ANY-PROMPT
             –    mini-bufferに出るプロンプト文字列
    •     ANY-RESUME
             –    anything()実行する際に初期かするか
    •     ANY-PRESELECT
             –    anything()実行時に選択する文字列
    •     ANY-BUFFER
             –    anything()実行時に使用するバッファ
-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   23
anything()の引数
    •     ANY-SOURCES
             –    anything-c-source-*リスト
    •     ANY-INPUT
             –    anything()に渡す初期入力
    •     ANY-PROMPT
             –    mini-bufferに出るプロンプト文字列
    •     ANY-RESUME
             –    anything()実行する際に初期かするか
    •     ANY-PRESELECT
             –    anything()実行時に選択する文字列
    •     ANY-BUFFER
             –    anything()実行時に使用するバッファ
-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   24
簡単anything-c-source




-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   25
anything-c-source-*の設定
          (自分が使ったことあるものだけ)
    •     Init
             –     初期処理
    •     name
             –     anytnig-c-sourceの名前(呼び出されたときに名前がつ
                   く)
    •     candidates
             –     候補リスト
    •     (candidate-in-buffer)
             –     candidatesをbufferで作ったとき設定する
    •     action
             –     選択した候補から渡される値をもとに実行する関数

-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   26
anything-c-source-*の設定
            (自分が使ったことあるものだけ)
   •        display-to-real
        –     candidatesから選択した候補を調整してactionに渡す
              replace関数
   •        type
        –     候補リストのタイプ。設定するとデフォルトactionが
              設定される



       まだ多くあるけれども、使ったことないので省略
            (いろいろ教えてください!)


-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   27
/tmpディレクトリのファイルを
       開くanything-c-source
   • nameとcandidatesとtypeだけ
     で作成できる




-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   28
STEP1
    • anything-c-sourceの変数を作
      成
          – 変数名はanything-c-source-
             tmp-dir
    (defvar anything-c-source-tmp-dir
      '())




-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   29
STEP2
    • nameを決定
            – “Tmp dir”

    (defvar anything-c-source-tmp-dir
      '((name . "Tmp dir")
        )




-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   30
STEP3
    • typeを決定
            – ファイルなのでfile

    (defvar anything-c-source-tmp-dir
      '((name . "Tmp dir")
        (type . file)))




-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   31
STEP4
    • candidatesを作成
            – /tmp内のファイルをリストで
              返す関数をセット
    (defvar anything-c-source-tmp-dir
      '((name . "Tmp dir")
        (candidates . (lambda () (directory-files "/tmp")))
        (type . file)))



-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   32
anything-c-source-tmp-dir
                  完成!



-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   33
STEP5
    • anything-c-source-tmp-dirを
      my-anything-find-fileに追加
     (defun my-anything-find-file ()
      "My `anything'."
      (interactive)
      (anything (list anything-c-source-buffers
                  anything-c-source-files-in-current-dir
                  anything-c-source-file-name-history
                  anything-c-source-tmp-dir)
             initial-pattern
             "Find File: " nil))
-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   34
簡単!




-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   35
まとめ
   • anything-c-source-*を作成す
     るのは簡単!
   • より高度なことをしたいときは
     、同じようなことをしている
     anything-c-source-*をみてみ
     ればOK

-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   36
伝言

-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   37
skype.elがEmacs22系でも
                         動くようになりました。
                         NTEmacsなどでも動きます。




                         id:kiwanami


-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   38
近々codecheck.inに
                                 コミットします




                         id:kiwanami


-uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)----   39
id:IMAKADO君、
                                   デバッグよろしく




                         id:kiwanami


-uuu:---F1 tokyo-emacs #x2009.9.6 02 All(1.0) (Emacs-Lisp ppt)----   40

Mais conteúdo relacionado

Mais procurados

How to deploy node to production
How to deploy node to productionHow to deploy node to production
How to deploy node to production
Sean Hess
 
Anatomy of a PHP Request ( UTOSC 2010 )
Anatomy of a PHP Request ( UTOSC 2010 )Anatomy of a PHP Request ( UTOSC 2010 )
Anatomy of a PHP Request ( UTOSC 2010 )
Joseph Scott
 
Get Soaked - An In Depth Look At PHP Streams
Get Soaked - An In Depth Look At PHP StreamsGet Soaked - An In Depth Look At PHP Streams
Get Soaked - An In Depth Look At PHP Streams
Davey Shafik
 

Mais procurados (20)

Perl web app 테스트전략
Perl web app 테스트전략Perl web app 테스트전략
Perl web app 테스트전략
 
How to deploy node to production
How to deploy node to productionHow to deploy node to production
How to deploy node to production
 
NTUSTxTDOH 資訊安全基礎工作坊 基礎逆向教育訓練
NTUSTxTDOH 資訊安全基礎工作坊 基礎逆向教育訓練NTUSTxTDOH 資訊安全基礎工作坊 基礎逆向教育訓練
NTUSTxTDOH 資訊安全基礎工作坊 基礎逆向教育訓練
 
Is your code ready for PHP 7 ?
Is your code ready for PHP 7 ?Is your code ready for PHP 7 ?
Is your code ready for PHP 7 ?
 
The why and how of moving to php 5.4
The why and how of moving to php 5.4The why and how of moving to php 5.4
The why and how of moving to php 5.4
 
Laravel Day / Deploy
Laravel Day / DeployLaravel Day / Deploy
Laravel Day / Deploy
 
NTUSTxTDOH - Pwn基礎 2015/12/27
NTUSTxTDOH - Pwn基礎 2015/12/27NTUSTxTDOH - Pwn基礎 2015/12/27
NTUSTxTDOH - Pwn基礎 2015/12/27
 
Fun with Ruby and Cocoa
Fun with Ruby and CocoaFun with Ruby and Cocoa
Fun with Ruby and Cocoa
 
My Opera meets Varnish, Dec 2009
My Opera meets Varnish, Dec 2009My Opera meets Varnish, Dec 2009
My Opera meets Varnish, Dec 2009
 
Perlmania_Study - CPAN
Perlmania_Study - CPANPerlmania_Study - CPAN
Perlmania_Study - CPAN
 
Kernel Recipes 2016 - Why you need a test strategy for your kernel development
Kernel Recipes 2016 - Why you need a test strategy for your kernel developmentKernel Recipes 2016 - Why you need a test strategy for your kernel development
Kernel Recipes 2016 - Why you need a test strategy for your kernel development
 
Intro to pl/PHP Oscon2007
Intro to pl/PHP Oscon2007Intro to pl/PHP Oscon2007
Intro to pl/PHP Oscon2007
 
台科逆向簡報
台科逆向簡報台科逆向簡報
台科逆向簡報
 
Os Treat
Os TreatOs Treat
Os Treat
 
Modern Catalyst
Modern  CatalystModern  Catalyst
Modern Catalyst
 
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)
 
Anatomy of a PHP Request ( UTOSC 2010 )
Anatomy of a PHP Request ( UTOSC 2010 )Anatomy of a PHP Request ( UTOSC 2010 )
Anatomy of a PHP Request ( UTOSC 2010 )
 
Stack Smashing Protector (Paul Rascagneres)
Stack Smashing Protector (Paul Rascagneres)Stack Smashing Protector (Paul Rascagneres)
Stack Smashing Protector (Paul Rascagneres)
 
Call Return Exploration
Call Return ExplorationCall Return Exploration
Call Return Exploration
 
Get Soaked - An In Depth Look At PHP Streams
Get Soaked - An In Depth Look At PHP StreamsGet Soaked - An In Depth Look At PHP Streams
Get Soaked - An In Depth Look At PHP Streams
 

Destaque (18)

Emacs Lisp 紹介
Emacs Lisp 紹介Emacs Lisp 紹介
Emacs Lisp 紹介
 
anything-php-funcref-perl.el
anything-php-funcref-perl.elanything-php-funcref-perl.el
anything-php-funcref-perl.el
 
for JSDeferred Code Reading
for JSDeferred Code Readingfor JSDeferred Code Reading
for JSDeferred Code Reading
 
CakePHP DB Schema/Model Info Plugin
CakePHP DB Schema/Model Info PluginCakePHP DB Schema/Model Info Plugin
CakePHP DB Schema/Model Info Plugin
 
Jessie's 60th
Jessie's 60thJessie's 60th
Jessie's 60th
 
Small Stuff
Small StuffSmall Stuff
Small Stuff
 
Fantasticno W
Fantasticno WFantasticno W
Fantasticno W
 
CakePHPゆとり開発環境
CakePHPゆとり開発環境CakePHPゆとり開発環境
CakePHPゆとり開発環境
 
Fukuoka Emacs #X02
Fukuoka Emacs #X02Fukuoka Emacs #X02
Fukuoka Emacs #X02
 
Fantasticno
FantasticnoFantasticno
Fantasticno
 
Human Joy!
Human Joy!Human Joy!
Human Joy!
 
A dash of creativity
A dash of creativityA dash of creativity
A dash of creativity
 
Nature
NatureNature
Nature
 
Yet Another Plugins
Yet Another PluginsYet Another Plugins
Yet Another Plugins
 
Tokyo Tyrant + PHP
Tokyo Tyrant + PHPTokyo Tyrant + PHP
Tokyo Tyrant + PHP
 
git-svn intro
git-svn introgit-svn intro
git-svn intro
 
実"戦"CakePHP Plugin
実"戦"CakePHP Plugin実"戦"CakePHP Plugin
実"戦"CakePHP Plugin
 
CakePHP Console Application 拡張Tips
CakePHP Console Application 拡張TipsCakePHP Console Application 拡張Tips
CakePHP Console Application 拡張Tips
 

Semelhante a はじめてのanything-c-source-*

Make Your Life Easier With Maatkit
Make Your Life Easier With MaatkitMake Your Life Easier With Maatkit
Make Your Life Easier With Maatkit
MySQLConference
 
Web 2.0 Performance and Reliability: How to Run Large Web Apps
Web 2.0 Performance and Reliability: How to Run Large Web AppsWeb 2.0 Performance and Reliability: How to Run Large Web Apps
Web 2.0 Performance and Reliability: How to Run Large Web Apps
adunne
 
Rubish- A Quixotic Shell
Rubish- A Quixotic ShellRubish- A Quixotic Shell
Rubish- A Quixotic Shell
guest3464d2
 
Linguagens Dinamicas - Tech Days 2008
Linguagens Dinamicas - Tech Days 2008Linguagens Dinamicas - Tech Days 2008
Linguagens Dinamicas - Tech Days 2008
Alcides Fonseca
 

Semelhante a はじめてのanything-c-source-* (20)

Make Your Life Easier With Maatkit
Make Your Life Easier With MaatkitMake Your Life Easier With Maatkit
Make Your Life Easier With Maatkit
 
第1回PHP拡張勉強会
第1回PHP拡張勉強会第1回PHP拡張勉強会
第1回PHP拡張勉強会
 
What Can Compilers Do for Us?
What Can Compilers Do for Us?What Can Compilers Do for Us?
What Can Compilers Do for Us?
 
Beginner's Guide to the nmap Scripting Engine - Redspin Engineer, David Shaw
Beginner's Guide to the nmap Scripting Engine - Redspin Engineer, David ShawBeginner's Guide to the nmap Scripting Engine - Redspin Engineer, David Shaw
Beginner's Guide to the nmap Scripting Engine - Redspin Engineer, David Shaw
 
History of jQuery
History of jQueryHistory of jQuery
History of jQuery
 
Web 2.0 Performance and Reliability: How to Run Large Web Apps
Web 2.0 Performance and Reliability: How to Run Large Web AppsWeb 2.0 Performance and Reliability: How to Run Large Web Apps
Web 2.0 Performance and Reliability: How to Run Large Web Apps
 
Os Wilhelm
Os WilhelmOs Wilhelm
Os Wilhelm
 
Being functional in PHP (PHPDay Italy 2016)
Being functional in PHP (PHPDay Italy 2016)Being functional in PHP (PHPDay Italy 2016)
Being functional in PHP (PHPDay Italy 2016)
 
Parallel Computing in R
Parallel Computing in RParallel Computing in R
Parallel Computing in R
 
Performance tests with Gatling (extended)
Performance tests with Gatling (extended)Performance tests with Gatling (extended)
Performance tests with Gatling (extended)
 
JDD 2017: Performance tests with Gatling (Andrzej Ludwikowski)
JDD 2017: Performance tests with Gatling (Andrzej Ludwikowski)JDD 2017: Performance tests with Gatling (Andrzej Ludwikowski)
JDD 2017: Performance tests with Gatling (Andrzej Ludwikowski)
 
All The Little Pieces
All The Little PiecesAll The Little Pieces
All The Little Pieces
 
Transfer to kubernetes data platform from EMR
Transfer to kubernetes data platform from EMRTransfer to kubernetes data platform from EMR
Transfer to kubernetes data platform from EMR
 
Cより速いRubyプログラム
Cより速いRubyプログラムCより速いRubyプログラム
Cより速いRubyプログラム
 
Clojure: Practical functional approach on JVM
Clojure: Practical functional approach on JVMClojure: Practical functional approach on JVM
Clojure: Practical functional approach on JVM
 
Rubish- A Quixotic Shell
Rubish- A Quixotic ShellRubish- A Quixotic Shell
Rubish- A Quixotic Shell
 
Linguagens Dinamicas - Tech Days 2008
Linguagens Dinamicas - Tech Days 2008Linguagens Dinamicas - Tech Days 2008
Linguagens Dinamicas - Tech Days 2008
 
Preon (J-Fall 2008)
Preon (J-Fall 2008)Preon (J-Fall 2008)
Preon (J-Fall 2008)
 
What's up with Prototype and script.aculo.us?
What's up with Prototype and script.aculo.us?What's up with Prototype and script.aculo.us?
What's up with Prototype and script.aculo.us?
 
我在豆瓣使用Emacs
我在豆瓣使用Emacs我在豆瓣使用Emacs
我在豆瓣使用Emacs
 

Último

Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
amitlee9823
 
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
lizamodels9
 
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabiunwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
Abortion pills in Kuwait Cytotec pills in Kuwait
 
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service NoidaCall Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
dlhescort
 
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
dollysharma2066
 
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
Renandantas16
 

Último (20)

Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and pains
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communications
 
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
Business Model Canvas (BMC)- A new venture concept
Business Model Canvas (BMC)-  A new venture conceptBusiness Model Canvas (BMC)-  A new venture concept
Business Model Canvas (BMC)- A new venture concept
 
Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1
 
Falcon Invoice Discounting platform in india
Falcon Invoice Discounting platform in indiaFalcon Invoice Discounting platform in india
Falcon Invoice Discounting platform in india
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
 
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
 
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
 
John Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdfJohn Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdf
 
Phases of Negotiation .pptx
 Phases of Negotiation .pptx Phases of Negotiation .pptx
Phases of Negotiation .pptx
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 May
 
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabiunwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
 
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service NoidaCall Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
 
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
 
Falcon's Invoice Discounting: Your Path to Prosperity
Falcon's Invoice Discounting: Your Path to ProsperityFalcon's Invoice Discounting: Your Path to Prosperity
Falcon's Invoice Discounting: Your Path to Prosperity
 
Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Century
 
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
 

はじめてのanything-c-source-*

  • 1. はじめての anything-c-source-* Kenichirou Oyama (k1LoW@fukuoka-emacs)
  • 2. (self-intoroduce 'k1LoW) • type: – Programmer • Emacs Lisp – http://emacswiki.org/k1LoW • Membership: – fukuoka-emacs – Fusic Co.,Ltd >> http://fusic.co.jp – codecheck.in >> http://trac.codecheck.in and 101000code / 3rdSTONE -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 2
  • 3. -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 3
  • 4. ここ数年で発生し蔓延している 感染症があります -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 4
  • 5. この中の人にも何人かいるかと 思います -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 5
  • 6. 感染源 -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 6
  • 7. id:rubikitch -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 7
  • 8. 病名 -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 8
  • 9. anything脳 -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 9
  • 10. 症状 • Em acs Lispの候補選択フレームワークであ るanything.elの操作性に慣れきってしまい、 なんでもかんでも「完全一致」、「部分一致 +AN D検索」、「正規表現」、「m igem o」 で絞り込み検索ができないのか考えてしまう 中毒症状。 • Em acs環境以外でのプログラム生活で支障を きたし、「Em acsキーバインド以来の中毒性 が見られる」と提言する専門家も。 • anything.elのメンテナであるid:rubikitchも anything脳であることが本人の告白により明 らかになっている。 -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 10
  • 11. みなさん注意喚起を お願いします!! -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 11
  • 12. さて -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 12
  • 13. はじめての anything-c-source-* -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 13
  • 14. anything-c-source-* • anything.elの選択候補となるコード • anything.elはanything-c-source-*を選 択候補させるフレームワーク – anything.elはanything-c- source-*がないとはじまらない -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 14
  • 15. anything-c-source-*....? -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 15
  • 16. anything-config.el • `anything-c-source-complex-command-history' (Complex Command History) • `anything-c-source-extended-command-history' (Emacs Commands History) • `anything-c-source-emacs-commands' (Emacs Commands) • `anything-c-source-lacarte' (Lacarte) • `anything-c-source-emacs-functions' (Emacs Functions) • `anything-c-source-emacs-functions-with-abbrevs' (Emacs Functions) • `anything-c-source-emacs-variables' (Emacs Variables) • `anything-c-source-bookmarks' (Bookmarks) • `anything-c-source-bookmark-set' (Set Bookmark) • `anything-c-source-bookmarks-ssh' (Bookmarks-ssh) • `anything-c-source-bookmarks-su' (Bookmarks-root) • `anything-c-source-bookmarks-local' (Bookmarks-Local) • `anything-c-source-w3m-bookmarks' (W3m Bookmarks) • `anything-c-source-elisp-library-scan' (Elisp libraries (Scan)) • `anything-c-source-imenu' (Imenu) -uuu:---F1 tokyo-emacs #x2009.9.6 02 All(1.0) (Emacs-Lisp ppt)---- 16
  • 17. anything-config.el • `anything-c-source-ctags' (Exuberant ctags) • `anything-c-source-semantic' (Semantic Tags) • `anything-c-source-simple-call-tree-functions-callers' (Function is called by) • `anything-c-source-simple-call-tree-callers-functions' (Function calls) • `anything-c-source-commands-and-options-in-file' (Commands/Options in file) • `anything-c-source-customize-face' (Customize Face) • `anything-c-source-colors' (Colors) • `anything-c-source-tracker-search' (Tracker Search) • `anything-c-source-mac-spotlight' (mdfind) • `anything-c-source-icicle-region' (Icicle Regions) • `anything-c-source-kill-ring' (Kill Ring) • `anything-c-source-mark-ring' (mark-ring) • `anything-c-source-global-mark-ring' (global-mark-ring) • `anything-c-source-register' (Registers) • `anything-c-source-fixme' (TODO/FIXME/DRY comments) -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 17
  • 18. anything-config.el • `anything-c-source-rd-headline' (RD HeadLine) • `anything-c-source-oddmuse-headline' (Oddmuse HeadLine) • `anything-c-source-emacs-source-defun' (Emacs Source DEFUN) • `anything-c-source-emacs-lisp-expectations' (Emacs Lisp Expectations) • `anything-c-source-emacs-lisp-toplevels' (Emacs Lisp Toplevel / Level 4 Comment / Linkd Star) • `anything-c-source-org-headline' (Org HeadLine) • `anything-c-source-yaoddmuse-emacswiki-edit-or-view' (Yaoddmuse Edit or View (EmacsWiki)) • `anything-c-source-yaoddmuse-emacswiki-post-library' (Yaoddmuse Post library (EmacsWiki)) • `anything-c-source-eev-anchor' (Anchors) • `anything-c-source-picklist' (Picklist) • `anything-c-source-bbdb' (BBDB) • `anything-c-source-evaluation-result' (Evaluation Result) • `anything-c-source-calculation-result' (Calculation Result) -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 18
  • 19. anything-config.el • `anything-c-source-google-suggest' (Google Suggest) • `anything-c-source-surfraw' (Surfraw) • `anything-c-source-emms-streams' (Emms Streams) • `anything-c-source-emms-dired' (Music Directory) • `anything-c-source-jabber-contacts' (Jabber Contacts) • `anything-c-source-call-source' (Call anything source) • `anything-c-source-occur' (Occur) • `anything-c-source-create' (Create) • `anything-c-source-minibuffer-history' (Minibuffer History) • `anything-c-source-elscreen' (Elscreen) • `anything-c-source-xrandr-change-resolution' (Change Resolution) • `anything-c-source-xfonts' (X Fonts) • `anything-c-source-gentoo' (Portage sources) • `anything-c-source-use-flags' (Use Flags) • `anything-c-source-emacs-process' (Emacs Process) -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 19
  • 20. anything-function • anything()を利用して独自の関数を作成 • anything-c-source-*をリストするだけでも OK (defun my-anything-find-file () "My `anything'." (interactive) (anything (list anything-c-source-buffers anything-c-source-files-in-current-dir anything-c-source-file-name-history) initial-pattern "Find File: " nil)) -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 20
  • 21. anything-function • anything()を利用して独自の関数を作成 • anything-c-source-*をリストするだけでも OK (defun my-anything-find-file () "My `anything'." (interactive) (anything (list anything-c-source-buffers anything-c-source-files-in-current-dir anything-c-source-file-name-history) initial-pattern "Find File: " nil)) -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 21
  • 22. anything-function • anything()を利用して独自の関数を作成 • anything-c-source-*をリストするだけでも OK (defun my-anything-find-file () "My `anything'." (interactive) (anything (list anything-c-source-buffers anything-c-source-files-in-current-dir anything-c-source-file-name-history) initial-pattern "Find File: " nil)) -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 22
  • 23. anything()の引数 • ANY-SOURCES – anything-c-source-*リスト • ANY-INPUT – anything()に渡す初期入力 • ANY-PROMPT – mini-bufferに出るプロンプト文字列 • ANY-RESUME – anything()実行する際に初期かするか • ANY-PRESELECT – anything()実行時に選択する文字列 • ANY-BUFFER – anything()実行時に使用するバッファ -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 23
  • 24. anything()の引数 • ANY-SOURCES – anything-c-source-*リスト • ANY-INPUT – anything()に渡す初期入力 • ANY-PROMPT – mini-bufferに出るプロンプト文字列 • ANY-RESUME – anything()実行する際に初期かするか • ANY-PRESELECT – anything()実行時に選択する文字列 • ANY-BUFFER – anything()実行時に使用するバッファ -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 24
  • 25. 簡単anything-c-source -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 25
  • 26. anything-c-source-*の設定 (自分が使ったことあるものだけ) • Init – 初期処理 • name – anytnig-c-sourceの名前(呼び出されたときに名前がつ く) • candidates – 候補リスト • (candidate-in-buffer) – candidatesをbufferで作ったとき設定する • action – 選択した候補から渡される値をもとに実行する関数 -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 26
  • 27. anything-c-source-*の設定 (自分が使ったことあるものだけ) • display-to-real – candidatesから選択した候補を調整してactionに渡す replace関数 • type – 候補リストのタイプ。設定するとデフォルトactionが 設定される まだ多くあるけれども、使ったことないので省略 (いろいろ教えてください!) -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 27
  • 28. /tmpディレクトリのファイルを 開くanything-c-source • nameとcandidatesとtypeだけ で作成できる -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 28
  • 29. STEP1 • anything-c-sourceの変数を作 成 – 変数名はanything-c-source- tmp-dir (defvar anything-c-source-tmp-dir '()) -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 29
  • 30. STEP2 • nameを決定 – “Tmp dir” (defvar anything-c-source-tmp-dir '((name . "Tmp dir") ) -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 30
  • 31. STEP3 • typeを決定 – ファイルなのでfile (defvar anything-c-source-tmp-dir '((name . "Tmp dir") (type . file))) -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 31
  • 32. STEP4 • candidatesを作成 – /tmp内のファイルをリストで 返す関数をセット (defvar anything-c-source-tmp-dir '((name . "Tmp dir") (candidates . (lambda () (directory-files "/tmp"))) (type . file))) -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 32
  • 33. anything-c-source-tmp-dir 完成! -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 33
  • 34. STEP5 • anything-c-source-tmp-dirを my-anything-find-fileに追加 (defun my-anything-find-file () "My `anything'." (interactive) (anything (list anything-c-source-buffers anything-c-source-files-in-current-dir anything-c-source-file-name-history anything-c-source-tmp-dir) initial-pattern "Find File: " nil)) -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 34
  • 35. 簡単! -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 35
  • 36. まとめ • anything-c-source-*を作成す るのは簡単! • より高度なことをしたいときは 、同じようなことをしている anything-c-source-*をみてみ ればOK -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 36
  • 37. 伝言 -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 37
  • 38. skype.elがEmacs22系でも 動くようになりました。 NTEmacsなどでも動きます。 id:kiwanami -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 38
  • 39. 近々codecheck.inに コミットします id:kiwanami -uuu:---F1 tokyo-emacs #x02 2009.9.6 All(1.0) (Emacs-Lisp ppt)---- 39
  • 40. id:IMAKADO君、 デバッグよろしく id:kiwanami -uuu:---F1 tokyo-emacs #x2009.9.6 02 All(1.0) (Emacs-Lisp ppt)---- 40