This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-23
Channels
- # adventofcode (13)
- # announcements (7)
- # atom-editor (2)
- # babashka (6)
- # beginners (77)
- # biff (2)
- # calva (14)
- # cider (25)
- # circleci (2)
- # clj-on-windows (39)
- # clojars (1)
- # clojure (36)
- # clojure-belgium (4)
- # clojure-europe (78)
- # clojure-norway (25)
- # clojure-spec (1)
- # clojurescript (11)
- # clr (1)
- # cursive (1)
- # datahike (43)
- # datomic (6)
- # dev-tooling (3)
- # emacs (5)
- # exercism (1)
- # jobs (1)
- # jobs-discuss (3)
- # kaocha (2)
- # lsp (32)
- # malli (4)
- # music (1)
- # off-topic (14)
- # pathom (4)
- # reitit (14)
- # shadow-cljs (5)
- # tools-deps (3)
- # vim (1)
- # xtdb (5)
Wow, for me as an elisp newbie, this is actually saving me a lot of time, even if it might be easy to find this stuff with a simple online search: > me: can you write me an emacs function to copy the current file link to the kill ring? > > chatgpg: Certainly! Here is an Emacs Lisp function that you can use to copy the link to the current file to the kill ring: >
(defun copy-current-file-link ()
> "Copy the link to the current file to the kill ring."
> (interactive)
> (let ((file-name (buffer-file-name)))
> (when file-name
> (kill-new (concat "file://" file-name))
> (message "Copied link to current file: %s" file-name))))
> me: Can you also have it make it an org-mode link?
> Certainly! Here is an updated version of the function that converts the file link to an org-mode
link before copying it to the kill ring:
> (defun copy-current-file-link-as-org-link ()
> "Copy the link to the current file as an org-mode link to the kill ring."
> (interactive)
> (let ((file-name (buffer-file-name)))
> (when file-name
> (kill-new (concat "[[file://" file-name "][" (file-name-nondirectory file-name) "]]"))
> (message "Copied link to current file as org-mode link: %s" file-name))))
😟 1
👍 1
😄 1
https://github.com/benjamin-asdf/openai-api.el I had quite some fun with having the api in emacs. It is great for when you don't know a lang so well. You can also ask things like "what does x do?" And just "explain this".
2
heck yeah, love it
being able to program stuff: A+