Your question is a little confusing, but I suspect you actually mean that you've byte-compiled the prelude-ivy.el library (as opposed to "reading the source file"), and that the compiler has produced a warning that the function prelude-require-packages is not known to be defined (n.b. not "prelude-required-packages", which does not appear anywhere in the ...
You almost have it: drop the quote from the apply-partially form so that it reads:
:filter (apply-partially 'my-pass-it-on-filter "/tmp/mytmp")
The point is that apply-partially returns the function you want.
While we are here, the message form has an extra sets of parens around it.
If you load library cl.el then C-h f oddp tells you this:
oddp is an alias for cl-oddp in cl.el.
Return t if INTEGER is odd.
This function does not change global state, including the match data.
oddp is defined as an alias defined in cl.el. But your error message tells you that oddp is not defined. This is because cl.el has not yet been ...
Assuming you are using dynamic binding you can search through the obarray for your value:
;;; Assumes dynamic binding. This is a macro because a function would
;;; introduce more bound variables that could hide the thing we're
;;; looking for.
(defmacro find-local-val (val)
(let ((sym-var (make-symbol "sym"))
(val-var (make-symbol "val")))
symbol-function can return an actual function object for the
argument symbol, which would be displayed as its printed
representation (either a lambda form or compiled byte-code -- but
you could load the uncompiled version of the library to avoid the
More precisely, it returns the value of the symbol's function
cell. Besides a function object, other ...
You can use symbol-function to obtain the current function slot value for a given symbol, which is typically what you'd be after here.
You can store that value anywhere you want, and restore it later (perhaps with fset).
I tried fset but that creates rather something like an alias from a new name to the old name, but it does not save the old definition...
You'll end up doing it the same way most programming modes do syntax highlighting: by matching regular expressions against the buffer contents. You'll want to search backwards for the beginning of the function, and then search forwards from there to find the end of it.
Using LSP is a nice idea, but the protocol doesn't deal in the actual syntax of the ...
The package org-fstree is very old.
The correction code below fixes several problems in the elisp file org-fstree.el of the package.
It also prepares the package for autoload. That means that the hooks and functions that work as entry points of the package are marked as auto-loaded. The package is only loaded on demand when one of those is really called.
Notice that your code will misbehave if ad-do-it ends up signalling an error (so the subsequent fset is not executed any more to restore the normal state).
Here's a slightly more verbose way to get what you want, which I think works better (e.g. it lets C-h f show you what's going on, and it does not misbehave when you use the new threading facilities):
Both fset and defalias can point to a symbol or its current function definition, depending on whether you pass them the symbol or symbol-function applied to the symbol. The latter gets the value of symbol-function at the time of aliasing. The former gives you the value of symbol-function at the time the alias in invoked - it is essentially an indirection.