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

Kenichirou Oyama
Kenichirou OyamaSoftware Developer at Fusic Co., Ltd.
はじめての
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
1 of 40

Recommended

2016年のPerl (Long version) by
2016年のPerl (Long version)2016年のPerl (Long version)
2016年のPerl (Long version)charsbar
5.2K views67 slides
Publishing a Perl6 Module by
Publishing a Perl6 ModulePublishing a Perl6 Module
Publishing a Perl6 Moduleast_j
1.5K views47 slides
Py conkr 20150829_docker-python by
Py conkr 20150829_docker-pythonPy conkr 20150829_docker-python
Py conkr 20150829_docker-pythonEric Ahn
3K views41 slides
Hidden Gems of Ruby 1.9 by
Hidden Gems of Ruby 1.9Hidden Gems of Ruby 1.9
Hidden Gems of Ruby 1.9Aaron Patterson
2.5K views187 slides
Aplicações 10x a 100x mais rápida com o postgre sql by
Aplicações 10x a 100x mais rápida com o postgre sqlAplicações 10x a 100x mais rápida com o postgre sql
Aplicações 10x a 100x mais rápida com o postgre sqlFabio Telles Rodriguez
628 views44 slides
Caching and tuning fun for high scalability @ FrOSCon 2011 by
Caching and tuning fun for high scalability @ FrOSCon 2011Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011Wim Godden
1.8K views127 slides

More Related Content

What's hot

Perl web app 테스트전략 by
Perl web app 테스트전략Perl web app 테스트전략
Perl web app 테스트전략Jeen Lee
2.3K views118 slides
How to deploy node to production by
How to deploy node to productionHow to deploy node to production
How to deploy node to productionSean Hess
13.6K views51 slides
NTUSTxTDOH 資訊安全基礎工作坊 基礎逆向教育訓練 by
NTUSTxTDOH 資訊安全基礎工作坊 基礎逆向教育訓練NTUSTxTDOH 資訊安全基礎工作坊 基礎逆向教育訓練
NTUSTxTDOH 資訊安全基礎工作坊 基礎逆向教育訓練Sheng-Hao Ma
4.5K views124 slides
Is your code ready for PHP 7 ? by
Is your code ready for PHP 7 ?Is your code ready for PHP 7 ?
Is your code ready for PHP 7 ?Wim Godden
5K views38 slides
The why and how of moving to php 5.4 by
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.4Wim Godden
2.6K views42 slides
Laravel Day / Deploy by
Laravel Day / DeployLaravel Day / Deploy
Laravel Day / DeploySimone Gentili
379 views53 slides

What's hot(20)

Perl web app 테스트전략 by Jeen Lee
Perl web app 테스트전략Perl web app 테스트전략
Perl web app 테스트전략
Jeen Lee2.3K views
How to deploy node to production by Sean Hess
How to deploy node to productionHow to deploy node to production
How to deploy node to production
Sean Hess13.6K views
NTUSTxTDOH 資訊安全基礎工作坊 基礎逆向教育訓練 by Sheng-Hao Ma
NTUSTxTDOH 資訊安全基礎工作坊 基礎逆向教育訓練NTUSTxTDOH 資訊安全基礎工作坊 基礎逆向教育訓練
NTUSTxTDOH 資訊安全基礎工作坊 基礎逆向教育訓練
Sheng-Hao Ma4.5K views
Is your code ready for PHP 7 ? by Wim Godden
Is your code ready for PHP 7 ?Is your code ready for PHP 7 ?
Is your code ready for PHP 7 ?
Wim Godden5K views
The why and how of moving to php 5.4 by Wim Godden
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
Wim Godden2.6K views
NTUSTxTDOH - Pwn基礎 2015/12/27 by Sheng-Hao Ma
NTUSTxTDOH - Pwn基礎 2015/12/27NTUSTxTDOH - Pwn基礎 2015/12/27
NTUSTxTDOH - Pwn基礎 2015/12/27
Sheng-Hao Ma5.3K views
Perlmania_Study - CPAN by Jeen Lee
Perlmania_Study - CPANPerlmania_Study - CPAN
Perlmania_Study - CPAN
Jeen Lee807 views
Kernel Recipes 2016 - Why you need a test strategy for your kernel development by Anne Nicolas
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
Anne Nicolas588 views
Intro to pl/PHP Oscon2007 by Robert Treat
Intro to pl/PHP Oscon2007Intro to pl/PHP Oscon2007
Intro to pl/PHP Oscon2007
Robert Treat3.5K views
台科逆向簡報 by 耀德 蔡
台科逆向簡報台科逆向簡報
台科逆向簡報
耀德 蔡5.4K views
Os Treat by oscon2007
Os TreatOs Treat
Os Treat
oscon2007751 views
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20) by Pixie Labs
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)
Pixie Labs82 views
Anatomy of a PHP Request ( UTOSC 2010 ) by Joseph Scott
Anatomy of a PHP Request ( UTOSC 2010 )Anatomy of a PHP Request ( UTOSC 2010 )
Anatomy of a PHP Request ( UTOSC 2010 )
Joseph Scott1.9K views
Call Return Exploration by Pat Hawks
Call Return ExplorationCall Return Exploration
Call Return Exploration
Pat Hawks281 views
Get Soaked - An In Depth Look At PHP Streams by Davey Shafik
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 Shafik12.1K views

Viewers also liked

Emacs Lisp 紹介 by
Emacs Lisp 紹介Emacs Lisp 紹介
Emacs Lisp 紹介Kenichirou Oyama
1.8K views42 slides
anything-php-funcref-perl.el by
anything-php-funcref-perl.elanything-php-funcref-perl.el
anything-php-funcref-perl.elKenichirou Oyama
677 views33 slides
for JSDeferred Code Reading by
for JSDeferred Code Readingfor JSDeferred Code Reading
for JSDeferred Code ReadingKenichirou Oyama
642 views18 slides
CakePHP DB Schema/Model Info Plugin by
CakePHP DB Schema/Model Info PluginCakePHP DB Schema/Model Info Plugin
CakePHP DB Schema/Model Info PluginKenichirou Oyama
1.1K views18 slides
Jessie's 60th by
Jessie's 60thJessie's 60th
Jessie's 60thkmkan
367 views18 slides
Small Stuff by
Small StuffSmall Stuff
Small Stuffpulgara
295 views14 slides

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

Make Your Life Easier With Maatkit by
Make Your Life Easier With MaatkitMake Your Life Easier With Maatkit
Make Your Life Easier With MaatkitMySQLConference
3.3K views39 slides
第1回PHP拡張勉強会 by
第1回PHP拡張勉強会第1回PHP拡張勉強会
第1回PHP拡張勉強会Ippei Ogiwara
2.2K views78 slides
What Can Compilers Do for Us? by
What Can Compilers Do for Us?What Can Compilers Do for Us?
What Can Compilers Do for Us?National Cheng Kung University
16.8K views56 slides
Beginner's Guide to the nmap Scripting Engine - Redspin Engineer, David Shaw by
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 ShawRedspin, Inc.
1.1K views34 slides
History of jQuery by
History of jQueryHistory of jQuery
History of jQueryjeresig
9.9K views27 slides
Web 2.0 Performance and Reliability: How to Run Large Web Apps by
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 Appsadunne
2.4K views70 slides

Similar to はじめてのanything-c-source-*(20)

Make Your Life Easier With Maatkit by MySQLConference
Make Your Life Easier With MaatkitMake Your Life Easier With Maatkit
Make Your Life Easier With Maatkit
MySQLConference3.3K views
第1回PHP拡張勉強会 by Ippei Ogiwara
第1回PHP拡張勉強会第1回PHP拡張勉強会
第1回PHP拡張勉強会
Ippei Ogiwara2.2K views
Beginner's Guide to the nmap Scripting Engine - Redspin Engineer, David Shaw by Redspin, Inc.
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
Redspin, Inc.1.1K views
History of jQuery by jeresig
History of jQueryHistory of jQuery
History of jQuery
jeresig9.9K views
Web 2.0 Performance and Reliability: How to Run Large Web Apps by adunne
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
adunne2.4K views
Os Wilhelm by oscon2007
Os WilhelmOs Wilhelm
Os Wilhelm
oscon20071.1K views
Being functional in PHP (PHPDay Italy 2016) by David de Boer
Being functional in PHP (PHPDay Italy 2016)Being functional in PHP (PHPDay Italy 2016)
Being functional in PHP (PHPDay Italy 2016)
David de Boer1.4K views
Parallel Computing in R by mickey24
Parallel Computing in RParallel Computing in R
Parallel Computing in R
mickey241.5K views
JDD 2017: Performance tests with Gatling (Andrzej Ludwikowski) by PROIDEA
JDD 2017: Performance tests with Gatling (Andrzej Ludwikowski)JDD 2017: Performance tests with Gatling (Andrzej Ludwikowski)
JDD 2017: Performance tests with Gatling (Andrzej Ludwikowski)
PROIDEA30 views
Transfer to kubernetes data platform from EMR by 창언 정
Transfer to kubernetes data platform from EMRTransfer to kubernetes data platform from EMR
Transfer to kubernetes data platform from EMR
창언 정143 views
Cより速いRubyプログラム by kwatch
Cより速いRubyプログラムCより速いRubyプログラム
Cより速いRubyプログラム
kwatch5.3K views
Clojure: Practical functional approach on JVM by sunng87
Clojure: Practical functional approach on JVMClojure: Practical functional approach on JVM
Clojure: Practical functional approach on JVM
sunng871.7K views
Rubish- A Quixotic Shell by guest3464d2
Rubish- A Quixotic ShellRubish- A Quixotic Shell
Rubish- A Quixotic Shell
guest3464d2323 views
Linguagens Dinamicas - Tech Days 2008 by Alcides Fonseca
Linguagens Dinamicas - Tech Days 2008Linguagens Dinamicas - Tech Days 2008
Linguagens Dinamicas - Tech Days 2008
Alcides Fonseca479 views
我在豆瓣使用Emacs by 董 伟明
我在豆瓣使用Emacs我在豆瓣使用Emacs
我在豆瓣使用Emacs
董 伟明1.2K views

Recently uploaded

Defcon Network.pdf by
Defcon Network.pdfDefcon Network.pdf
Defcon Network.pdfJesse Mauck
17 views4 slides
Cattery Warrington by
Cattery WarringtonCattery Warrington
Cattery WarringtonOutlandGroup Ltd
10 views6 slides
Businesses to Start in 2024.pdf by
Businesses to Start in 2024.pdfBusinesses to Start in 2024.pdf
Businesses to Start in 2024.pdfDante St James
19 views43 slides
Accounts Class 12 project cash flow statement and ratio analysis by
Accounts Class 12 project cash flow statement and ratio analysisAccounts Class 12 project cash flow statement and ratio analysis
Accounts Class 12 project cash flow statement and ratio analysisJinendraPamecha
22 views42 slides
Building Careers at Specialty TRE 2023 by
Building Careers at Specialty TRE 2023Building Careers at Specialty TRE 2023
Building Careers at Specialty TRE 2023Jennifer Sanborn
45 views22 slides
port23_2023121_resize2.pdf by
port23_2023121_resize2.pdfport23_2023121_resize2.pdf
port23_2023121_resize2.pdfSivaphan Wuttingam
14 views64 slides

Recently uploaded(20)

Businesses to Start in 2024.pdf by Dante St James
Businesses to Start in 2024.pdfBusinesses to Start in 2024.pdf
Businesses to Start in 2024.pdf
Dante St James19 views
Accounts Class 12 project cash flow statement and ratio analysis by JinendraPamecha
Accounts Class 12 project cash flow statement and ratio analysisAccounts Class 12 project cash flow statement and ratio analysis
Accounts Class 12 project cash flow statement and ratio analysis
JinendraPamecha22 views
Monthly Social Media Update November 2023 copy.pptx by Andy Lambert
Monthly Social Media Update November 2023 copy.pptxMonthly Social Media Update November 2023 copy.pptx
Monthly Social Media Update November 2023 copy.pptx
Andy Lambert16 views
Bloomerang_Forecasting Your Fundraising Revenue 2024.pptx.pdf by Bloomerang
Bloomerang_Forecasting Your Fundraising Revenue 2024.pptx.pdfBloomerang_Forecasting Your Fundraising Revenue 2024.pptx.pdf
Bloomerang_Forecasting Your Fundraising Revenue 2024.pptx.pdf
Bloomerang112 views
Top 10 IT Tasks Small Businesses Can Entrust to Offshore Professionals by altafhsayyednimetler
Top 10 IT Tasks Small Businesses Can Entrust to Offshore ProfessionalsTop 10 IT Tasks Small Businesses Can Entrust to Offshore Professionals
Top 10 IT Tasks Small Businesses Can Entrust to Offshore Professionals
PMU Launch - Guaranteed Slides by pmulaunch
PMU Launch - Guaranteed SlidesPMU Launch - Guaranteed Slides
PMU Launch - Guaranteed Slides
pmulaunch16 views
Imports Next Level.pdf by Bloomerang
Imports Next Level.pdfImports Next Level.pdf
Imports Next Level.pdf
Bloomerang80 views
Nevigating Sucess.pdf by TEWMAGAZINE
Nevigating Sucess.pdfNevigating Sucess.pdf
Nevigating Sucess.pdf
TEWMAGAZINE23 views
SUGAR cosmetics ppt by shafrinn5
SUGAR cosmetics pptSUGAR cosmetics ppt
SUGAR cosmetics ppt
shafrinn563 views
Bloomerang Thank Yous Dec 2023.pdf by Bloomerang
Bloomerang Thank Yous Dec 2023.pdfBloomerang Thank Yous Dec 2023.pdf
Bloomerang Thank Yous Dec 2023.pdf
Bloomerang93 views
Group and Teams: Increasing Cooperation and Reducing Conflict by Seta Wicaksana
Group and Teams: Increasing Cooperation and Reducing Conflict Group and Teams: Increasing Cooperation and Reducing Conflict
Group and Teams: Increasing Cooperation and Reducing Conflict
Seta Wicaksana20 views

はじめての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