Skip to main content


So, I've been using nov.el for #emacs to read epubs. It does a pretty decent job of it, but I have one point of irritation: I can't for the life of me find a way to tell how far through the book I am. Is there some way to see this?

reshared this

in reply to Jonathan Lamothe

Nov.el is on my list of things to do when I get back to working on my config. But do you not display your file location in your modeline?

I'd have to fire it up and check, but I'd expect my usual modeline indicators to be there.

in reply to Zenie

@Zenie The mode line shows the position in the current buffer. The buffer displays the current chapter. Thus, it shows your position in the current chapter, not the book overall.


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. 🙃

#emacs #lisp

in reply to Jonathan Lamothe

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.

in reply to Kazinator

@Kazinator I feel that that would have been much more useful information. nil is about the least useful failure state there is.


Fine, I'll build an #emacs pivot table package for #org-mode.

reshared this

in reply to Jonathan Lamothe

Possibly related: github.com/tbanel/orgaggregate , could always use an easier interface =)
in reply to Sacha Chua

it's only a matter of time before Org obsoletes SQL /j
in reply to Sacha Chua

@Sacha Chua This looks like it could solve my problem but I've already started down the rabbit hole.
in reply to Jonathan Lamothe

haha, no worries, I'm sure your adventure will help you learn interesting things!


The seemingly canonical way of detecting whether the C-u modifier was used on an interactive function call (when an actual numerical argument wasn't provided) in #elisp feels... icky. #emacs
in reply to Jonathan Lamothe

To be fair C-u *is* a numerical argument so you're not really meant to differentiate (it means the number 4). 😅
in reply to Alessio Vanni

@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.



Me: I'm just going to specify these #org-mode table formulas so that they can be executed sequentially to update this whole table in a single pass.

org-mode: Hey bro, let me automatically sort those by position for you. You're welcome.

Me: 🤦‍♂️

#emacs



Wrapping my brain around using #org-mode as a spreadsheet. Is there a way to pass a range of cells as a vector to a custom function? Ideally, I'd like to embed this function into the file itself. #emacs

bjb reshared this.

in reply to Jonathan Lamothe

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)

#+end src

#+RESULTS:
| 1 | 16 |
| 4 | 25 |
| 9 | 36 |



I wonder how difficult it would be to introduce rudimentary namespaces into #elisp.

#emacs

Harald reshared this.

in reply to Jonathan Lamothe

Just learned about interned vs. uninterned symbols. Feels like this would be a big piece of this puzzle.


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

in reply to 🇺🇦 Myke

@🇺🇦 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.

Julio Jimenez reshared this.

in reply to Jonathan Lamothe

I'd been told that there were add-ons that could do things like making vim more Emacs-like, but I never saw the point in spending energy to make some arbitrary tool more like the one I was already using for no particular reason.


I've been an #Emacs user for probably about two decades. Despite this, I only recently learned that ELPA and MELPA are not the same.

reshared this



Today I somehow fumbled an #org-mode keyboard command and made a file into an attachment on itself. I didn't know that was possible.

Fortunately, revision control came to the rescue.

#emacs #git



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:nil
in reply to Arjen :emacs: :linux: :nixos:

Since the manual doesn't include examples, it can be confusing as to how to actually use those settings. For this case, add the following line:

#+OPTIONS: toc:nil num:nil

This entry was edited (3 months ago)


Does anyone know if #org-mode has a way to specify a repeating scheduled item in UTC time? I have a few of these, and don't want to have to adjust them all when the clock changes. #emacs

reshared this

in reply to Jonathan Lamothe

Maybe a answer : org-mode utc
in reply to lann

@lann This is close to what I'm looking for. Ideally, I'd like to be able to do something like set a property on a headline that says "treat everything in this subtree as UTC".
@lann


So, for the last few days, #Emacs has been glitching out on me. When I'd try to do certain things, it'd complain about an undefined variable and then just refuse to do the thing I asked it to do. Today, it started doing this when I tried to list the manuals.

I deleted the cache files and restarted it. Everything's fine now. I'm glad it's fixed, but... really?

in reply to Jonathan Lamothe

Do you use emacs.desktop files, eg with desktop-save? I've also had strange goings-ons where starting emacs gives errors and even C-x C-c doesn't work. Removing the .emacs.desktop file in use resolves it.
in reply to mocom

@mocom I think this is what broke it.


I think the problem started when I installed the org-mode package from M-x list-packages even though it was already installed via apt. I removed it again, but I think it broke things.

in reply to Jonathan Lamothe

org is a built in package :
  org                            9.5.5          built-in              Outline-based notes management and organizer

So no reason to install it


TIL that #Emacs' built-in web browser is named eww.

That seems an appropriate name for a web browser, tbh.



Why does #Debian's #Emacs package not include the documentation?

Turns out that's in the emacs-common-non-dsfg package... obviously.

in reply to Jonathan Lamothe

because emacs' manual is licensed under dsfg (EDIT: i meant gfdl, lol) which is not free in debian's perspective
This entry was edited (6 months ago)
in reply to Jonathan Lamothe

Links to a lot of the background on the many, many discussions that happened around the GFDL and its compatibility with the DFSG:

wiki.debian.org/GFDLHistory



Is there a way to tell org-mode's agenda view not to show completed to-dos and schedule entries that are more than say a week past completion?
#emacs

reshared this

in reply to Jonathan Lamothe

```
;; to the first question: not to show completed to-dos in agenda view
(setq org-agenda-skip-scheduled-if-done t)
```

#orgmode



I've been an #Emacs user for a long time because it's just what I got used to. I had no particular loyalty to it.

The more I dig into org-mode though, the more I see it as its killer feature though. This alone is enough to keep me from ever switching to another editor.

Please note: if you like another editor better, that's perfectly fine. Use what works for you. For the love of God, I'm not trying to spark an Emacs vs. vim flame war.

in reply to Jonathan Lamothe

org-mode is too slow for me. I load it up like "I have to wait 20 seconds for a file to load? For this?" It's 2024 ffs
in reply to Jonathan Lamothe

I keep not-quite fully embracing org-mode because I spend too much time outside of Emacs (e.g. on mobile devices). I probably just need to work out some scripting to dump into an inbox queue.

Plus work being absolutely inflexible about not letting work sync to anything else, though it helps enforce life boundaries. 😀



Despite having been an #Emacs user for years, I know I've only scratched its surface. I finally decided to start looking into org-mode (I blame @screwlisp for this) and, it's actually pretty damn cool.

reshared this

This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.