Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ok, so cooooolest thing ever with org mode I found out the other day is that you can refer table cell results from your paragraphs:

  #+CAPTION: Constants
  #+NAME: tab_constants
  | Constant                  | Value |
  |---------------------------+-------|
  | A                         |     1 |
  | B                         |    90 |
  | C                         |    90 |
  | D                         |    12 |
  | *Total*                   |  240. |
  #+TBLFM: @6$2=@2 * @5 / ((@3 + @4) / 60 / 60)

  We come to the conclusion that with src_emacs-lisp[:var d=tab_constants[2,1]]{d} VR rig constantly busy for src_emacs-lisp[:var d=tab_constants[5,1]]{d} hours.
  Resulting in src_emacs-lisp[:var d=tab_constants[6,1]]{d} people going through the experience.
And with this, whenever I change the constants in my table, my whole document updates. I find that insane. No more having to update numbers everywhere in the document everytime I change an input in my tables. Then you can just export to anything (I do org->html->princexml->pdf for easy CSS styling, but you can do org->latex->pdf beem).

I've also been giving it a try for brainstorming code and todos on side projects. Here's an example, it started by being pseudo code for some code, then basic python (because it was so close to my pseudo code, then I started implementing elisp in TDD inside my ord-mode doc. So it evolved like that: notes->pseudo code->tdd in the same doc:

  * Flow.el TODOs 
  ** DONE projectile-find-type-file
     CLOSED: [2018-03-07 Wed 22:12]

  ...

  *** Check buffer file ends with test

  #+begin_src emacs-lisp
  (defun get-styles-file ()
    ...)

  ;;;;;;;;;;;;;
  ;;; Tests ;;;
  ;;;;;;;;;;;;;

  (get-styles-file) ; /..path../notesStyles.org

  #+end_src

  #+RESULTS:
  : /home/thomas/config/spacemacs/flow/notesStyles.org
What's really cool about orgmode rather than MS word is that it's text, so easily portable and gitable. You get powerful track changes for your documents.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: