reshared this
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 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.
you could do something like this
```
(defun my/file-agenda ()
(interactive)
(when-let ((org-agenda-files (list (buffer-file-name (current-buffer)))))
(org-agenda)))
```
Quiou 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.

Jonathan Lamothe
in reply to Jonathan Lamothe • •cloud.jlamothe.net/index.php/s…
#AskFedi
reshared this
screwlisp and vejeta ☑️ reshared this.
Jonathan Lamothe
in reply to Jonathan Lamothe • •FWIW it seems to be complaining that the package description is
nil. Two things about this:define-packagelists this argument as optional.Jonathan Lamothe
in reply to Jonathan Lamothe • •screwlisp
in reply to Jonathan Lamothe • • •• (eepitch-shell)
cd foo
tar xvf testpackage-0-0.tar
• (add-to-list 'load-path "~/foo/testpackage-0.0")
• (load "testpackage")
• (apropos "testpackage")
=>
testpackage-func is an interactive Lisp function in ‘testpackage.el’.
(testpackage-func)
A test function
[back]works on my machine
@sacha
Jonathan Lamothe
in reply to screwlisp • •@screwlisp @Sacha Chua When I try to install it with
M-x package-install-fileit gives me:Wrong type argument: stringp, nilWhen I use the debugger it seems to be caused by it thinking the package description is
nil? I'll try to dig deeper.screwlisp
in reply to Jonathan Lamothe • • •@sacha
GitHub - melpa/melpa: Recipes and build machinery for the biggest Emacs package repo
GitHubscrewlisp
in reply to screwlisp • • •mousebot
in reply to screwlisp • • •mastodon.el/lisp/mastodon.el at main
Codeberg.orgscrewlisp reshared this.
Jonathan Lamothe
in reply to screwlisp • •@screwlisp @Sacha Chua Yeah, I can build simple packages, but the description for how to build a multi-file package seems not to work.
Most packages are distributed in the simple format, but if you want to include a manual for instance, you need a multi-file package.
screwlisp
in reply to Jonathan Lamothe • • •If we look at Xahlee's site here: xahlee.info/emacs/emacs/elisp_… he notes that
"The terms “Package” and “Library” do not have technical meaning in elisp.
The term “module” is not used by emacs."
} really, we are concerned with writing modes for emacs. Packaging them for distribution means meeting the package-source's requirements for the mode to be built and then distributed from a git, e.g.. That is my other 25 cents ;p.
Elisp: load, load-file, autoload
xahlee.infoscrewlisp
in reply to screwlisp • • •This is different to #commonLisp in which I might
CL-USER> (uiop:define-package foo)
#<"FOO" package>
CL-USER> (in-package foo)
#<"FOO" package>
FOO> (defvar bar)
BAR
FOO> (export 'bar)
T
} this is not an emacs idiom. Similarly, common lisp does not have a notion of interaction major and minor modes like emacs does. I guess package in emacs means something similar to system in the de facto asdf sense in common lisp. In my opinion this collision is confusing.
Jonathan Lamothe
in reply to screwlisp • •gnu.org/software/emacs/manual/…
Sacha Chua
in reply to Jonathan Lamothe • • •Submitting a Package to NonGNU ELPA
Bozhidar Batsov (Emacs Redux)Jonathan Lamothe
in reply to Sacha Chua • •@Sacha Chua @screwlisp Yeah, that's essentially what I'm trying to do. My eventual goal is to create my own semi-private ELPA archive, mostly because I don't want to bother people with having to review my probably terrible novice code before including it in their archives. 🙃
None of this code is really ready for public consumption yet. It's more of a learning exercise.
screwlisp
in reply to Jonathan Lamothe • • •I picked a trivial multifile package example, seq:
Tree: gitweb.git.savannah.gnu.org/gi…
A package of three files, seq.el, seq-24.el and seq-25.el, and if you are in emacs 25 or later, seq.el requires seq-25 or seq-24 otherwise. Presumably your multi-file elisp project should meaningfully resemble seq e.g. with the conventional package headers.
Then, I think you are basically looking for quelpa: github.com/quelpa/quelpa
@sacha
GitHub - quelpa/quelpa: Build and install your Emacs Lisp packages on-the-fly directly from source
GitHubJonathan Lamothe
in reply to screwlisp • •@screwlisp @Sacha Chua What's interesting is that this package seems to be lacking a
seq-pkg.elfile. 🤔Edit: Wait, it's in
.gitignore?Is it being auto generated somehow?
screwlisp
in reply to Jonathan Lamothe • • •@sacha
screwlisp
in reply to screwlisp • • •> (directory "~/.emacs.d/elpa/seq-2.24/*.*")
(#P"~/.emacs.d/elpa/seq-2.24/seq.elc"
#P"~/.emacs.d/elpa/seq-2.24/seq-25.elc"
#P"~/.emacs.d/elpa/seq-2.24/seq-24.elc"
#P"~/.emacs.d/elpa/seq-2.24/seq-autoloads.el"
#P"~/.emacs.d/elpa/seq-2.24/seq-25.el"
#P"~/.emacs.d/elpa/seq-2.24/seq-pkg.el"
#P"~/.emacs.d/elpa/seq-2.24/seq.el"
#P"~/.emacs.d/elpa/seq-2.24/seq-24.el")
if you will forgive some of the-other-lisp ;p
@sacha
Jonathan Lamothe
in reply to screwlisp • •@screwlisp @Sacha Chua What I'm curious about is how it made the determination that
seq.elwas the main file. This is fairly obvious with my human intuition. Was it just because all the other.elfiles started withseq-, or was it doing something more fancy by looking at the contents of the files and seeing what requited what?Edit: Ah, I bet it has to do with the fact that only
seq.elhad;; Package:and;; Version:lines, which explicitly set the package name (and version).Jonathan Lamothe
in reply to Jonathan Lamothe • •Sacha Chua
in reply to Jonathan Lamothe • • •Jonathan Lamothe
in reply to Jonathan Lamothe • •Ah. I assume that this would live somewhere near the top of my
testpackage.elfile?Edit: Looking at other examples, it tends to be found at the bottom.
Zenie
in reply to Jonathan Lamothe • • •You could try package-build-create-recipe
It will need to be filled in, but if your headers are correct, with author, packages-required, version, etc.
Edit the recipe for your git. You'll be in recipe mode.
Saving it puts it in .../elpa/recipes/
Building it with C-c C-c will make a package and install it in your elpa..
That might teach you what you need.
It will automatically pick up .el and .texi files.
Not eld, but if you have some odd file, you can add the pattern to the recipe. I have an eld which is not in the list of automatic files.
See the contributing doc at GitHub Melpa.
Jonathan Lamothe likes this.
Zenie
in reply to Zenie • • •You want something like this?
oitofelix.github.io/elpa/
See the link to elpa-deploy halfway down.
oitofelix - ELPA
oitofelix.github.io