Skip to main content
27 events
when toggle format what by license comment
Jul 18, 2015 at 18:24 vote accept Mark Karpov
Jul 18, 2015 at 6:20 answer added Mark Karpov timeline score: 6
Jul 17, 2015 at 19:55 history edited Mark Karpov CC BY-SA 3.0
and how is this "not clear what you are asking for" now?
Jul 17, 2015 at 19:07 comment added politza @phils: subr-x.el would be a good place for this.
Jul 17, 2015 at 7:58 history edited Mark Karpov CC BY-SA 3.0
added 1153 characters in body
Jul 17, 2015 at 7:01 answer added gsl timeline score: 3
Jul 17, 2015 at 1:07 comment added Drew I agree with @wasamasa. There is much that is fallacious, misleading, or unclear in the question. You say you are "searching for gensym function. There is no such function!". The function is there; it is make-symbol. But then you go on to ask about with-gensyms - which is anyway not part of Common Lisp, and which people have anyway shown the (trivial) code for. You complain that you want a "collection of standard abstractions given without need to reimplement them again and again." But which such abstractions? Nothing clear specified by this question in that regard. Voting to close.
Jul 16, 2015 at 22:03 review Close votes
Jul 17, 2015 at 11:15
Jul 16, 2015 at 22:01 comment added phils Mark: M-x report-emacs-bug and suggest that org-with-gensyms be extracted and renamed to with-gensyms (or maybe cl-with-gensyms, depending on where it is most sensibly relocated to) for more general use.
Jul 16, 2015 at 21:45 comment added wasamasa I'm voting for a close as I have no clue what the actual question is. That aside, the reasoning is fallacious. Emacs Lisp is different from Common Lisp, best practices are more of a joke and Lisp hackers generally do what is practical for them, such as writing a small utility macro and leaving it at that.
Jul 16, 2015 at 21:35 comment added Mark Karpov @wvxvw, why oh why they don't write doc-strings! This can be used, but we need to generate list of gensymed symbols before pattern matching it, and that's cumbersome, equal to rewriting of with-gensyms. Thanks for the link, though.
Jul 16, 2015 at 21:22 comment added wvxvw Anyhow, see if mbe-bind from the library I mentioned won't do the same thing. It's not exactly with-gensysms it's more like destructuring-bind, but it's a macro, meaning that all symbols used in it are fresh ones.
Jul 16, 2015 at 21:18 comment added Mark Karpov @wvxvw, yes, but CL has its Alexandria, which is kinda standard library to use in most cases.
Jul 16, 2015 at 21:13 comment added wvxvw Well, iirc with-gensyms is from Alexandria, it isn't standard CL either. Disclaimer: I didn't use this library, but I'm convinced that hygienic macros are better for many purposes than CL-style ones, and here's a library that claims to implement them in ELisp: github.com/ijp/mbe.el . Perhaps, if you are looking for a library to do a lot of macrology, this can come in handy.
Jul 16, 2015 at 20:55 history edited Dan
edited tags
Jul 16, 2015 at 20:20 comment added Mark Karpov @wasamasa, given limited number of letters we can use, I won't. There are unfair things in naming ELisp packages though, for example you are advised to use prefixes everywhere and this is OK, because we need to emulate namespaces, but special packages don't give a f***, they can use two-letter prefixes whenever they want and use / Clojure styled delimiters (not advised), although their names are not two-letter symbols. What the f*** multiple cursors prefixes everything with mc/ ? Is it unique package with such a right? Get it prefix everything with multiple-cursors-.
Jul 16, 2015 at 20:09 comment added wasamasa Please don't put it on MELPA unless there is overwhelming interest in yet another single-letter library.
Jul 16, 2015 at 19:59 answer added Drew timeline score: 1
Jul 16, 2015 at 19:36 comment added Mark Karpov @wasamasa, I think I will just write a library and put it on MELPA for a start. This should include all the missing stuff and maybe a bit more. It could be called m (for macros). If there is already something like this, I will use that instead.
Jul 16, 2015 at 19:34 comment added wasamasa Welcome to Emacs Lisp coding!
Jul 16, 2015 at 19:02 comment added Mark Karpov @Dan, Oh I see that there is org-with-gensyms. This means that every package should redefine the same thing...
Jul 16, 2015 at 18:56 comment added Mark Karpov @Dan, The problem here is not that it's easy to write / find on the net, but that I'm writing stuff that other people will use and I need a piece of reusable (classic) code to avoid reinventing the wheel. I can't put it into my init file because I'm not planning to ship it with the package I'm writing. I hope I made myself clear now.
Jul 16, 2015 at 18:49 comment added Dan It's also the first hit in a DuckDuckGo search and the second in a Yahoo search; the point is that it's easy-access. There's a lot of older code out there that's not in (M)ELPA. I've not used it and so can't vouch for it, but it's 4 lines of code and could easily be tucked into your init file somewhere.
Jul 16, 2015 at 18:42 comment added Mark Karpov @Dan, I don't use Google, but I've seen this already, although I missed that this is a package (or rather a elisp file). How can I depend on this thing? It's not in ELPA/MELPA, it seems.
Jul 16, 2015 at 18:37 comment added Dan Here's the EmacsWiki page on macro utilities that includes with-gensyms. It was the first hit from a Google search for "emacs with-gensyms".
Jul 16, 2015 at 18:27 history edited Mark Karpov CC BY-SA 3.0
deleted 3 characters in body
Jul 16, 2015 at 18:21 history asked Mark Karpov CC BY-SA 3.0