Skip to content

Instantly share code, notes, and snippets.

@xenodium
xenodium / eval-uncommented-region.el
Last active September 27, 2023 02:38
Eval commented out code
(defun ar/eval-uncommented-region (start end)
(interactive "r")
(let ((text (buffer-substring-no-properties start end)))
(with-temp-buffer
(insert text)
(emacs-lisp-mode)
(uncomment-region (point-min) (point-max))
(eval-buffer)
(message "Evaluated"))))
@haji-ali
haji-ali / echo-line.el
Last active August 30, 2022 08:48
Echo messages in minibuffer
;;; echo-line.el --- Echo messages in minibuffer -*- lexical-binding:t -*-
;;
;; Author: Al Haji-Ali <abdo.haji.ali@gmail.com>
;; Version: 0.1.0
;; Package-Requires: ((emacs "26.1"))
;; Keywords: message, echo, gui
;;
;; This file is not part of GNU Emacs.
;;
;; This program is free software; you can redistribute it and/or modify
@ralt
ralt / eshell.org
Last active January 19, 2022 19:18
my eshell config

Eshell

eshell is the shell I’ve tried using over time, and in the end just never stick with it. Let’s try one more time with a couple of tricks. The first tricks are mostly documentation:

  • M-& in a tramp-aware session means you run commands in a new buffer, without a TTY. Great for things like tailf.
  • for ncurses-like applications, “visual commands” is the missing context. Applications like top are in the default list by default,
@Bad-ptr
Bad-ptr / helm-persp-bridge-v2.el
Last active July 26, 2024 13:33
persp-mode stuff
(with-eval-after-load "persp-mode"
(with-eval-after-load "helm-mode"
(defvar helm-mini-tail-sources (cdr helm-mini-default-sources))
(defvar helm-persp-completing-read-handlers
'((switch-to-buffer . helm-persp-buffer-list-bridge)
(kill-buffer . helm-persp-buffer-list-bridge)
(persp-kill-buffer . helm-persp-buffer-list-bridge)
(persp-temporarily-display-buffer . helm-persp-buffer-list-bridge)
(persp-add-buffer . helm-persp-buffer-list-bridge)