this post was submitted on 31 Jul 2023
1 points (66.7% liked)

Emacs

310 readers
1 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 1 year ago
MODERATORS
all 15 comments
sorted by: hot top controversial new old
[–] oantolin@discuss.online 3 points 1 year ago (1 children)

I couldn't quickly get this to work, but I'll try harder later. I love mastodon.el by the same person.

[–] blawsybogsy@lemmy.ml 1 points 1 year ago (1 children)

feel free to message me or to open an issue on the repo if you run into issues getting lem.el going. others have already helped me iron out a few getting-started issues.

[–] oantolin@discuss.online 2 points 1 year ago (1 children)

Well, I keeping getting an error message that says: plstore--insert-buffer: GPG error: "Encrypt failed", "Exit".

Do I need to install a GPG executable or a GPG library? What is it even trying to Encrypt, can I turn that off? Why doesn't mastodon.el give me the same error?

[–] blawsybogsy@lemmy.ml 1 points 1 year ago* (last edited 1 year ago) (3 children)

interesting. mastodon.el also uses plstore, so if it works (saving your credentials) your machine's encryption should be working. but the auth process for the two services is totally different, so I had to write the lem.el auth code from scratch. I can take a look at it v soon, I'm keen to have any auth issues sorted out asap.

it'd help if you cd describe when the error message appears, or what exactly you do that causes it.

actually a backtrace would be most useful to track down the error.

you cd also try opening the plstore file in your .Emacs.d folder and encrypting / decrypting it.

thanks!

[–] oantolin@discuss.online 2 points 1 year ago* (last edited 1 year ago) (1 children)

I can see posts in lem! I guessed correctly that issue with GPG was that it really, really wanted a tty, so I tried logging in from emacs -nw and that worked. Once the credentials are stored I can use lem from GUI Emacs! Apparently I need to install some markdown executable... I faked it with ln -s /bin/cat ~/bin/markdown and everything is hideous but useable! 😛

I tried posting this comment from lem and it seemed to work but I can't seem to see it here, so I'm posting again from the browser. I'm getting closer and closer to lem working and am very excited.

EDIT: spoke too soon, now I get DEcryption errors even in emacs -nw. Maybe I'm out of my depth here.

[–] blawsybogsy@lemmy.ml 1 points 1 year ago* (last edited 1 year ago) (2 children)

that's interesting and also pretty frustrating. i didn't think i'd encounter such issues using plstore. are you able to provide a backtrace for the error? it'll show what is calling the encryption functions, and there could be an error before the one displayed. also try manually opening the .plstore file in your .emacs.d directory and encrypt and decrypt it while open. maybe you do just have some plstore problems. / btw, lemmy and lem.el require markdown, so best to install it. the latter requires markdown-mode too.

[–] oantolin@discuss.online 1 points 1 year ago* (last edited 1 year ago) (1 children)

I'll post a back trace later. I understand the dependence on markdown-mode, but why also an external markdown executable? You could just let markdown-mode fontify the text and people can hide the markup symbols if they like. I use markdown-mode a lot and it never once occurred to me that I needed a markdown converter.

EDIT: Things seem to be working now that I have epg-pinentry-mode set to 'loopback, so I won't post the backtrace after all.

[–] blawsybogsy@lemmy.ml 1 points 1 year ago (1 children)

glad you got going!

thanks for opening issues in the repo.

bindings are just work to do. development moving v fast, mainly I'm just still trying to add basic features. eg posting is only 4 days old.

I'm not sure about the markdown issue, I just require markdown-mode. mayb I use a fn in the mode that requires the binary.

Lemmy uses markdown, so to render post content I take the markdown data, render it using markdown-mode, then render the HTML output.

not sure how else to do that, nor how to not rely on markdown mode.

I shd look into it more, but mainly I had to just find my own way, as Lemmy is hardly documented at all.

feel free to make more requests, its easier than fumbling along alone.

[–] blawsybogsy@lemmy.ml 1 points 1 year ago

yeah actually, rendering markdown is what requires the binary

[–] oantolin@discuss.online 1 points 1 year ago* (last edited 1 year ago)

I think the entire problem is that I had epg-pinentry-mode set to nil, I changed it to 'loopback and now things seem to be working properly. I don't understand why lem.el uses a passphrase with GPG while it seems like mastodon.el doesn't. Let's see if posting this via lem.el works!

EDIT: Yep, it worked and editing comments works too! By the way, tons of unbound commands like lem-ui-edit-comment deserve key bindings.

[–] oantolin@discuss.online 1 points 1 year ago

Does that ioctl error in my sibling comment sound like GPG is expecting me to type the password at a tty instead of Emacs or something like that?

[–] oantolin@discuss.online 1 points 1 year ago* (last edited 1 year ago)

Does this help? With debug on error I get two hidden buffers:

*epg* contains:

Process epg exited abnormally with code 2
[GNUPG:] NEED_PASSPHRASE_SYM 9 3 2
[GNUPG:] PINENTRY_LAUNCHED 10719 curses 1.1.0 - dumb :0
[GNUPG:] ERROR get_passphrase 32870
[GNUPG:] CANCELED_BY_USER
[GNUPG:] FAILURE symencrypt 33554531

And *epg-error* contains:

gpg: problem with the agent: Inappropriate ioctl for device
gpg: error creating passphrase: Operation cancelled
gpg: symmetric encryption of '[stdin]' failed: Operation cancelled
[–] oantolin@discuss.online 2 points 1 year ago* (last edited 1 year ago)

Oh, found a new bug: if you are subscribed to communities with the same name on different lemmy instances, lem-ui-jump-to-subscribed will only show you one of them. It used to show all of them before I pulled the latest changes today. (I'm subscribed to communities named emacs on communick.news and on lemmy.ml)

[–] oantolin@discuss.online 1 points 1 year ago* (last edited 1 year ago)

I tried logging into codeberg to create some issues, but apparently I don't know my password anymore and codeberg's "Forgot password?" link is broken (it says it sent me an email but those are lies). So instead I'll just mention the issues I've found here (sorry to monopolize this thread so much), for @blawsybogsy@lemmy.ml:

  1. It seems like my GPG troubles were all solved by (setq epg-pinentry-mode 'loopback), maybe this should be mentioned in the documentation.

  2. I don't think lem.el needs to depend on an external program to render markdown. Instead I suggest just using markdown-mode's fontification, which is a dependency anyway!

  3. I'm not too fond of the emojify dependency either. I have a font with very nice emojis, why do I also need emojfiy downloading tons of images of emojis? Just use the unicode emoji characters directly.

  4. So many useful lem commands are unbound! There isn't even a keybinding to reply to post or comments! It seems like all the commands I would want exist, they just aren't bound in lem-mode-map.

  5. With the code I first cloned from codeberg, the command lem-ui-jump-to-subscribed showed all my communities as options, then I updated and now it seems that if several communities have the same name (I'm subscribed to emacs both on communick.news and on lemmy.ml, for example), only one gets shown as an option.

I think that's it. All in all I'm really enjoying the package, these are really minor complaints.