blob: 889eac4350739c35f1318fb9df6de2c6710fad7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
|
* Emacs Open Work
** TODO [#A] Emacs should open specific file extensions outside emacs
*** Reference Ideas
**** https://www.reddit.com/r/emacs/comments/1cdhum7/how_to_make_emacs_open_certain_files_using/
(defun my/dired-open()
(interactive)
(let ((filext '("mp4" "rar" "zip" "gz" "epub" "xz" "sig" "pdf" "jpg" "png" "7z")))
(cond
((file-directory-p (dired-get-file-for-visit))
(dired-find-file))
((member (f-ext (dired-get-file-for-visit)) filext)
(call-process "xdg-open" nil nil nil (dired-get-file-for-visit)))
(t (dired-find-file)))))
**** https://www.reddit.com/r/emacs/comments/1cdhum7/how_to_make_emacs_open_certain_files_using/
(defun xdg-open (&optional filename)
(interactive)
(let ((process-connection-type))
(start-process
"" nil (cond ((eq system-type 'gnu/linux) "xdg-open")
((eq system-type 'darwin) "open")
((eq system-type 'windows-nt) "start")
(t "")) (expand-file-name
(or filename (dired-file-name-at-point))))))
(defun find-file-auto (orig-fun &rest args)
(let ((filename (car args)))
(if (cl-find-if
(lambda (regexp) (string-match regexp filename))
'("\\.pdf\\'" "\\.mp4\\'" "\\.wav\\'" "\\.avi\\'" "\\.gif\\'" "\\.docx?\\'"))
(xdg-open filename)
(apply orig-fun args))))
(advice-add 'find-file :around 'find-file-auto)
**** https://pastebin.com/HShdkFrY
;; Dired "native open": Use the OS-native program for opening the file
;; type from Dired
(defvar dired-native-open-program nil "The OS-native program for opening files.")
(cond ((eq system-type 'darwin)
(setq dired-native-open-program "/usr/bin/open"))
((eq system-type 'gnu/linux)
(setq dired-native-open-program "xdg-open"))
((eq system-type 'windows-nt)
(setq dired-native-open-program "explorer.exe")))
(defun dired-open-with-native-open-program ()
"Open the marked files with the program associated with those file types."
(interactive)
(let ((file-list (dired-get-marked-files)))
(dired-run-shell-command
(dired-shell-stuff-it dired-native-open-program file-list t))))
(define-key dired-mode-map (kbd "M-o") #'dired-open-with-native-open-program)
(define-key locate-mode-map (kbd "M-o") #'dired-open-with-native-open-program)
** TODO [#B] Mu4e Working with Proton and Gmail
** TODO [#B] Dirvish should open not showing hidden files by default
*** 2025-06-07 Sat @ 12:25:28 -0500 It isn't omitting the h switch on directory listings
No. Didn't help
** TODO [#B] Fix Emacs Alarm for Scheduled Events
*** 2025-06-03 Tue @ 15:12:51 -0500 Problem
Emacs Alarm seems to sound off periodically after the
** TODO [#B] Add Past Due to F8 Agenda Summary in Emacs
** TODO [#B] Separate B and C in F8 Agenda Summary in Emacs
** TODO [#B] Adjust Eshell Colors
the prompt is pink?
** TODO [#B] Fix Emacs Org Roam Recipe Error
C-c n i then type a recipe name.
org-element--get-category: Invalid function: org-element-with-disabled-cache
The file was created, but does not come to the front
The category value seems unaligned
** TODO [#B] Emacs Eshell Doesn't Inherit Environment Variables
** TODO [#C] Rename 'sync-dir' Variable in Init File to 'org-dir'
** TODO Install ZOxide Integration into Emacs
[[https://gitlab.com/Vonfry/zoxide.el][Vonfry / zoxide.el · GitLab]]
Captured On: [2025-06-07 Sat 17:11]
** TODO [#C] Emacs Signal Client
*** TODO investigate: net/signel.org · master · undefined · GitLab
[[https://gitlab.com/jaor/elibs/-/blob/master/net/signel.org][net/signel.org · master · undefined · GitLab]]
Captured On: [2025-05-29 Thu 04:24]
*** TODO investigate: signel, a barebones signal chat on top of signal-cli
[[https://jao.io/blog/signel.html][signel, a barebones signal chat on top of signal-cli]]
Captured On: [2025-05-29 Thu 04:23]
** TODO Test This Method for Alarms In Emacs
#+BEGIN_QUOTE
I am quite happy with the system I use, which does (I think) exactly what you want. It has two parts: an Emacs part that uses appt.el to schedule the reminders and a small shell program (I'm using Linux) that creates the popup + sound notification. Here I share the code for both parts.
A) Code in ~/.emacs.d/init.el
(require 'appt)
(appt-activate t)
(setq appt-message-warning-time 5) ; Show notification 5 minutes before event
(setq appt-display-interval appt-message-warning-time) ; Disable multiple reminders
(setq appt-display-mode-line nil)
; Use appointment data from org-mode
(defun my-org-agenda-to-appt ()
(interactive)
(setq appt-time-msg-list nil)
(org-agenda-to-appt))
; Update alarms when...
; (1) ... Starting Emacs
(my-org-agenda-to-appt)
; (2) ... Everyday at 12:05am (useful in case you keep Emacs always on)
(run-at-time "12:05am" (* 24 3600) 'my-org-agenda-to-appt)
; (3) ... When TODO.txt is saved
(add-hook 'after-save-hook
'(lambda ()
(if (string= (buffer-file-name) (concat (getenv "HOME") "/ideas/TODO.txt"))
(my-org-agenda-to-appt))))
; Display appointments as a window manager notification
(setq appt-disp-window-function 'my-appt-display)
(setq appt-delete-window-function (lambda () t))
(setq my-appt-notification-app (concat (getenv "HOME") "/bin/appt-notification"))
(defun my-appt-display (min-to-app new-time msg)
(if (atom min-to-app)
(start-process "my-appt-notification-app" nil my-appt-notification-app min-to-app msg)
(dolist (i (number-sequence 0 (1- (length min-to-app))))
(start-process "my-appt-notification-app" nil my-appt-notification-app (nth i min-to-app) (nth i msg)))))
B) Code in ~/bin/appt-notification
#!/bin/sh
TIME="$1"
MSG="$2"
notify-send -t 0 "<br>Appointment in $TIME minutes:<br>$MSG<br>"
play "~/bin/alarm.wav"
To get voice notifications you could replace the last line (play) with the following:
espeak "Appointment in $TIME minutes: $MSG"
#+END_QUOTE
[[https://emacs.stackexchange.com/questions/3844/good-methods-for-setting-up-alarms-audio-visual-triggered-by-org-mode-events][Good methods for setting up alarms (audio + visual) triggered by org-mode events? - Emacs Stack Exchange]]
Captured On: [2025-06-19 Thu 12:29]
** TODO [#C] Emacs: Should adding tasks add it to Projects and Tasks in the inbox file?
* Emacs Project Ideas/References
** emacs-tw/awesome-elisp: 🏵️ A curated list of Emacs Lisp development resources
[[https://github.com/emacs-tw/awesome-elisp][emacs-tw/awesome-elisp: 🏵️ A curated list of Emacs Lisp development resources]]
Captured On: [2025-06-07 Sat 13:42]
** emacs-tw/awesome-emacs: A community driven list of useful Emacs packages, libraries and other items.
[[https://github.com/emacs-tw/awesome-emacs#layout][emacs-tw/awesome-emacs: A community driven list of useful Emacs packages, libraries and other items.]]
Captured On: [2025-06-07 Sat 13:30]
** ryuslash/mode-icons: Show icons instead of mode names
[[https://github.com/ryuslash/mode-icons][ryuslash/mode-icons: Show icons instead of mode names]]
Captured On: [2025-06-07 Sat 13:29]
** manateelazycat/awesome-tray: Hide mode-line, display necessary information at right of minibuffer.
[[https://github.com/manateelazycat/awesome-tray][manateelazycat/awesome-tray: Hide mode-line, display necessary information at right of minibuffer.]]
Captured On: [2025-06-07 Sat 13:29]
** bastibe/org-static-blog: A static site generator using org-mode
[[https://github.com/bastibe/org-static-blog][bastibe/org-static-blog: A static site generator using org-mode]]
Captured On: [2025-05-29 Thu 04:32]
** an emacs packages hat trick
[[https://jao.io/blog/emacs-packages-hat-trick.html][an emacs packages hat trick]]
Captured On: [2025-05-29 Thu 04:28]
** a high signal to noise emacs command: buffer-same-mode
[[https://jao.io/blog/high-signal-to-noise-emacs-command.html][a high signal to noise emacs command]]
Captured On: [2025-05-29 Thu 04:33]
|