Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [aliases]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
2 answers
44 views

How to create an independent copy of a function's definition?

I want to create a modified copy of re-search-forward and advise this copy to be sensitive to isearch-filter-predicate. I tried: (defun make-search-sensitive-to-ifpmod-advice (orig-fun &rest args) ...
Gabriele's user avatar
  • 1,618
1 vote
0 answers
70 views

What is the advantage of major-mode-remap-alist?

I've had this in my init file about forever: (defalias 'perl-mode 'cperl-mode) ;cperl is much nicer Now I learned about major-mode-remap-alist in Emacs 29.1 which I had installed shortly after ...
q.undertow's user avatar
2 votes
1 answer
375 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'" ...
raylight's user avatar
  • 237
0 votes
1 answer
62 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 ...
Virgil's user avatar
  • 3
2 votes
1 answer
293 views

How can I create an alias for a function name?

Does Elisp allow the equivalent of an alias for a function name?
Dilna's user avatar
  • 1
0 votes
1 answer
78 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" ...
Dargscisyhp's user avatar
0 votes
0 answers
35 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 ...
BuddhiLW's user avatar
  • 297
0 votes
0 answers
162 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 ...
W.M.'s user avatar
  • 113
0 votes
1 answer
60 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 ...
Trung Ta's user avatar
  • 301
2 votes
1 answer
328 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 () (...
untore's user avatar
  • 141
0 votes
2 answers
581 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 ...
artscan's user avatar
  • 445
1 vote
1 answer
177 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 ...
Kadir Gunel's user avatar
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?...
Antoine's user avatar
  • 205
1 vote
0 answers
70 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: ...
sparkecho's user avatar
1 vote
2 answers
176 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 '...
Tom's user avatar
  • 45
0 votes
2 answers
457 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 ...
Microsoft Linux TM's user avatar
2 votes
1 answer
349 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 ...
JCC's user avatar
  • 1,029
9 votes
1 answer
215 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 ...
Joseph Garvin's user avatar
1 vote
1 answer
650 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 ...
Sum Proxy's user avatar
2 votes
1 answer
254 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) (...
Nsukami _'s user avatar
  • 6,531