Questions tagged [aliases]
The aliases tag has no usage guidance.
18
questions
2
votes
1
answer
235
views
Is there any way of making eshell aliases using bash and zsh aliases syntax?
Let's say I have a file called .alias in my $HOME directory with the following content:
alias "my-first-alias"="ls -lha"
alias "my-second-alias="echo 'Hello World'"
...
0
votes
1
answer
41
views
Redirect change made to a variable to another variable
I have variables foo and bar. I have a function that modifies foo and I can't change that function.
How can I redirect the change made to foo so it applies to bar instead?
EDIT :
I want this ...
1
vote
1
answer
112
views
How can I create an alias for a function name?
Does Elisp allow the equivalent of an alias for a function name?
0
votes
1
answer
64
views
(set-eshell-alias!) for mv causes error: missing destination file or directory
In doom emacs, I'm setting some aliases in my config as follows:
(set-eshell-alias!
"ls" "exa --icons $*"
"doomsync" "~/.emacs.d/bin/doom sync"
...
0
votes
0
answers
34
views
I want to make an alias to `org-babel-execute:emacs lisp`. the problem is with the space on `emacs lisp`
I'm using org-beamer exporter, and I would like to do the following:
(defalias 'org-babel-execute:emacs-lisp lisp 'org-babel-execute:emacs lisp)
My problem is 'org-babel-execute:emacs lisp has a ...
0
votes
0
answers
126
views
How to create shell aliases in Emacs [GUI] in Windows?
In Linux this can be done by something like:
alias cdwww="cd /srv/www"
In Windows there is an equivalent command called DOSKEY, used for example like this:
doskey ls=dir $*
The above works ...
0
votes
1
answer
44
views
The Emacs eshell alias of CMake doesn't recognize path correctly?
I'm using the Emacs eshell's alias feature to make an alias to the cmake command like below:
$ alias cmake 'cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1'
The alias is created correctly, here is the output ...
1
vote
1
answer
252
views
How to copy a function?
If I get the function definition with
(setq wrapped-copy (symbol-function 'fn))
how can I make a copy such that I can redefine the same function with a wrapped version?
like
(fset 'fn #'(lambda () (...
0
votes
2
answers
501
views
How to create a short name for tramp multihop path?
I connect to various locations, for example:
/ssh:hostname|sudo:hostname:/
/ssh:hostname|sudo:hostname|docker:container:/
and want to have some kind of short aliases for these long paths.
Something ...
1
vote
1
answer
164
views
oddp vs cl-oddp in elisp script
I am trying to write a short script file with elisp for the first time which will serve me to install all the required packages that I use. Thus when I change from one computer to another, I can get ...
3
votes
2
answers
3k
views
two versions of emacs on mac osx - where are they
This has got to be a silly question...
From a terminal window, to start emacs which comes with mac osx (version 22.1.1), I just type
> emacs
First set of questions: where is this emacs installed?...
1
vote
0
answers
59
views
How to set eshell's ls command to different program in different OS?
Since result of /usr/bin/ls is more neat compares with eshell/ls when filenames contain non-lattin Unicodes. I add an alias in ~/.emacs.d/eshell/alias, which makes eshell use /usr/bin/ls as default:
...
1
vote
2
answers
156
views
defalias derived mode to parent mode
I wrote a new major mode config-general-mode, which is derived from conf-mode. I like it a lot and want to have it as the default mode for all configuration files. Thus I tried:
(defalias 'conf-mode '...
0
votes
2
answers
449
views
How replace auto-complete-mode with company-mode in all major mode using it?
How I can replace auto-complete-mode with company-mode in all major mode using it?
i.e. make all modes which activating auto-complete-mode (e.g. c-mode or sh-mode etc), activate company-mode instead ...
1
vote
1
answer
306
views
Can you intercept a function and return your own value using advice?
Is it possible to use advice to not only run your function first, but also prevent the advised function from running at all?
For example, say a command ordinarily calls read-from-minibuffer to get a ...
9
votes
1
answer
211
views
How to create back/forward directory aliases for eshell?
For years I've been using a zsh script that causes a pushd to implicitly happen everytime you change directories. The script also sets up 'b' and 'f' aliases, short for backwards and forwards, that ...
1
vote
1
answer
625
views
eshell alias not working properly
the following alias in the aliases file doesn't work in eshell 2.4.2, emacs 24.4.1
alias ff 'find-file $1'
error message as is is given below
find-file $1: command not found
Any ideas what ...
2
votes
1
answer
252
views
Is there some pitfalls if I define aliases for `cdr` and `car` functions?
I'm often obliged to read the documentation before using cdr and car functions. Is there pitfalls I should be aware of before aliasing those functions in my init file? Like:
(defalias 'head 'car)
(...