@sachac@emacs.ch
@sachac@emacs.ch avatar

sachac

@sachac@emacs.ch

Interests include: #Emacs, #OrgMode, #elisp, #nodejs, #python, #sketchnotes, #parenting, #cooking, #gardening, #knitting, #sewing, #lego, #captioning, #plover #steno, and #stoic philosophy. Originally from Manila, now in Toronto. Married to a Vim guy (go figure) and raising a 7-year old (editor preference unknown), along with two very loud cats.

Blog: https://sachachua.com (mostly Emacs News these days), sketches: https://sketches.sachachua.com. I also maintain planet.emacslife.com and subed.el

This profile is from a federated server and may be incomplete. Browse more on the original instance.

zrzz, to emacs

I've just stumbled on this blog post with a view-text-file-as-info-manual function that uses pandoc and org's ox-texinfo to convert various formats into info for convenient #emacs browsing.

It did a great job on the Fennel language reference, it looks a lot better than what I got via pandoc->texinfo->makeinfo. No index but that would be hard to conjure up from a generic markdown file. The top level TOC looks great, node jumps work well and code block are displayed as such.

cryptk, to emacs
@cryptk@mastodon.social avatar

Very happy to know that shoggy got the 16th place (out of 48) in the #lispgamejam! Thanks to everybody that played and rated the game!

https://github.com/bcardoso/shoggy

#emacs

publicvoit, to orgmode
@publicvoit@graz.social avatar

Sharing Selected Data With Users
https://karl-voit.at/2024/06/02/org-headings-to-logseq/

I do have a special use-case for sharing parts of my Org-mode content with my wife.

(Help me to promote me content elsewhere since I no longer promote it outside of Mastodon: https://karl-voit.at/2024/05/23/leaving-reddit/ )

Mehrad, to emacs
@Mehrad@fosstodon.org avatar

I quite often want to have two parts of the same file side-by-side to either diff them or edit them. I thought I share how I do it in :emacs: in case it helps someone:

  1. open the file
  2. M-x clone-indirect-buffer (the name says it all)
  3. in each buffer, go to the places you want and narrow to region (C-x n n)

Now you can edit or diff regions of the same file with ease 🤓

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

Breaking up my failures-to-build with my discovery of using

I really like this eight minute if I do say so myself.

https://toobnix.org/w/2WYHBTHGvRQ8pUSVmKhKGg

@adanskana @sachac @louis
can I ask for some opinions on the clim / emacs / lisp useage as conveyed by videos?

This is pretty much just what I really do when near a computer for eight minutes.
Playlist:
https://toobnix.org/w/p/4bRcULzg6bBAyELkRqU6EQ?playlistPosition=1

zrzz, to emacs

Render eww.el bookmarks and history as HTML.

eww.el has commands to manage bookmarks and history but I wanted a version that uses HTML so that eww-lnum and other eww functionality works as usual. This also adds a new my-eww-global-history variable because the normal eww-history is buffer-local.

(defvar my-eww-bookmarks-html-file (expand-file-name "eww-bookmarks.html" eww-bookmarks-directory))<br></br>(defvar my-eww-history-html-file (expand-file-name "eww-history.html" eww-bookmarks-directory))<br></br>(defvar my-eww-global-history nil)<br></br><br></br>(defun my-eww-render-bookmarks-as-html ()<br></br>  (eww-read-bookmarks)<br></br>  (with-temp-file my-eww-bookmarks-html-file<br></br>    (dolist (bm eww-bookmarks)<br></br>      (insert (format "<a href="%s">%s</a><br>n" (plist-get bm :url) (plist-get bm :title))))))<br></br><br></br>(defun my-eww-bookmarks ()<br></br>  (interactive)<br></br>  (my-eww-render-bookmarks-as-html)<br></br>  (eww-open-file my-eww-bookmarks-html-file))<br></br><br></br>(defun my-eww-save-global-history ()<br></br>  (let* ((url (plist-get eww-data :url))<br></br>         (title (plist-get eww-data :title))<br></br>         (elt (cons url title)))<br></br>    (unless <br></br>        (string-prefix-p (concat "file://" (expand-file-name eww-bookmarks-directory)) url)<br></br>      ;; push new element to beginning, keep it unique<br></br>      (setq my-eww-global-history (cons elt (delete elt my-eww-global-history))))))<br></br><br></br>(add-hook 'eww-after-render-hook #'my-eww-save-global-history)<br></br><br></br>(defun my-eww-render-history-as-html ()<br></br>  (with-temp-file my-eww-history-html-file<br></br>    (dolist (h my-eww-global-history)<br></br>      (let* ((url (car h))<br></br>             (title (cdr h))<br></br>             (title-or-url (if (or (null title) (string-blank-p title)) url<br></br>                             title)))<br></br>        (insert (format "<a href="%s">%s</a><br>n" url title-or-url))))))<br></br><br></br>(defun my-eww-history ()<br></br>  (interactive)<br></br>  (my-eww-render-history-as-html)<br></br>  (eww-open-file my-eww-history-html-file))<br></br><br></br>

sillygwailo, to random
@sillygwailo@mastodon.social avatar

“Git removed the friction from using version control; there was no excuse not to version anything of value anymore.” https://mmapped.blog/posts/28-enlightenmentware

sillygwailo,
@sillygwailo@mastodon.social avatar

“A dive into Emacs internals also revealed the inherent beauty of its architecture.” #emacs https://mmapped.blog/posts/28-enlightenmentware

ddrake, to emacs
@ddrake@mathstodon.xyz avatar

In #emacs, sometimes you want to surround a region with some text or delimiters -- say, <div> and </div> in HTML, or == for Mediawiki headers, or similar.

There was a blog post a while back that had a nice function for that -- I improved it so that you can repeatedly call the function and it will correctly nest the text it inserts. That is, you can first surround an HTML region with a span, then immediately call surround-region again without re-marking the region, tell it to surround the region with a div, and it will correctly nest the HTML tags.

Take a look at https://gist.github.com/dandrake/864f642850acaa3534cf5029868d12eb and let me know if you find any bugs or have suggestions.

bbatsov, to python
@bbatsov@hachyderm.io avatar
bram85, to orgmode
@bram85@emacs.ch avatar

I wrote a small post on using the rx macro in places where it's not supported, e.g. in Lisp data files.

rx is a macro which takes a special Lisp form and complies it to a regular expressions string.

The post demonstrates how I use #orgmode with noweb expansion to insert rx results in a source file. In this case, I use it to write scoring rules for elfeed-score with more readable regular expressions.

https://apps.bram85.nl/git/bram/gists/src/commit/17c1255461b66392579dd7f4b7391c560bdff919/gists/rx-in-lisp-data.org

#emacs

pkal, to emacs
@pkal@emacs.ch avatar

A very nice feature in Emacs 30 that got recently merged is etags-regen-mode by Dmitry Gutov:

+++<br></br>** New global minor mode 'etags-regen-mode'.<br></br>This minor mode generates the tags table automatically based on the<br></br>current project configuration, and later updates it as you edit the<br></br>files and save the changes.<br></br>

I found it useful when working with C code, will have to try other languages as well. By default it uses the etags executable, which depending on your system might be Universal or Exubrant Ctags.

#c

salvari, to emacs Spanish
@salvari@mastodon.gal avatar
kickingvegas, to emacs
@kickingvegas@sfba.social avatar

Casual Dired v1.2.0 update now available on MELPA. Adds "Goto File…" command to the menu among other things. Details at https://github.com/kickingvegas/casual-dired/discussions/56

#Emacs

goofansu, to emacs
@goofansu@hachyderm.io avatar
al3x, to emacs
@al3x@hachyderm.io avatar
deadblackclover, to Lisp
@deadblackclover@functional.cafe avatar
gavv, to emacs
@gavv@fosstodon.org avatar

I wrote a small emacs package for dynamic org-mode dashboards with github issues and pull requests and org tasks.

See README for example workflow and screenshots.

https://github.com/gavv/om-dash

#emacs #orgmode

bram85, to emacs
@bram85@emacs.ch avatar

TIL: With consult-grep you can pass on additional grep flags with the -- separator. E.g.:

foo bar -- -A3

to get matches with 3 lines of 'after' context.

amirny2205, to random
@amirny2205@toot.io avatar

my .emacs \w EXWM

https://dpaste.org/YMpyg
https://paste.rs/lUuOT.lisp

you can install GNU/linux on flash drive(full-featured version) or use virtualisation,
WSL and cygwin are solutions, too

consider Tor browser through VPsN, Richard Stallman uses it exclusively; about:config in firefox adrress bar to javascript.enabled = false, or use EU (eww, emacs web browser)

M-x zone in case Stalin has connection to your LCD at your PC
https://stackoverflow.com/questions/13386943/how-do-i-turn-on-zone-while-idle-in-emacs-through-my-emacs

https://paste.rs/PUnwm.txt

hexogen E=mc2

zrzz,

@amirny2205 Nice. This is what I use for my buffer rename logic to handle some special cases and to truncate names to a reasonable length:

(defun my-exwm-rename-buffer ()<br></br>  (let* ((class (or exwm-class-name ""))<br></br>         (title (or exwm-title exwm-class-name "exwm"))<br></br>         (name<br></br>          (cond<br></br>           ((string-match "chromium" class) "Chromium")<br></br>           ((string-match "firefox" class) "Firefox")<br></br>           ;; these need the program name prefixed<br></br>           ((string-match "MuPDF" class) (concat "MuPDF: " title))<br></br>           ((string-match "Gimp" class) (concat "Gimp: " title))<br></br>           (t title))))<br></br>    (exwm-workspace-rename-buffer (substring name 0 (min 60 (length name))))))<br></br><br></br>(add-hook 'exwm-update-title-hook 'my-exwm-rename-buffer)<br></br>

mousebot, to emacs
@mousebot@todon.nl avatar

#emacs #mastodonEl

i just bumped the mastodon.el version used by ELPA to the latest one (it had been stuck on an old version because i didn't know how ELPA tracks versions).

i also added an only-media profile view, as per a request, and an tagged-with profile view.

holler if you run into any issues after updates.

happy tooting.

louis, to emacs
@louis@emacs.ch avatar

Today marks the 555th day of uninterrupted uptime of our Emacs.ch instance. 🥳

That's also 555 days of admin work and a spending of roughly $1200 for IaaS. Donations of our users make that much more sustainable.

With consistently well over 400 monthly active users, we established a friendly and supportive Fediverse community in the Fediverse united in a passion for the world's most humane "text editor". And you helped to make that happen. 🎈

Emacs is not just a program, it is the incarnation of freedom, self-development, respect, tolerance and companionship in the software world. It will never go away and will never turn against its users.

Let's continue to grow and strengthen our community! If you'd like to contribute, please visit our donation page: https://liberapay.com/emacs-ch

Together, we can keep the spirit of Emacs alive and thriving for years to come. Thank you for being a part of this incredible journey! 🙏

thees, to emacs
@thees@emacs.ch avatar

Shared some notes on using a elisp function with timers instead of a cron + script based status_command for STDIN based status bars:

https://me.literatelisp.eu/a-minimal-elisp-statuscommand.html

bram85, to emacs
@bram85@emacs.ch avatar

A small snippet of for your init file to show the current time in the modeline if fullscreen is enabled.

(defun bram85-show-time-for-fullscreen (frame)  
 "Show the time in the modeline when the FRAME becomes full screen."  
 (let ((fullscreen (frame-parameter frame 'fullscreen)))  
 (if (memq fullscreen '(fullscreen fullboth))  
 (display-time-mode 1)  
 (display-time-mode -1))))

(add-hook 'window-size-change-functions #'bram85-show-time-for-fullscreen)  
zrzz, to emacs

In when you run find-file and the filename you specify includes wildcards the default behavior is to open all of the matching files. I find this too unpredictable so it's almost never what I want.

What I'd like instead is to bring up the matching files in dired just as if I'd used C-x d instead. This is not supported out of the box so I came up with the following advice:

(defun my-find-file-noselect-wild-dired (orig filename &optional nowarn rawfile wildcards)<br></br>  "Run dired when find-file is given a wildcard path"<br></br>  (if (and wildcards<br></br>           (not (file-name-quoted-p filename))<br></br>       (string-match "[[*?]" filename)<br></br>           (> (length (file-expand-wildcards filename t)) 1))<br></br>      (dired-noselect filename)<br></br>    (funcall orig filename nowarn rawfile wildcards)))<br></br><br></br>(advice-add 'find-file-noselect :around #'my-find-file-noselect-wild-dired)<br></br>

The file-name-quoted-p function checks for a /: prefix which is a magical tramp path to quote the filename. It's part of the normal wildcard path so I figured I'd include it too.

godmaire, to emacs
@godmaire@mstdn.social avatar

I did it. I made my first emacs package. It's small and just a wrapper around a CLI, but it's mine.

https://codeberg.org/godmaire/charm-freeze.el

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