mms, to emacs
@mms@emacs.ch avatar

How would you run create a long process (rsync for example), create a temporary buffer in split for it, tail the output to the buffer so it’s up to date; then if the process exists success close the buffer? Preferably the emacs should not lock the whole time.

grinn, to emacs
@grinn@emacs.ch avatar

Sometimes I get overwhelmed by having a free day and end up not accomplishing much. This morning it was processing my feelings toward my family's political views. I think it was valuable to come to some conclusions about why their views bothered me so much, but it took time.

I'm sitting on some patches and email drafts waiting for the fsf to update my copyright assignment record.

I'm going to work on objed for a while, then my blog. For objed I want to translate the test runner from a Makefile to an elisp eldev command. For the blog I want to do the opposite: translate the elisp build script into a Makefile.

Both are attempts at simplifying the development process though, just choosing the right tool for each job.

emoses, to emacs
@emoses@hachyderm.io avatar

I use Emacs with evil, and I hit ":w2<ret>" way more often than I'd like, leaving little files called "2" all over the place. So I wrote some advice to fix it

https://www.emoses.org/posts/dont-write-2/

screwtape, to emacs
@screwtape@mastodon.sdf.org avatar

many / phost;

In my quest for an easier emacs on ramp, I made an org file for adding templated elisp source block sections to itself, which tangles to an elisp file, to be loaded on startup.


gopher://tilde.club/0/~screwtape/config.org.txt
gopher://tilde.club/0/~screwtape/about-config.org.txt

https://gopher.tildeverse.org/tilde.club/0/~screwtape/config.org.txt
https://gopher.tildeverse.org/tilde.club/0/~screwtape/about-config.org.txt

What does everyone think. @mattof @louis @pkw @vidak

grinn, to emacs
@grinn@emacs.ch avatar

If you want to be notified of scheduled and deadlined tasks in Org mode, there is no better way than with org-yaap. It has zero dependencies other than Emacs 27.1 and it works great on Android with termux.

I've been using it for two years without issue. The documentation and options are superbly setup to fit most uses of Org:

"""
By default, you will be notified for all scheduled headings (org-yaap-include-scheduled') and headings with a deadline (org-yaap-include-deadline') within your agenda files. If a heading only includes the date, you will be notified at 9am on the day of the heading (org-yaap-daily-alert'). If you don't mark a heading as done, you will be repeatedly notified every 30 minutes after the heading was due (org-yaap-overdue-alerts').
"""

You can install it from my package archive at https://packages.amygrinn.com/ or download the latest release from https://gitlab.com/grinn.amy/org-yaap/-/releases then package-install-file

pmaohj, to emacs

(defun pdf-view-scroll-down--mark-top (down-or-previous-page &rest args)
"display tooltip at former top of display after scrolling down"
(let* ((win (window-inside-pixel-edges))
(win-height (- (nth 3 win) (nth 1 win)))
(image-height (cdr (pdf-view-image-size t)))
(image-top (window-vscroll nil t)))
(apply down-or-previous-page args)
(if (> image-top 0)
(pdf-util-tooltip-arrow (- image-top 30))
(pdf-util-tooltip-arrow image-height))))

(advice-add 'pdf-view-scroll-down-or-previous-page :around #'pdf-view-scroll-down--mark-top)

(defun pdf-view-scroll-up--mark-bottom (up-or-next-page &rest args)
"display tooltip at former bottom of display after scrolling up"
(let* ((win (window-inside-pixel-edges))
(win-height (- (nth 3 win) (nth 1 win)))
(image-height (cdr (pdf-view-image-size t)))
(image-top (window-vscroll nil t))
(old-bottom (+ image-top win-height)))
(apply up-or-next-page args)
(if (< old-bottom image-height)
(pdf-util-tooltip-arrow old-bottom
(pdf-util-tooltip-arrow 0))))

(advice-add 'pdf-view-scroll-up-or-next-page :around #'pdf-view-scroll-up--mark-bottom)

rml, to random
@rml@functional.cafe avatar

Under communism will be the mandatory first programming language for all aspiring programmers.

qhBidG3d, to emacs
@qhBidG3d@emacs.ch avatar

I wanted to share a function that I've found incredibly useful while conducting qualitative data analysis of interviews. During this type of research, structuring my interview data and maintaining a clear overview is crucial. To assist with this, I've developed a function in Emacs Lisp that uses tags to extract specific headlines into a new buffer.

This function, /extract-headlines-by-tag/, prompts the user to enter a tag. The function then scans the entire buffer, and for each headline that contains the specified tag, it extracts not only the headline but also its content. These extracted parts are then transferred into a new buffer. I've made the new buffer pop up for immediate review after the extraction process.

Here's the piece of code:

#+begin_src emacs-lisp
(defun extract-headlines-by-tag (tag)
"Extract headlines and their content from current buffer by TAG."
(interactive "sEnter tag: ")
(save-excursion
(let ((result-buffer (generate-new-buffer (concat "/Extracted Headlines " tag ""))))
(with-current-buffer result-buffer
(org-mode)
(insert "
Extracted Headlines by Tag: " tag " *\n\n"))
(org-element-map (org-element-parse-buffer) 'headline
(lambda (headline)
(when (member tag (org-element-property :tags headline))
(with-current-buffer result-buffer
(insert (org-element-interpret-data headline) "\n")))))
(pop-to-buffer result-buffer))))
#+end_src

deadblackclover, to emacs
@deadblackclover@functional.cafe avatar

Meanwhile, the v1.3.0 version of my config for Emacs has been released.

Changes since v1.0.0

  • Updated theme and start buffer
  • Added emms for listening to music
  • Added multiple-cursors
  • Added support for some languages
  • As well as various tweaks and improvements

https://github.com/deadblackclover/clover/releases/tag/v1.3.0

dliden, to emacs
@dliden@emacs.ch avatar

Has anyone here worked much with generators in ?

I am looking for a good solution for streaming outputs in my ollama-elisp-sdk project. I think there's a good angle using generators to make a workflow fairly similar to e.g. the OpenAI API. Not sure yet though.

louis, (edited ) to emacs
@louis@emacs.ch avatar

Not sure what I'm doing wrong, but I'm trying to do some project-find-regexp with an expression like this: func() and it still finds everything with func. I was expecting that it only finds "func()", what did I get wrong?

rahguzar,
@rahguzar@emacs.ch avatar

@RogerBW @louis this seems to be case in My way of dealing with regexes in Elisp is to use rx and (rx "func()") outputs "func()".

louis, to emacs
@louis@emacs.ch avatar

Learn Emacs Lisp in 30 Minutes.

New video from Gavin Freeborn just dropped:

https://yewtu.be/watch?v=1y__2IK-aLM

chmouel, to python
@chmouel@fosstodon.org avatar

A small function to search or code on

(defun my-github-search(&optional search)
(interactive (list (read-string "Search: " (thing-at-point 'symbol))))
(let* ((language (cond ((eq major-mode 'python-mode) "Python")
((eq major-mode 'emacs-lisp-mode) "Emacs Lisp")
(t "Text")))
(url (format "https://github.com/search/?q="%s"+language:"%s"&type=Code" (url-hexify-string search) language)))
(browse-url url)))

chmouel,
@chmouel@fosstodon.org avatar

I shortened the code for brievety but you get the full function and all mode here https://gitlab.com/chmouel/emacs-config/blob/main/lisp/init-functions.el#L207

bbatsov, to emacs
@bbatsov@hachyderm.io avatar

I also wrote down some notes on how easy it is to replace dash.el with the built-in subr-x.el and seq.el https://emacsredux.com/blog/2024/02/19/replacing-dash-el-with-built-in-emacs-apis/

ynom, to emacs
@ynom@emacs.ch avatar

What do you all think of ?

It appears to be an -ish program that uses for customization.

Apparently there have been other emacs clones based on and and I guess those are called ?

Without going too into my personal details, I’m not a professional programmer and most of my experience is with a modern programming language, , and a high level programming language, .

I’ve tried learning several times by completing various programming exercises and I end up quitting because something obnoxious comes up that, from my minimal programming experience, appears to be due to elisp‘s age. Again, I’m not a pro, so this is just my amateur take.

I did a some programming challenges with which was hugely fun (mostly because of how fun it feels in emacs 😁) so I don’t think it’s the part of emacs I have a distaste for.

I’ll probably give it a serious go within the next week here and possibly report back, but I can’t imagine an emacs clone without and ChatGPT-shell will really ever become my daily driver 🙃

https://lem-project.github.io/

https://news.ycombinator.com/item?id=39397942

bigMouthCommie, to emacs
@bigMouthCommie@kolektiva.social avatar

i have a lot of this going on:

(setq org-agenda-files
'("c:/Users/user/0.org" "c:/Users/user/1.org" "c:/Users/user/2.org" "c:/Users/user/3.org" "c:/Users/user/4.org" "c:/Users/user/5.org" "c:/Users/user/6.org" "c:/Users/user/7.org" "c:/Users/user/8.org" "c:/Users/user/9.org" "c:/Users/user/10.org" "c:/Users/user/11.org" "c:/Users/user/12.org" "c:/Users/user/13.org" "c:/Users/user/14.org" "c:/Users/user/15.org" "c:/Users/user/16.org" "c:/Users/user/17.org" "c:/Users/user/18.org" "c:/Users/user/19.org"))

can i just put line breaks in instead of using the space to improve readability? does it need to be escaped?

AblatedSprocket, to emacs
@AblatedSprocket@emacs.ch avatar

I'm hoping some of you more seasoned #emacs veterans can help me with something. I have an #elisp script that creates a plist, but a lot of the values are calculated based on other property values so I've ended up with a ton of (setq my-plist (plist-put my-plist :key (+ (plist-get my-plist :key2) calc-val))) expressions all over the place which seems a bit... unwieldy. Is there a better structure to use for this kind of scenario or is there a better way to go about this? Also I don't know how to do code snippets here, my apologies.

dliden, to emacs
@dliden@emacs.ch avatar

Do you all use anything for formatting in ?

I started using Emacs ELisp AutoFmt recently have found it pretty nice. I mostly just use elisp-autofmt-region or elisp-autofmt-buffer periodically as I'm working.

bram85, to emacs

Here's a function to generate QR codes inside . Select a region or enter the text in the minibuffer and it will be encoded with the external qrencode tool. By default it generates an UTF8 QR code, with a universal prefix an PNG is created.

https://apps.bram85.nl/git/bram/gists/src/commit/73a87ed7675e9f71de3a7cb0cd2c43727dd34e05/gists/generate-qr.el

This is different from the qrencode.el package which is a native QR encoder:

https://github.com/ruediger/qrencode-el

bram85, to emacs

kagi.el now has the kagi-translate command, a versatile command to translate text to another language using

With kagi-translate you can:

  • translate simple words from the minibuffer
  • translate the region
  • translate a whole buffer
  • use it as a function to translate text from
  • Not limited to spoken languages, you can convert a code buffer to another programming language (see demo below).

https://asciinema.org/a/633592

Should come to MELPA soon on the next build, or if you can't wait clone from the git repo at:

https://codeberg.org/bram85/kagi.el

As with all other kagi.el functionality, please check the project's README on how to get your API token, if you haven't done so already.

Demonstration of the

louis, to emacs
@louis@emacs.ch avatar

Hate Lisp and don't like Vi? You can still use Emacs!

Micro Emacs is a Lisp-less version of Emacs for the terminal. It's Linus Torvald's preferred choice and part of base install (mg).

https://en.wikipedia.org/wiki/MicroEMACS

publicvoit,
@publicvoit@graz.social avatar

@louis Well, I'm using Emacs since the 90s (with a break in-between), I'm pretty far with my GNU setup and I dislike as a language as well. (Not for its possibilities!)

Even if you don't modify your init.el by hand, you still can go very far by just modifying settings via the menus or other customization possibilities: https://www.gnu.org/software/emacs/manual/html_node/emacs/Easy-Customization.html

andros, to emacs
@andros@hostux.social avatar

I publish a new article: «Creating desktop applications using the Emacs core»
https://programadorwebvalencia.com/creating-desktop-applications-using-the-emacs-core/

In summary, I can use Emacs to create GUIs with an Elisp backend.

mjgardner,
@mjgardner@social.sdf.org avatar

@andros @marcolas Do you want with ? Because that’s how you get Electron with Elisp.

(emphatically not an endorsement)

mjgardner,
@mjgardner@social.sdf.org avatar

@andros @marcolas The point is your architecture is the same as , replacing embedded and running with embedded running .

So every app using it has all of ’s disadvantages:
• lowest-common-denominator obviously foreign to the host OS
• non-portable shims to integrate with host OS features
• an individually bespoke runtime consuming storage, memory, and compute as if it were a separate virtual machine

mjgardner,
@mjgardner@social.sdf.org avatar

@andros @marcolas Web applications use to shoehorn themselves into an environment designed to browse hyperlinked documents.

And “ applications” (e.g., Org Mode, Gnus, calendar/diary, ERC, and even multiple web browsers!) use to shoehorn themselves into an environment designed to edit text documents.

You’re so blinkered by the ubiquity of apps shoehorned inside apps that you’ve forgotten the compromises they introduce.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • InstantRegret
  • magazineikmin
  • GTA5RPClips
  • osvaldo12
  • thenastyranch
  • Youngstown
  • everett
  • slotface
  • mdbf
  • rosin
  • ngwrru68w68
  • kavyap
  • DreamBathrooms
  • anitta
  • Durango
  • khanakhh
  • modclub
  • cubers
  • vwfavf
  • cisconetworking
  • tacticalgear
  • ethstaker
  • tester
  • Leos
  • provamag3
  • normalnudes
  • JUstTest
  • All magazines