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>

deech, to emacs
@deech@mastodon.social avatar

Oh nice! #emacs now has built in JSON (de)serialization.

https://github.com/emacs-mirror/emacs/blob/master/etc/NEWS#L53-L56

andy47, to emacs
@andy47@aus.social avatar

I am not sure that I like what I've become - I have started using #emacs. It feels ... dirty.

screwtape, to Lisp
@screwtape@mastodon.sdf.org avatar
carmenbianca, to emacs
@carmenbianca@todon.eu avatar

how do people use #emacs (sans evil-mode) without getting immediate RSI?

i tried regular emacs for a day after being shamed by my friend's dad for using evil-mode, and my hand still hurts.

i actually quite liked it, apart from, you know, the pain. that isn't normal.

bounga, to random
@bounga@ruby.social avatar

Hi @sachac just to let you know that your website seems to be down.

bounga,
@bounga@ruby.social avatar

@sachac yes it works! Thank a lot for your work. Every week I’m waiting for your post. You are really a gem for #emacs community.

laotang, to emacs
@laotang@emacs.ch avatar

people: Is there an easy way to customise org-capture (and perhaps org-agenda) to just use the same window and leave my window management alone?

I’m knee-deep into stack overflow posts and wasting way too much time here. This is one of my most longstanding annoyances of

(This is actually one of the reasons does not use org-capture for new notes.)

oatmeal, to emacs
@oatmeal@emacs.ch avatar

#emacs wait, what? consult-gnome-search

Nice way to interact with GNOME's search... I have tracker disabled, so not much to see. This action will open the app description in GNOME Software.

https://blog.hoetzel.info/post/consult-gnome-search

tekki, to emacs German
@tekki@swiss.social avatar

If Google Podcasts asks to export all subscriptions to YouTube Music and this one finds nothing to import, the only reliable solution is to move everything to elfeed in #Emacs.

adanskana, to RSS
@adanskana@mastodon.social avatar

Can anyone recommend some good programming blogs (in the realm of lisps, emacs, guix, technical deep dives) that offer RSS feeds? I've already got https://wingolog.org/ from @wingo which is pretty much the exact genre of blog I'm looking for. https://ianthehenry.com/posts/ from @ianthehenry is also a good one (although the RSS feed doesn't seem to work with GFeeds :).
I just think it would be cute to have a selection of RSS feeds to browse through :)

[

kommen, to emacs German
@kommen@hachyderm.io avatar

:emacs: for a while running a part of Germany’s Air Traffic Control system after the country’s reunification is what sweetend my breakfast today.

Plus, this is the plain truth: «In Germany, a Herr Doktor is always right»

https://www.emacswiki.org/emacs/EmacsStories#h5o-3

(via https://irreal.org/)

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

kickingvegas, to emacs
@kickingvegas@sfba.social avatar

Announcing Casual Avy, an opinionated Transient menu for Avy, a package for jumping to visible text using a character-based decision tree. More details about it at the link below. If you've never gotten around to trying out Avy, this menu can help you understand why folks who use it swear by it.
http://yummymelon.com/devnull/announcing-casual-avy.html

#emacs

sachac, to emacs
@sachac@emacs.ch avatar

I'm reading Naomi Fisher's book "Changing Our Minds: How Children Can Take Control of Their Own Learning." The discussions of adult self-directed learning and also Peter Gray's theory about (play + curiosity) * sociability = learning reminds me of how much I like the #Emacs community.

dziban, to emacs
@dziban@functional.cafe avatar

What do you people use for budgeting and finance tracking?

ddrake, to emacs
@ddrake@mathstodon.xyz avatar

In , 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.

howard, to orgmode
@howard@emacs.ch avatar

Excellent ideas in customizing the #orgmode agenda in #emacs. I believe I need to revisit how I've been organizing my day-to-day workflow.

https://macowners.club/posts/personal-touch-org-agenda/

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 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

masukomi, to emacs
@masukomi@connectified.com avatar

#Emacs geeks

Do any of you know of a package that lets me use slack / mastodon style emoji insertion?

Between Mastodon & Rocket (awesome macOS app) I keep starting to type : foo : instead of going to M-x insert-char

Obviously we can't just use : foo : because programming languages use colons all the time, but surely there's something similar we can do like !: foo :! or whatever.

🤔 I can't remember a language that combines colons and bangs.

dekkzz76, to emacs
@dekkzz76@emacs.ch avatar

Are many people running the emacs 30 apk on android?

pizzatorque, to emacs
@pizzatorque@emacs.ch avatar

I'm live on Twitch, come hang out! #emacs and #python shenanigans and making a minimal terminal client for lemmy. https://www.twitch.tv/PizzaTorque?sr=a

ditherycarbon, to emacs
@ditherycarbon@sigmoid.social avatar

I am starting to like #EMACS, but I really dislike #org-mode

And the fact that most emacs tutorials show how to work with org-mode irritates me a lot.

I just want to send emails in rich-text field, please don't make me learn org-mode for this!!

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.

#emacs #c

salvari, to emacs Spanish
@salvari@mastodon.gal avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • provamag3
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • JUstTest
  • All magazines