Alias, import and defdelegate are a mess?

is a sigil really a plus for that purpose

Sigils is a one way to ‘shortcut’ something, another way is a function with one-letter name (as @josevalim pointed). As I understand, sigils are more preferable to do a compile-time work.

+1 - try to explain a whole problem - it looks like you are trying to solve your problem with a wrong way

I forgot the unquote

@josevalim in fact there is 8 combinaisons:
function or macro, unquoted or not, local or remote.
For pedagogic purpose:

it’s never possible without unquote:
remote function: cannot invoke remote function Shortcuts.remote/1 inside a match
local function: cannot find or invoke local local/1 inside match.
remote macro: cannot invoke remote function Macro.escape/1 inside a match expanding macro: Shortcuts.remote/1
local macro: cannot invoke remote function Macro.escape/1 inside a match expanding macro: Test.local/1

With unquote it’s not possible locally:
local function: undefined function local/1
local macro: undefined function local/1

Remote function and macro work fine.
BTW I need an other module for a simple shortcut, I don’t like that.

The concrete realization of e in comments above depends on your needs, thats because we are asking you about your whole problem. I think, you don’t need Macro.escape at all. For example to match on map keys solution may looks like this:

defmodule Test do
  defmacrop e(kv) do
    quote do

  def me(e(a: 10)), do: :a_key_10
  def me(e(a: 20)), do: :a_key_20
  def me(e(b: _)),  do: :b_key

then in iex:

iex(3)>{a: 10})
iex(4)>{a: 20})
iex(5)>{b: :any})

My problem is to match on map values :innocent:

I legit cannot figure out how to import one module into another. This is the future :joy::joy::joy:

Importing is done via the import call. It will enable you to call functions from the imported module in your current scope without having to qualify them by the module.

So after import Enum, you can write map(list, &(&1+1)) instead of having to write, &(&1+1)).

importing is rarely really necessary, and unless building an EDSL should be avoided.