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
(defvar my-isearch-window-start '(nil 0) | |
"Record the `selected-window' and the Y-axis coordinate of point each time that | |
`isearch-update' calls `my-isearch-update-recenter' (via an advice). The value | |
of this variable will be a cons cell with the CAR being the `selected-window' and | |
the CDR being the Y-axis coordinate of point.") | |
(defun my-isearch-update-recenter () | |
(let* ((win (selected-window)) | |
(pt (point)) | |
(y (cdr (nth 2 (posn-at-point pt win)))) |
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
;;; NOTE: The process output from the gls command tends to be truncated when both | |
;;; (1) _not_ using a process filter and (2) _not_ using a pipe. When _not_ using a | |
;;; process filter, the workaround is to use a pipe by either setting the variable | |
;;; `process-connection-type' to `nil`; or, using the `make-process' keyword/argument | |
;;; pair of :connection-type 'pipe. Said workaround, however, has the disadvantage | |
;;; of having all the output arriving in one fell swoop and window-start of the | |
;;; process output buffer is point-max of the output -- meaning that the output is | |
;;; not visible unless using a command such as recenter on the output window buffer. | |
(defun gls-example (&optional dir) | |
"Demonstration creating a running process with a let-bound process-environment." |
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
(require 'cl) | |
;; (global-set-key [f1] 'is-it-defined) | |
(defun is-it-defined () | |
(interactive) | |
(save-excursion | |
(goto-char (point-min)) | |
(let ((output-buffer (get-buffer-create "*IS-IT-DEFINED*")) | |
(cleanup (lambda () | |
(recenter 1) |
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 my-basic-org-todo () | |
"Doc-string ...." | |
(interactive) | |
(let* ((choice (read-char-exclusive "[t] TODO | [n] NEXT | [w] WAITING")) | |
(chosen-string (cond | |
((eq choice ?t) | |
"TODO") | |
((eq choice ?n) | |
"NEXT") | |
((eq choice ?w) |
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
OSX -- ASPELL -- DICTIONARY -- Spanish | |
* unpack aspell6-es-1.11-2.tar.bz2 | |
* cd over to the root directory of the unpacked source | |
./configure --vars PATH=$PATH:/Users/HOME/.0.data/.0.emacs/.0.macports/bin | |
make |
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
# /Users/HOME/.0.data/.0.emacs/.0.macports/bin/aspell --lang=en dump config | |
# conf (string) | |
# main configuration file | |
# default: aspell.conf | |
# conf-dir (string) | |
# location of main configuration file | |
# default: <prefix:etc> = /Users/HOME/.0.data/.0.emacs/.0.macports/etc |
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
Feature request 18283 was previously added to Emacs 25 and the master branch in | |
conjunction with feature request 21415. In a nutshell, it is now possible to act | |
upon Emacs (to some degree) using an applescript. | |
CAVEAT: Feature request 18283 was implemented primarily to facilitate debugging, | |
and not to control Emacs per se using applescripts. | |
(defun get-bounds () | |
"Return the bounds of the selected frame." | |
(let* ((script (concat "tell front window of application \"Emacs\"\n" |
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
make -C src emacs | |
make: Entering directory `/c/docume~1/admini~1/desktop/emacs/src' | |
GEN lisp.mk | |
make: Leaving directory `/c/docume~1/admini~1/desktop/emacs/src' | |
make: Entering directory `/c/docume~1/admini~1/desktop/emacs/src' | |
make -C ../lib/ all | |
make[1]: Entering directory `/c/docume~1/admini~1/desktop/emacs/lib' | |
GEN alloca.h | |
GEN byteswap.h | |
GEN errno.h |
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
/* *************************************************************************** */ | |
/* BEGIN Feature Request # 16475: Automatically add/remove scroll bars. */ | |
finish_scroll_bars: | |
; | |
// ptrdiff_t bob_disregard_narrow = BUF_BEG (buffer); | |
ptrdiff_t eob_disregard_narrow = BUF_Z (buffer); | |
ptrdiff_t bob_respect_narrow = BUF_BEGV (buffer); |
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
(require 'dired) | |
(defun qlmanage-return-focus-to-emacs () | |
"Doc-string." | |
(let* ((filename (dired-get-file-for-visit)) | |
(emacs-executable (concat invocation-directory "Emacs")) | |
(emacs-script (concat "tell application \"" emacs-executable "\" to activate"))) | |
(set-process-sentinel | |
(start-process "qlmanage" nil "/usr/bin/qlmanage" "-p" filename) | |
`(lambda (p e) (when (= 0 (process-exit-status p)) |
NewerOlder