This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; company-childframe.el --- Use a real ppup to show company candidates | |
;;; Commentary: | |
;; | |
;;; Code: | |
(require 'company) | |
(defvar company-childframe-child-frame nil) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Skim" | |
set thedoc to the front document | |
set anno to the active note of thedoc | |
set newtext to text of anno | |
set startpoint to (offset of "org-id:{" in newtext) + 8 | |
set endpoint to (offset of "}:org-id" in newtext) - 1 | |
if (startpoint - 8 is not equal to endpoint + 1) and (endpoint + 1 is not 0) then | |
set orgid to characters startpoint thru endpoint of newtext as string | |
do shell script "/usr/local/bin/emacsclient -n -e \"(progn (org-id-goto \\\"" & orgid & "\\\") (x-focus-frame (selected-frame)) (evil-exit-visual-state))\"" | |
end if |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setq org-capture-templates (quote (("SA" "Skim Annotation" entry | |
(file+function org-ref-bibliography-notes my-org-move-point-to-capture-skim-annotation) | |
"* %^{Logging for...} :skim_annotation:read:literature: | |
:PROPERTIES: | |
:Created: %U | |
:CITE: cite:%(my-as-get-skim-bibtex-key) | |
:SKIM_NOTE: %(my-org-mac-skim-get-page) | |
:SKIM_PAGE: %(my-as-get-skim-page) | |
:END: | |
%i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; author: @fuxialexander on github | |
;; 2017-12-02 | |
(defvar company-candidates) | |
(defvar company-point) | |
(defvar company-common) | |
(declare-function company-complete "ext:company") | |
(declare-function company-mode "ext:company") | |
(declare-function company-complete-common "ext:company") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun org-refile-get-targets (&optional default-buffer) | |
"Produce a table with refile targets." | |
(let ((case-fold-search nil) | |
;; otherwise org confuses "TODO" as a kw and "Todo" as a word | |
(entries (or org-refile-targets '((nil . (:level . 1))))) | |
targets tgs files desc descre) | |
(message "Getting targets...") | |
(with-current-buffer (or default-buffer (current-buffer)) | |
(dolist (entry entries) | |
(setq files (car entry) desc (cdr entry)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"global": { | |
"check_for_updates_on_startup": true, | |
"show_in_menu_bar": false, | |
"show_profile_name_in_menu_bar": false | |
}, | |
"profiles": [ | |
{ | |
"complex_modifications": { | |
"rules": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun applescript-quote-string (argument) | |
"Quote a string for passing as a string to AppleScript." | |
(if (or (not argument) (string-equal argument "")) | |
"\"\"" | |
;; Quote using double quotes, but escape any existing quotes or | |
;; backslashes in the argument with backslashes. | |
(let ((result "") | |
(start 0) | |
end) | |
(save-match-data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set smoothscroll | |
let scrollduration=300 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`emacs --daemon` to run in the background. | |
`emacsclient.emacs24 <filename/dirname>` to open in terminal | |
NOTE: "M-m and SPC can be used interchangeably". | |
* Undo - `C-/` | |
* Redo - `C-?` | |
* Change case: 1. Camel Case : `M-c` | |
2. Upper Case : `M-u` | |
3. Lower Case : `M-l` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script for installing tmux on systems where you don't have root access. | |
# tmux will be installed in $HOME/.local/bin. | |
# It's assumed that wget and a C/C++ compiler are installed. | |
# exit on error | |
set -e | |
TMUX_VERSION=2.0 |