资源说明:Emacs Speaks Statistics Drag and Drop Support
#+TITLE: Extend Drag and Drop #+AUTHOR: Matthew L. Fidler * Library Information /extend-dnd.el/ --- R drag and Drop - Filename :: [[file:extend-dnd.el][extend-dnd.el]] - Description :: R Drag and Drop - Author :: Matthew L. Fidler - Maintainer :: Matthew L. Fidler - Created :: Thu Feb 9 09:37:32 2012 (-0600) - Version :: 0.5 - Last-Updated :: Fri Feb 10 20:59:30 2012 (-0600) - By :: Matthew L. Fidler - Update # :: 52 - URL :: https://github.com/mlf176f2/extend-dnd - Keywords :: EXTEND, Drag and Drop - Compatibility :: Tested with Emacs 24. * Possible Dependencies `assoc', `backquote', `button', `bytecomp', `cconv', `cl', `dropdown-list', `easymenu', `help-fns', `help-mode', `macroexp', `view', `warnings', `yasnippet', `yasnippet-bundle'. * Introduction I would like to drag files onto a ESS buffer and write the appropriate code. Enter Extend drag and drop. * Installation To install, put the =extend-dnd.el= somewhere in your load path, and add the following lines to your startup file, usually =~/.emacs= #+BEGIN_SRC emacs-lisp (require 'extend-dnd) (extend-dnd-activate) #+END_SRC * Status and Future Currently it only supports a few modes and extensions, but it is extendable. * Working with Yasnippets If you want extend-dnd to expand yasnippets based on the file name, make sure that =yas/wrap-around-region= is set to be ='t= or ='cua=. After you define a snippet in the major mode you are working with, and put the file name as `yas/selected-text'. For example with R csv files you could define #+BEGIN_SRC: snippet # -*- mode: snippet -*- # name: Load CSV # key: csv # -- ${1:$(concat "dat." (replace-regexp-in-string "^[.]" "" (replace-regexp-in-string "[.]$" "" (replace-regexp-in-string "[^A-Za-z.0-9]+" "." (file-name-sans-extension (file-name-nondirectory yas/text)) t t))))} <- read.csv("${1:`yas/selected-text`}"); #+END_SRC Then once this has been defined press =C-cC-d= to add the extension to the drag and drop list. The extension will be expanded based on the =key= value. Therefore, if you want more than one possible action for a particular file, give it the same key. For example, if you want the possibility to write to the csv you dragged in, you may wish to have the snippet: #+BEGIN_SRC: snippet # -*- mode: snippet -*- # name: Write csv # key: csv # -- write.csv(d,"${1:`yas/selected-text`}"); #+END_SRC * Wish List/TODO ** TODO Support dired mode ** TODO Support inferior processes. ** TODO Allow generic Yasnippet expansion by key name (like dnd_csv will automatically do drag and drop for csv files) * Functions ** Interactive Functions ** Internal Functions * Variables ** Customizable Variables ** Internal Variables * History - 28-Mar-2013 :: When dragging in an org snippet with the latest emacs and org-mode, the buffer-file-name returns nil. Added extend-dnd-buffer-file-name to get the true buffer file name for calculation... (Matthew L. Fidler) - 18-Dec-2012 :: Fixed yasnippet 0.8 problems (Matthew L. Fidler) - 13-Dec-2012 :: Use org-readme to publish (Matthew L. Fidler)
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。