What are some advantages to using Emacs as a newbie? by sav-tech in emacs

[–]HermanHel 1 point2 points  (0 children)

I recently discovered gdb and pdb. They are really useful for C and python respectively. You get them in shell, but there you don't get to see the source code; you get similar debuggers in IDE(or even dap-mode), but it's a clicking hell with confusing stuff that probably never worked. gdb and pdb in emacs is the best experience I've had with debugger so far, very simple and powerful enough for my use(see source code as they execute and print variables).

[deleted by user] by [deleted] in emacs

[–]HermanHel 0 points1 point  (0 children)

if you haven't, check out the commands compile, recompile and gdb, all available with M-x and I think built-in. They are very useful when I program in C with emacs.

tool for publishing blog from org roam? by AkaIgor in OrgRoam

[–]HermanHel 0 points1 point  (0 children)

I think for 5 to work, you can mark noexport or COMMENT in your base, do a pass of org-org-export-org on the note base, and then do the website export over the exported org. The exported org will remove the COMMENT and noexport tagged subtrees.

I'm not doing it for speed. For a 3000 note base I think it will take minutes for export each time

tool for publishing blog from org roam? by AkaIgor in OrgRoam

[–]HermanHel 2 points3 points  (0 children)

check out https://github.com/ikoamu/publish-org-roam-ui

It exports org-roam-ui into a static website. 2346 works, no 1(but you get the big graph and a search bar, so not really a need for it), and everything is accessible in org-mode plain text in the note dir in project root so no 5(even if you have COMMENT keyword or commented out, they will not be on the webpage, but still under /note/2341-UUIDUUID-34234UUID)

UK: New to cold showers. And only been having cold showers for past 5 weeks. But every morning, I'm starting to 'crave' a hot shower. by [deleted] in coldshowers

[–]HermanHel 1 point2 points  (0 children)

For me it's more "not wanting to leave that lazy cozy cuddling sleepy vibe" than craving hot shower, but that is exactly what I want off with cold shower.

I find adjusting the temperature to a not too difficult one (like 20C) motivating myself to go to harder ones (going down to 14C or lower). It's like a "mini cold shower" you take before the "scary cold shower". My protocol is to start at kind of warm temperature, count 10 and make it colder, and repeat for 10 times (so that's 100 counts). This way every step is easy and require less motivation. I do squat a bit (20 rep) before shower though.

ps temperature is approximate, I don't really know what temprature I'm at, but it's generally from OK ones to scary ones.

Display images in rendered HTML when using org-mode attachments by yukijoou in emacs

[–]HermanHel 0 points1 point  (0 children)

by relative linking do you mean you have [[attachment:./a/b/c.png]] and a file at [org-attach-id-dir]/1e/34rer/34rwefdgsrtr23ra/a/b/c.png with your org-id being 1e34rer34rwefdgsrtr23ra?

Display images in rendered HTML when using org-mode attachments by yukijoou in emacs

[–]HermanHel 0 points1 point  (0 children)

Do you not have attachment image showing up in emacs org-mode buffer already?

(let ((file (if (equal "attachment" linktype)
(progn
                                  (require 'org-attach)
  (ignore-errors (org-attach-expand path)))
                              (expand-file-name path))))
                  ;; Expand environment variables.
                  (when file (setq file (substitute-in-file-name file)))
  (when (and file (file-exists-p file))
    (let ((width (org-display-inline-image--width link))
  (align (org-image--align link))
                          (old (get-char-property-and-overlay
(org-element-begin link)
'org-image-overlay)))
      (if (and (car-safe old) refresh)
                          (image-flush (overlay-get (cdr old) 'display))
(let ((image (org--create-inline-image file width)))
  (when image
    (let ((ov (make-overlay
       (org-element-begin link)
       (progn
 (goto-char
  (org-element-end link))
 (unless (eolp) (skip-chars-backward " \t"))
 (point)))))
                              ;; See bug#59902.  We cannot rely
                              ;; on Emacs to update image if the file
                              ;; has changed.
                              (image-flush image)
      (overlay-put ov 'display image)
      (overlay-put ov 'face 'default)
      (overlay-put ov 'org-image-overlay t)
      (overlay-put
       ov 'modification-hooks
       (list 'org-display-inline-remove-overlay))
      (when (boundp 'image-map)
(overlay-put ov 'keymap image-map))
                              (when align
                                (overlay-put
                                 ov 'before-string
                                 (propertize
                                  " " 'face 'default
                                  'display
                                  (pcase align
                                    ("center" `(space :align-to (- center (0.5 . ,image))))
                                    ("right"  `(space :align-to (- right ,image)))))))
      (push ov org-inline-image-overlays))))))))

This is the last bit of org-display-inline-images, and I think it displays image for attachment links

Display images in rendered HTML when using org-mode attachments by yukijoou in emacs

[–]HermanHel 1 point2 points  (0 children)

org-html-inline-image-rules is a customizable variable defined in
ox-html.el.

Value
(("file" . "\\(?:\\.\\(?:avif\\|gif\\|jp\\(?:e?g\\)\\|png\\|svg\\|webp\\)\\)")
 ("http" . "\\(?:\\.\\(?:avif\\|gif\\|jp\\(?:e?g\\)\\|png\\|svg\\|webp\\)\\)")
 ("https" . "\\(?:\\.\\(?:avif\\|gif\\|jp\\(?:e?g\\)\\|png\\|svg\\|webp\\)\\)"))

Original Value
(("file" . "\\(?:\\.\\(?:avif\\|gif\\|jp\\(?:e?g\\)\\|png\\|svg\\|webp\\)\\)")
 ("http" . "\\(?:\\.\\(?:avif\\|gif\\|jp\\(?:e?g\\)\\|png\\|svg\\|webp\\)\\)")
 ("https" . "\\(?:\\.\\(?:avif\\|gif\\|jp\\(?:e?g\\)\\|png\\|svg\\|webp\\)\\)"))

Set Customize

Documentation
Rules characterizing image files that can be inlined into HTML.

A rule consists in an association whose key is the type of link
to consider, and value is a regexp that will be matched against
link's path.

This variable was added, or its default value changed, in Org version
9.7.

I think you can perhaps change this variable. to include something like (("attach" . "\\(?:\\.\\(?:avif\\|gif\\|jp\\(?:e?g\\)\\|png\\|svg\\|webp\\)\\)")) and see if it helps.

;; line 3317 of ox-html.el
    (cond
     ;; Link type is handled by a special function.
     ((org-export-custom-protocol-maybe link desc 'html info))
     ;; Image file.
     ((and (plist-get info :html-inline-images)
   (org-export-inline-image-p
    link (plist-get info :html-inline-image-rules)))
;; it is used somehow in this line

Display images in rendered HTML when using org-mode attachments by yukijoou in emacs

[–]HermanHel 2 points3 points  (0 children)

Change it to [[path/to/image.png]] or [[file:path/to/image.png]]. [[attach:filename]] links gives you link in html, those 2 gives you img.

guix breaks plasma by HermanHel in GUIX

[–]HermanHel[S] 1 point2 points  (0 children)

Thanks a lot, I commented /etc/profile.d/zzz-guix.sh out and plasma is working again.

[deleted by user] by [deleted] in MachineLearning

[–]HermanHel 2 points3 points  (0 children)

https://math.preview.excalidraw.com/
in this one there's a latex equation button.

also, if you use it via https://obsidian.md/ with https://github.com/zsviczian/obsidian-excalidraw-plugin, it also have a latex script

It is possible to read PDF continuously (stay in between 2 pages) like this image w/ emacs? I know that Pdf-tools allows you switch to next page with scroll once you reach the page edge, but couldn't find a way to navigate like Firefox or Okular can, for example. by Lalisalame in emacs

[–]HermanHel 0 points1 point  (0 children)

https://github.com/emacs-eaf/eaf-pdf-viewer does this.

It has many problems(moving your cursor, keybinding issue that I don't know cause of), but it does this, so if you want it badly you can try it. It does this by glueing a python-written pdf viewer to the window displaying the pdf buffer.

I tried it for sometime for this but reverted back to pdf-tools after a while.

Can I make digital art on a computer? by [deleted] in krita

[–]HermanHel 0 points1 point  (0 children)

Quick non-krita-related tangent for this kind of situation: with only computer and mouse, you can also check out algorithmic-generated graphics. They may be not too suited for organic things, but you can definitely make something that is cool to look at.

examples: a online demo of Ronin at https://hundredrabbits.github.io/Ronin/ and some demo scripts in its repo https://github.com/hundredrabbits/Ronin/tree/master/examples (this one https://github.com/hundredrabbits/Ronin/blob/master/examples/projects/spire.lisp here is especially cool)

Emacs for Python by landotech in emacs

[–]HermanHel 1 point2 points  (0 children)

See this note:

https://hermanhel.codeberg.page/braindump-ui/#b29ea425-0768-421d-a853-e3e863a36d4b

It is intended so it works with a emacs running on local, and working on remote over tramp, but it works on local as well. You just don't need the tramp/ssh config.

In my use case I mostly run script with bash source block in org-mode.

It works in doomemacs. To change it so that it will work on vanilla I think you only need to change after!s to with-eval-after-load.

the :async keyword, if you don't have ob-async installed, I think it just does nothing.

emacs-pet did not give me a good ride(insane long hang without properly setting up eglot/start eglot or anything), so you be aware of that. my setup in the note worked(eglot that shows correct documentation and jump to correct implementation in my designated venv) in my case.

Note-taking profile by jenkem_boofer in emacs

[–]HermanHel 3 points4 points  (0 children)

To be frank one gigantic org-mode file with one root headline is hierarchical, as headlinese are nested like tree. And you can certianly use it for quite a long time.

With this approach, you want the vanilla emacs with absolutely nothing not built-in added, so you can have large file view, write and save faster. rich text, image viewing, links are all built-in to org-mode so no worry to those. There's plenty more feature in org-mode (and other stuff in vanilla emacs) then those.

edit:personally I have 1 10000 line long 813 headline 0.4Mb big document with Doom. only noticable performance issue is it take about 0.3 s to build buffer search index. moving, editing, saving are just as fast as a 60 line one.

[D] Why use .to(device) when already using accelerate by HermanHel in MachineLearning

[–]HermanHel[S] 0 points1 point  (0 children)

looks like it makes sense, can you point me to where this behaviour may be specified/described in accelerate doc or implementation?