l3kn / org-fc

Spaced Repetition System for Emacs org-mode
https://www.leonrische.me/fc/index.html
GNU General Public License v3.0
259 stars 31 forks source link

Org-fc shell error #42

Closed ghost closed 4 years ago

ghost commented 4 years ago

For a file with this content:

* Test :fc:
New

I get this error:

if: org-fc shell error: [REDACTED DATE]
(
)

I'd like a hint as to what is going on

ghost commented 4 years ago

Right, forgive me. I read the code and realized that it is directly piping the output from the "shell", and my fish shell, when initialized, always prints the date in the first line.

I've fixed it for myself by commenting out that line in my fish config, but I do consider this an issue that ideally should be resolved so awkward workarounds aren't necessary, so I will leave this up here.

l3kn commented 4 years ago

I think this can be fixed by wrapping all calls to shell-command-to-string in a (let ((shell-file-name "/bin/bash")) ...), although it might break on systems where bash is not installed (at that location).

The shell commands could also go into separate files, in that case I'd need to figure out how to pass the directories and awk variables.

Do you have a better idea how to fix this?

ghost commented 4 years ago

Can we use sh? I doubt sh can be customized like bash and fish. Also, sh is almost always in /bin/sh.

Honestly, this is still a workaround. I guess this is either an emacs or a fish issue that causes emacs to parse output when you initiate a shell instead of just piping an input and getting that output.

l3kn commented 4 years ago

Closing, moved to https://todo.sr.ht/~l3kn/org-fc/3