Skip to content

Instantly share code, notes, and snippets.

ac-clang
anything-c-moccur
csv-mode
gtags
html-helper-mode
menu-tree
moccur-edit
msbuild-parser
msvc
navi
ace-jump-mode
anaphora
dash
debbugs
diminish
dired-details
el-get
elisp-slime-nav
i3-emacs
ido-ubiquitous
@pogin503
pogin503 / Get-ScreenShot.ps1
Created March 13, 2017 15:44 — forked from guitarrapc/Get-ScreenShot.ps1
Screenshot Automation with PowerShell
function Get-ScreenShot
{
[CmdletBinding()]
param(
[parameter(Position = 0, Mandatory = 0, ValueFromPipelinebyPropertyName = 1)]
[ValidateNotNullOrEmpty()]
[string]$OutPath = "$env:USERPROFILE\Documents\ScreenShot",
#screenshot_[yyyyMMdd_HHmmss_ffff].png
[parameter(Position = 1, Mandatory = 0, ValueFromPipelinebyPropertyName = 1)]
anzu
auctex
auto-compile
avy
benchmark-init
buffer-move
calc
cc-mode
clean-aindent-mode
cmake-ide
@pogin503
pogin503 / copy.el
Last active January 28, 2017 13:36
(require 'f)
(defun current-line-number ()
"Print the current line number (in the buffer) of point."
(interactive)
(save-restriction
(widen)
(save-excursion
(beginning-of-line)
(1+ (count-lines 1 (point))))))
(defmacro after1 (mode &rest body)
"`eval-after-load' MODE evaluate BODY."
`(eval-after-load ,mode
'(progn ,@body)))
(defmacro after2 (mode &rest body)
"`eval-after-load' MODE evaluate BODY."
(declare (indent defun))
`(eval-after-load ,mode
'(progn ,@body)))
(require 'nadvice)
(defun pps-after (x)
(interactive)
(let ((lst `(:depth ,(nth 0 x)
:char-add-start-innermost ,(nth 1 x)
:char-add-start-last ,(nth 2 x)
:instring ,(nth 3 x)
:inside-comment ,(nth 4 x)
:quote-char ,(nth 5 x)
:min-paren-depth ,(nth 6 x)
(require 'f)
(defun current-line-number ()
(1+ (count-lines 1 (point))))
(defun my-current-line-info ()
(interactive)
(kill-new (format "%s L%d"
(f-filename (f-this-file))
(current-line-number))))
# 確認用
emacs --batch --eval "(progn (message (mapconcat 'identity load-path \"\\n\")) (normal-top-level-add-subdirs-to-load-path) (message (mapconcat 'identity load-path \"\\n\")))"
# 実行
emacs --batch -l util.el --eval "(add-to-load-path \"elpa\")"
(let ((syms '()))
(mapatoms
(lambda (s)
(when (fboundp s)
(push s syms))))
syms)
;; => (desktop-save-in-desktop-dir gnus-score-mode cl--pass-args-to-cl-declare tabbar-mwheel-switch-tab palette-toggle-verbose eieio-default-eval-maybe haskell-doc-show-reserved ffap-guesser org-babel-pick-name org-move-item-down gnus-put-display-table paredit-enclosing-list-start ...)
;; @see http://lingr.com/room/emacs/archives/2016/01/30#message-22998637
(cl-loop for x being the symbols