Git Product home page Git Product logo

Comments (9)

skeeto avatar skeeto commented on June 18, 2024

Unfortunately I don't think there's anything I can do about this. Emacs
is single-threaded and updates run asynchronously. As data arrives, the
handler takes control of the main thread at the next opportunity. If you
happen to hit C-g at this moment, you'll interrupt the thread and cancel
the update for that feed, hence the message.

The alternative would be to do updates synchronously, locking up Emacs
until all feeds have updated, so that when you hit C-g it's obvious
what's going to happen.

from elfeed.

sabof avatar sabof commented on June 18, 2024

I've successfully used inhibit-quit with project-explorer, which also does asynchronous processing.

from elfeed.

sabof avatar sabof commented on June 18, 2024

I've edited the original post, not sure if you've noticed.

from elfeed.

skeeto avatar skeeto commented on June 18, 2024

I was just going off the original e-mail so I didn't see your update. I didn't know about inhibit-quit until just now. It seems Emacs has a hack available for anything!

I just made a commit (53e9102) that uses inhibit-quit. This helps a little bit, but it's still possible (and likely) for C-g to interrupt before I'm able to set inhibit-quit in the callback. Is there a better way to do this?

from elfeed.

sabof avatar sabof commented on June 18, 2024

Interrupted while url-retrieve is active? I don't think it's affected by C-g.

from elfeed.

skeeto avatar skeeto commented on June 18, 2024

With this change in place, I was tapping C-g once every few seconds during an update and was getting errors like these:

error in process filter: Transfer interrupted!
error in process filter: url-http-mark-connection-as-busy: Transfer interrupted!
error in process filter: url-http-generic-filter: Transfer interrupted!
error in process filter: url-http-wait-for-headers-change-function: Transfer interrupted!

This is all outside the callback where I have control.

from elfeed.

sabof avatar sabof commented on June 18, 2024

I don't think you can. You can have a look at url-http-debug to see why.

from elfeed.

sabof avatar sabof commented on June 18, 2024

I guess you could wrap the process filter and sentinel, to at least prevent state corruption. Something along these lines

(let* (( process
         (get-buffer-process
          (url-retrieve url cb nil :silent)))
       ( filter (process-filter process)))
  (set-process-filter process
                      (lambda (&rest args)
                        (condition-case error
                            (apply filter args)
                          (error
                           (STUFF)
                           )))))

from elfeed.

skeeto avatar skeeto commented on June 18, 2024

This should mostly be fixed by the switch to the curl backend: Elfeed, cURL, and You

from elfeed.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.