(completion-category-defaults nil)
(completion-category-overrides '((file (styles partial-completion)))))
-;;; image dired
-
-
-(setq image-dired-debug t
- image-dired-marking-shows-next nil
- ;; just testing it out in case
- image-dired-track-movement nil
- image-dired-thumb-margin 1
- ;; odd useless borders
- image-dired-thumb-relief 0
- image-auto-resize 'fit-window
- image-dired-thumb-size 400
- ;; image-dired-cmd-create-temp-image-options ("convert" "-size" "%wx%h" "%f[0]" "-resize" "%wx%h>" "-strip" "jpeg:%t" "-filter" "Lanczos" "-colorspace" "RGB" "-define" "jpeg:dct-method=float" "-quality" "95")
- ;;image-dired-cmd-create-thumbnail-options ("convert" "-size" "%wx%h" "%f[0]" "-resize" "%wx%h>" "-strip" "jpeg:%t" "-filter" "Lanczos" "-colorspace" "RGB" "-define" "jpeg:dct-method=float" "-quality" "95")
- image-dired-cmd-create-thumbnail-options '("convert" "%f" "-strip" "-resize" "%wx%h" "-filter" "Lanczos" "-define" "jpeg:dct-method=float" "-quality" "95" "%t")
- image-dired-cmd-create-thumbnail-options '("true")
- )
-
-
-(defun imgdired-rating ()
- "highlight"
- (interactive)
- (with-current-buffer image-dired-thumbnail-buffer
- (save-mark-and-excursion
- (goto-char (point-min))
- (let ((inhibit-read-only t))
- (while (not (eobp))
- (when-let* ((file-path (image-dired-original-file-name))
- (file (file-name-nondirectory file-path)))
- (image-dired-rating-highlight-at-point file))
- (forward-char 2))))))
-
-;; find new faces with (list-faces-display)
-(defun image-dired-rating-highlight-at-point (file)
- (with-silent-modifications
- (let* ((rating (gethash file khash)))
- (cond ((and rating (>= rating 4))
- (add-face-text-property (point) (1+ (point))
- 'shr-mark))
- ((and rating (= rating 3))
- (add-face-text-property (point) (1+ (point))
- 'reb-match-1))
- ((and rating (= rating 1))
- ;; brown
- (add-face-text-property (point) (1+ (point))
- 'reb-match-3))
- (t (remove-text-properties (point) (1+ (point))
- '(face reb-match-1)))))))
-
-;; successfull font markup test:
-;; (with-silent-modifications (add-face-text-property (point) (+ 10 (point)) 'image-dired-thumb-mark))
-;; ;; [45] bright yellow: shr-mark
-;; ;; [3] medium blue: reb-match-1
-;; ;; [12] light brown
-;;
-
-;; scratch pad for looking over the thumb width calculations:
-;; char-width: (frame-char-width) = 9
-;; width: (window-body-width (image-dired-thumbnail-window) t) = 2777
-
-
-;; The same-window helps prevent image-dired window from jumping all around, but it doesn't completely stop it.
-
-;; (setq display-buffer-alist '((".*" display-buffer-reuse-window)))
-;; (setq display-buffer-alist '((".*" display-buffer-in-previous-window)))
-;; (setq display-buffer-alist '((".*" display-buffer-same-window)))
-;; (setq display-buffer-alist nil)
-;; (setq image-dired-track-movement nil)
-;; (setq image-dired-track-movement t)
-;;
-;; I eventually solved it based on a patch in debbugs waiting for review.
-
-
;;; dired
-
;;; misc general settings
-;; I tried to look for a function that would set this that is
-;; not part of the emacs interactive customize stuff, but didn't see one
-;; in the faces documentation.
-
-
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
-;; iank: commented for now as this breaks artist mode
-;;(custom-set-faces
-
-;;'(header-line ((t (:background "default" :foreground "default" :overline nil :underline nil))))
-;; '(region ((t nil))))
-
;; notes on tramp debugging:
;; emacs -Q
;; (setq tramp-verbose 10)
(setq
+ initial-scratch-message nil
+
;; avoid this stupid prompt when doing sudo-edit
;; Save auth info to file ~/.authinfo? [y/n/N/e/?]
;; which doesn't actually use the default N by pressing enter,
-;; (custom-set-faces
-;; ;; setting header-line-format to " " as a hack for a top margin the oly thning I could find to do a top margin
-;; '(header-line ((t (:background "default" :foreground "default" :overline nil :underline nil))))
-;; ;; don't highlight the region
-;; '(region ((t nil))))
-(setq-default header-line-format " ")
-
-
-(setq initial-scratch-message nil)
-
;; vertical margin background.
;; google turned up: http://lists.gnu.org/archive/html/help-gnu-emacs/2014-03/msg00544.html
;;; misc function definitions
+(defun iank-top-margin ()
+ (interactive)
+ "for usability, sometimes I wanted a blank top margin. Note the custom-set-faces breaks artist mode."
+ (custom-set-faces
+ ;; setting header-line-format to " " as a hack for a top margin the oly thning I could find to do a top margin
+ '(header-line ((t (:background "default" :foreground "default" :overline nil :underline nil))))
+ ;; don't highlight the region
+ '(region ((t nil))))
+ (setq-default header-line-format " "))
+
+
(defun fill-buffer ()
(interactive)
;;; prog-mode-defaults
-(defface highlight-symbol-face
- '((((class color) (background dark))
- (:background "gray30"))
- (((class color) (background light))
- (:background "gray90")))
- "highlight-symbol-face copied from `highlight-symbol-mode' for use in maintained replacement mode: highlight-thing-mode.")
-
-
(defun prog-mode-defaults ()
"Default coding hook, useful with any programming language."
;; so that I can do completion before the dialog pops up
(let ((transient-mark-mode nil))
(yank-advised-indent-function (region-beginning) (region-end)))))
-
-;;; shell mode
+;;; outline
;; # eval: (outline-minor-mode)
+;;; shell mode
+
+
+
;; avoid stupid git crap like "warning, terminal not fully functional"
(setenv "PAGER" "cat")
;; don't store successive duplicates in comint command history
" tracking minor mode"))
(cond (erc-modified-channels-alist
;; if we're not in erc-mode, set this buffer to return to
- (if-let ((buf (erc-track-get-active-buffer arg))
+ (if-let* ((buf (erc-track-get-active-buffer arg))
((buffer-live-p buf)))
(funcall fun buf)
(erc-modified-channels-update)
(global-set-key (kbd "C-d") 'kill-ring-save)
-;; by default is does image-dired-delete-character (stops displaying its thumbnail), pretty useless.
-(add-hook 'image-dired-thumbnail-mode-hook
- (lambda ()
- (define-key image-dired-thumbnail-mode-map (kbd ",") 'image-dired-copy-filename-r1)
- (define-key image-dired-thumbnail-mode-map (kbd ".") 'image-dired-copy-filename-r2)
- (define-key image-dired-thumbnail-mode-map (kbd "/") 'image-dired-copy-filename-r3)
- (define-key image-dired-thumbnail-mode-map (kbd "k") 'image-dired-copy-filename-r4)
- (define-key image-dired-thumbnail-mode-map (kbd "l") 'image-dired-copy-filename-r5)
- (define-key image-dired-thumbnail-mode-map (kbd "u") 'image-dired-copy-filename-ban)
- (define-key image-dired-thumbnail-mode-map (kbd "y") 'image-dired-copy-filename-draw)
- (define-key image-dired-thumbnail-mode-map (kbd "h") 'image-dired-copy-filename-tame)
- (define-key image-dired-thumbnail-mode-map (kbd "o") 'image-dired-copy-filename-tbdremix)
- (define-key image-dired-thumbnail-mode-map (kbd "n") 'image-dired-copy-filename-remix)
- (define-key image-dired-thumbnail-mode-map (kbd "C-d") nil)))
-
(add-hook 'c-mode-common-hook
(lambda ()
(add-hook 'info-mode-hook 'my-info-init)
+;;;;; highlight-thing-mode
-;;;; I briefly put this in prog-mode-defaults when looking for a maintained replacement of highlight-symbol,
-;;;; but I found a different package that was more maintained.
-;; (highlight-thing-mode)
-;; (setq highlight-thing-limit-to-region-in-large-buffers-p t
-;; highlight-thing-narrow-region-lines 40
-;; highlight-thing-large-buffer-limit 5000)
-;; ;; highlight-symbol-face copied from `highlight-symbol-mode' for use
-;; ;; in maintained replacement mode: highlight-thing-mode.
-;; (face-spec-set 'highlight-thing
-;; '((((class color) (background dark))
-;; (:background "gray30"))
-;; (((class color) (background light))
-;; (:background "gray90")))
-;; 'face-defface-spec)
+;;I briefly put this in prog-mode-defaults when looking for a maintained replacement of highlight-symbol,
+;;but I found a different package that was more maintained.
+(highlight-thing-mode)
+(setq highlight-thing-limit-to-region-in-large-buffers-p t
+ highlight-thing-narrow-region-lines 40
+ highlight-thing-large-buffer-limit 5000)
+;; highlight-symbol-face copied from `highlight-symbol-mode' for use
+;; in maintained replacement mode: highlight-thing-mode.
+(face-spec-set 'highlight-thing
+ '((((class color) (background dark))
+ (:background "gray30"))
+ (((class color) (background light))
+ (:background "gray90")))
+ 'face-defface-spec)
+(defface highlight-symbol-face
+ '((((class color) (background dark))
+ (:background "gray30"))
+ (((class color) (background light))
+ (:background "gray90")))
+ "highlight-symbol-face copied from `highlight-symbol-mode' for use in maintained replacement mode: highlight-thing-mode.")
-;; mastodon
+
+;;;;; mastodon
(setq mastodon-instance-url "https://hostux.social"
mastodon-active-user "iank")