Is there a reason so few packages seem to use transaction queues (tq-enqueue etc.) for communication with external processes? Most of the packages I have looked at seem to prefer the regular filter mechanism.

  • I suspect a combination of people just skipping that part of the manual or just reading about filters and transaction queues looking weird and not being powerful/flexible enough. – wasamasa Feb 4 '15 at 19:19
  • 1
    Not to be nitpicky, but the body and title are somewhat different questions here. :-) – Malabarba Feb 4 '15 at 20:09
  • To keep it in line with my sentiment and to answer the titular question: Never. Unless you're maintaining legacy code using it. – wasamasa Feb 4 '15 at 20:21
  • 4
    Why never ? (That's all I have to say.) – politza Feb 4 '15 at 20:25

One thing to know about Emacs is that there are a lot of obscure libraries that come with it. And, far from being a historical oddity, more go into the tree all the time. Many times these were written for a single use.

There's no single reason such things aren't reused. Maybe it didn't fit some uses, maybe some authors didn't know of it, etc. In your case for tq.el the answer is the same -- use it if it is a good fit for your problem. To me it seems a bit under-general; e.g., there's no way to queue a regexp without also sending a string. Also it's a bit old-fashioned with the "closure" arguments; these are unnecessary now that Emacs has lexical binding.

There's also some library duplication in Emacs. So for example there are both ewoc.el and tabulated-list.el, two different ways to accomplish a sort of MVC-ish task.

| improve this answer | |
  • Indeed, I had no idea this library existed! Emacs really has too much stuff built-in--the current plan to extract things into ELPA is definitely a good idea. – Tianxiang Xiong May 11 '17 at 17:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.