Pymacs ˆ‌體驗

  • View
    1.289

  • Download
    3

Embed Size (px)

DESCRIPTION

PyCon Taiwan 2013

Text of Pymacs ˆ‌體驗

  • Pymacs PyConTW 2013Superbil 0.0.113530
  • About MeMobile App Emacs 1 Python 1 PyHUG about.me/superbilfreenode #python.tw #emacs.twon RPi13530
  • Emacs ?13530
  • 13530
  • 13530
  • Emacs ?!13530
  • You can hack it !13530
  • What is a hacker ? hacker hacker hackerLogan LaPlante: Hackschooling Makes Me Happy13530
  • Emacs Ctrl + h t // emacs tutorial Ctrl + {b,n,p,f} // h j k l Ctrl + x b // buffer Ctrl + x Ctrl + e // ( ) elisp Ctrl + h m // mode 13530
  • Emacs 13530
  • Ctrl Caps Lock Ctrl !!!13530
  • Emacs vsVim13530
  • Emacs vsVimvs Sublime Text13530
  • Emacs vsVimvs Sublime Textvs More...13530
  • Emacs vsVim 13530
  • Emacs Vim ?by Vim Emacs13530
  • Install Emacson Server ?13530
  • Pymacs ?13530
  • lispemacs lisp13530
  • lisp hack Emacs lisp Pymacs13530
  • How to install Pymacs Python side make install Emacs side M-x package-install RET pymacs RETEmacs 24.x +13530
  • Pymacs Debug *Pymacs* Buffer13530
  • Pymacs server process loop emacs 13530
  • Pymacs pymacs-exec (pymacs-exec "print Hello PyConTw") Python python statement nil13530
  • Hello WorldPython sidefrom Pymacs import lispinteractions = {}def hello_world():"Hello world from Python."lisp.insert("Hello from Python!")interactions[hello_world] = 13530
  • Hello WorldEmacs side helloEmacs hm- (pymacs-load "helloEmacs" "hm-")13530
  • lisp function (hm-hello-world)hm-hello-world is an interactive Lisp function.(hm-hello-world &rest ARGUMENTS)It interfaces to a Python function.Hello world from Python.13530
  • M-x hm-hello-world(hm-hello-world)Hello from Python!13530
  • Sample - winklerfrom Pymacs import lispinteractions = {}def break_on_whitespace():start, end = lisp.point(), lisp.mark(True)words = lisp.buffer_substring(start,end).split()lisp.delete_region(start, end)lisp.insert(n.join(words))interactions[break_on_whitespace] = 13530
  • Sample - winkler resultHello PyCon TaiwanM-x winkler-break-on-whitespaceHelloPyConTaiwanMarkedfrom Pymacs import lispinteractions = {}def break_on_whitespace():start, end = lisp.point(), lisp.mark(True)words = lisp.buffer_substring(start, end).split()lisp.delete_region(start, end)lisp.insert(n.join(words))interactions[break_on_whitespace] = 13530
  • Live Demo13530
  • ? Pymacs 0.25 Emacswiki.org stackoverow.com Emacs on Google Plus freenode#emacs.tw planet.emacsen.org13530
  • 13530
  • Happy HackingKeyboard13530
  • Thank you13530