reshared this
Jonathan Lamothe likes this.
Just spent a good half hour pulling my hair out trying to figure out why one of the #elisp functions I had just written was always returning nil when I tested it. Turns out, my test was mistakenly passing its inputs to the wrong (but similarly named) function (pivot-table-get-columns instead of pivot-table-get-body).
#Haskell's type system would've caught this. 🙃
C's type system would also have caught it, and it isn't worth a hill of beans.
By caught it what do we mean? This is not a case of some undetected error escaping your attention due to dynamic typing. You know you got a nil which is unexpected and wrong. It's in a test case which catches it.
The only thing a type system would change is that you would instead waste a half hour not understanding how your obviously correct function call can possibly have the wrong return type.
nil is about the least useful failure state there is.
GitHub - tbanel/orgaggregate: Aggregate tables in Org mode
Aggregate tables in Org mode. Contribute to tbanel/orgaggregate development by creating an account on GitHub.GitHub
Jonathan Lamothe likes this.
@Alessio Vanni Yeah, it's just very magic number-ey.
Ah well, such is the way it is with legacy code sometimes. No way to change it without breaking about a billion other things.
like this
I like using org tables with org-babel like so:
#+NAME: test
| 1 | 4 |
| 2 | 5 |
| 3 | 6 |
#+begin src emacs-lisp :var test=test
(mapcar
'(lambda (r)
(mapcar '(lambda (x) (* x x)) r)) test)
#+RESULTS:
| 1 | 16 |
| 4 | 25 |
| 9 | 36 |
I have successfully built my first #Emacs package. I want to clean it up a bit before I consider releasing it though. Also, while I can build a simple (single file) package, buildig a multi-file one is still eluding me.
When I try to install it, I get the following (less than helpful) error message:Wrong type argument: stringp, nil
Is there a way I can get more detail on why this is failing?
reshared this
here’s a large project, still in one file:
GitHub - protesilaos/denote: Simple notes for Emacs with an efficient file-naming scheme
Simple notes for Emacs with an efficient file-naming scheme - protesilaos/denoteGitHub
@🇺🇦 Myke Yes, it can be done that way as well.
That still doesn't negate the point that I want to know how to build a multi-file package.
Besides, sometimes I like to learn stuff just for the sake of learning it.
I've been an #Emacs user for like 20 years because there was one thing I needed to do back then that was made easier by elisp, and I just got used to using it. In all that time, I hardly ever tinkered much with the config, save a few minor tweaks it was pretty much stock. I had no strong feelings about Emacs in general, it was just the text editor I'd grown comfortable with.
I've recently been diving into #Lisp and poking around with my Emacs config, and after all these years, I think I'm starting to get the appeal. I am still a proponent of "use the tool that works for you", but I'm personally firmly on team Emacs now.
like this
Julio Jimenez reshared this.
reshared this
Is there a way to tell #Emacs #org-mode to omit yhe TOC and headline numbers when exporting to a text or markdown file? I'm trying to implement a #JohnnyDecimal system, so I'm supplying my own numbers and the 00.00-index.org file essentially is the table of contents.
Edit: Because not all replies federate, here's the solution I ended up with:
#+STARTUP: overview indent nonum
#+OPTIONS: toc:nillike this
Jonathan Lamothe likes this.

Martin Stemplinger
in reply to Jonathan Lamothe • • •Jonathan Lamothe
in reply to Martin Stemplinger • •Henry
in reply to Jonathan Lamothe • • •Agenda view of the current buffer
Stack Overflowlann
in reply to Jonathan Lamothe • • •emacs > org mode > agenda - always use current buffer
Stack Overflowa world without cars
in reply to Jonathan Lamothe • • •Per the help doc for org-agenda
"If the current buffer is in Org mode and visiting a file, you can also
first press ‘<’ once to indicate that the agenda should be temporarily
(until the next use of ‘SPC o a’) restricted to the current file.
Pressing ‘<’ twice means to restrict to the current subtree or region
(if active).
"
In other words, execute org-agenda then press "<" before the command you want to run against the agenda.
a world without cars
in reply to a world without cars • • •Jonathan Lamothe
in reply to a world without cars • •@a world without cars I have a markdown plugin on my Friendica server. I just put it between backticks like this:
`org-agenda-files`.This wouldn't work on Mastodon though.
a world without cars
in reply to Jonathan Lamothe • • •Jonathan Lamothe
in reply to a world without cars • •lou.
in reply to Jonathan Lamothe • • •you could do something like this
```
(defun my/file-agenda ()
(interactive)
(when-let ((org-agenda-files (list (buffer-file-name (current-buffer)))))
(org-agenda)))
```