girzel / ebdb

An EIEIO port of BBDB, Emacs' contact-management package
67 stars 12 forks source link

Stuck in a loop when creating a new person record. #99

Closed mohkale closed 2 years ago

mohkale commented 2 years ago

I seem to be stuck in a loop when entering a new record, where it keeps pressing me for the address.

Reproduction Instructions

  1. Start emacs and load ebdb with ebdb-sources setup.
  2. Run M-x ebdb-create-record.
  3. Enter name, email, number. When at the first address prompt hit C-g to abort repeatedly. After aborting the address-label prompt I'm sent back to the street prompt. Interestingly the number for the street is still 1.

Note: I reverted back to b08a5264ef2609b5cc789dcfe9452b02db384f0f and am no longer seing this issue so it was probably introduced in the last 3 weeks.

girzel commented 2 years ago

Oops! I'd accidentally made it so that address reading caught and swallowed all quit signals, meaning that you couldn't actually quit your way out of the loop, and it constantly asked for a new address. I've changed the code so that, if you input no street information at all, that's interpreted as "I'm all done". So when it prompts for a street, you can either just hit , or you can C-g.

I'll release a new version with this fix in the next day or so. If you get a chance to test it, please come back and close this issue, otherwise I'll close it in a few weeks (or the next time I think of it).

Thanks for the report!

girzel commented 2 years ago

Okay I've already released this, along with some improvements to the read string prompts.

mohkale commented 2 years ago

So when it prompts for a street, you can either just hit , or you can C-g.

Hitting C-g is working again now (thanks) but entering an empty address doesn't stop the prompts for more addresses.

girzel commented 2 years ago

Hmm, I can't reproduce this, either with ebdb-i18n loaded or without. Are you using the internationalization libraries? If not, you should see the address street prompt first: C-g gets me out of that and on to the notes field. If you are, you should see the address country prompt first, but C-g gets me out of that and on to the notes field, as well. I did a sneaky extra update after 0.8.7, and now it's on 0.8.8, is that what you're using? Not that that should make any difference to address reading...

mohkale commented 2 years ago

@girzel

Sorry if I wasn't clear enough, you mentioned you can hit return at the street prompt to skip it or C-g. C-g is working, but returning an empty string doesn't stop the prompts for more street addresses. In regards to your version info question, I'm using straight so there shouldn't be any issue there. I just pulled from master and checked again.

girzel commented 2 years ago

Whoa, no kidding, the string reading function was straight up buggy. I've just pushed the fix; I guess it should be available to you now, which is good because I'd rather not release this straightaway. It's such a fundamental function I wonder if other parts of the codebase are depending on the buggy behavior. I'm going to run this patch for a while and see if anything bubbles to the surface. Thanks for finding this.

mohkale commented 2 years ago

Yep now everythings working, I can enter a blank string and it stops asking for more addresses XD.

kimim commented 2 years ago

i have this problem with recent elpa version 0.8.6

girzel commented 2 years ago

Yes, you'll need to update the package, the most recent version containing the fix is 0.8.7. There's still a little problem with entering empty strings vs C-g, but that will be fixed in the next release.

kimim commented 2 years ago

Thanks. But 0.8.7 is not available on elpa now.

girzel commented 2 years ago

No, only 0.8.8 :)