On 8/11/22 12:26 AM, Ihor Radchenko wrote: > Hraban Luyat writes: > >>> Is there any problem with the following? >>> >>> (alist-get :tangle params) >> >> This bit of code was moved, I didn't write it. The original code uses a >> variable `src-tfile' which isn't available here, so I reused the >> definition of that variable (which is (cdr (assq yada yada))). When >> creating this patch, I tried to change as little as possible, to keep >> everything the same as much as I can. Don't write new code, just move >> existing code around. >> >> The (cdr (assq ..)) is used in some other places, too; maybe it's worth >> a separate refactor if we want to change that? I'd rather keep this >> patch as isolated as possible. > > I suspect that alist-get was not there in Emacs 24. > Otherwise, alist-get with no optional parameters is just a wrapper for > (cdr (assq...)) > > We can change it, though I do not see this as a big problem. > >> @Ihor: I have rebased the patch and attached it. > > Sorry, but the patch still does not apply on my side onto the current > main branch. Just rebased and recreated it. Based off 6acc58c9c6bcfd45dcc5964cac7e3df8347121cc. @Max: what do you think of when-let? That seems more appropriate for this situation. Thoughts? > > -- > Ihor Radchenko, > Org mode contributor, > Learn more about Org mode at https://orgmode.org/. > Support Org development at https://liberapay.com/org-mode, > or support my work at https://liberapay.com/yantar92