Showing posts with label emacs. Show all posts
Showing posts with label emacs. Show all posts

Tuesday, January 16, 2024

simple org tables

 simple org table addition


| item      | price |

|-----------+-------|

| hotdog    |     1 |

| hamburger |     1 |

| total     |     2 |

#+TBLFM: @4$2=vsum(@2$2..@3$2)


- control c * to re-evaluate

- control c = to enter a formula


Friday, December 29, 2023

emacs export html

"space m e h o" to export and you gotta "control b" to only export the buffer.Not only that but you also need to include

  • #+OPTIONS: toc:nil num:nil created:nil date:nil author:nil

even after that theres still not stylesheet!


so add your stylesheet to this block of text and

put this in your doom emacs config.el



(after! org
  ;; Set the default HTML stylesheet link
  (setq org-html-head (concat ""))

  ;; Customize Org export settings
  (setq org-export-with-author nil      ; Exclude the author info
        org-export-time-stamp-file nil  ; Exclude the timestamp
        org-html-postamble nil))        ; Exclude postamble content

;; Function to export to HTML without opening the file
(defun my-org-export-to-html ()
  "Export Org Mode buffer to HTML."
  (interactive)
  (org-html-export-to-html)) ; Export to HTML

;; Bind this export function to a key
(map! :leader
      :desc "Export to HTML"
      "e h" #'my-org-export-to-html)

Saturday, December 23, 2023

how to join org files

you type this in the terminal in the current working directory and it joins all your org files you have in there and outputs them to a file called merged.org


cat *.org > merged.org

very handy indeed.

Tuesday, December 5, 2023

how to open html in browser (doom emacs)

 Space o b

on mac meta x isnt working?

do space : (colon) and type open browser

some bash rc settings for emacs client on i3

 # start emacs daemon if not already running
if [ -z "$(pgrep -u $USER emacs)" ]; then
/usr/bin/emacs --daemon
fi
# DOOM EMACS
export PATH="$HOME/.emacs.d/bin:$PATH"
# Emacs Client
alias emacs='emacsclient -c -a 'emacs''

 

-----------------

 this helps with the load times

Monday, December 4, 2023

fixing doom emacs not opening exported org in firefox

so you wrote some text in doom emacs

space m + e to export,  ctrl + b for body only

h + o for html export and open but it doesnt open? 

WHY!!! emacs doesnt know how to open the browser

== how to fix ==

on linux mint edit:

mint/.config/doom/config.el

then add this:

;; SET BROWSER TO OPEN WITH FIREFOX --THIS IS YOUR CUSTOM THING YOU ADDED --
(after! org
  (setq org-file-apps
        '((auto-mode . emacs)
          ("\\.mm\\'" . default)
          ("\\.x?html?\\'" . "/usr/bin/firefox %s")
          ("\\.pdf\\'" . default))))