Skip to main content
added 51 characters in body
Source Link
Silex
  • 821
  • 6
  • 7

[NOTE] this answer was heavily edited to follow the updates of with-editor developments. Most comments likely won't make much sense anymore. There are some new comments which do make sense.


Magit contains a library named with-editor available at https://github.com/magit/with-editor which allows you to use your local Emacs as an $EDITOR on remote machines over TRAMP.

Another alternative is https://github.com/habnabit/remote-emacsclient, but it seems more complicated & less generic.

The simplest way to install with-editor is through MELPA:

M-x package-install with-editor

Otherwise, just grab https://github.com/magit/magit/blob/master/lisp/with-editor.elhttps://github.com/magit/with-editor/blob/master/with-editor.el somewhere to your load path and require it (it also depends on dash).

Then, simply start shell, eshell or ansi-term and do the following:

M-x with-editor-export-editor

It'll ask you which $EDITOR you are interested in, just press enter for the default EDITOR variable. Then inside the shell you can type crontab -e and edit your crontab within emacs. Press C-c C-c to save the crontab or C-c C-k to cancel editing.

If you want a more permanent setup:

(add-hook 'shell-mode-hook  'with-editor-export-editor)
(add-hook 'term-mode-hook   'with-editor-export-editor)
(add-hook 'eshell-mode-hook 'with-editor-export-editor)

Alternatively, you can use M-x with-editor-async-shell-command crontab -e RET for quick commands.

[NOTE] this answer was heavily edited to follow the updates of with-editor developments. Most comments likely won't make much sense anymore. There are some new comments which do make sense.


Magit contains a library named with-editor which allows you to use your local Emacs as an $EDITOR on remote machines over TRAMP.

Another alternative is https://github.com/habnabit/remote-emacsclient, but it seems more complicated & less generic.

The simplest way to install with-editor is through MELPA:

M-x package-install with-editor

Otherwise, just grab https://github.com/magit/magit/blob/master/lisp/with-editor.el somewhere to your load path and require it (it also depends on dash).

Then, simply start shell, eshell or ansi-term and do the following:

M-x with-editor-export-editor

It'll ask you which $EDITOR you are interested in, just press enter for the default EDITOR variable. Then inside the shell you can type crontab -e and edit your crontab within emacs. Press C-c C-c to save the crontab or C-c C-k to cancel editing.

If you want a more permanent setup:

(add-hook 'shell-mode-hook  'with-editor-export-editor)
(add-hook 'term-mode-hook   'with-editor-export-editor)
(add-hook 'eshell-mode-hook 'with-editor-export-editor)

Alternatively, you can use M-x with-editor-async-shell-command crontab -e RET for quick commands.

[NOTE] this answer was heavily edited to follow the updates of with-editor developments. Most comments likely won't make much sense anymore. There are some new comments which do make sense.


Magit contains a library named with-editor available at https://github.com/magit/with-editor which allows you to use your local Emacs as an $EDITOR on remote machines over TRAMP.

Another alternative is https://github.com/habnabit/remote-emacsclient, but it seems more complicated & less generic.

The simplest way to install with-editor is through MELPA:

M-x package-install with-editor

Otherwise, just grab https://github.com/magit/with-editor/blob/master/with-editor.el somewhere to your load path and require it (it also depends on dash).

Then, simply start shell, eshell or ansi-term and do the following:

M-x with-editor-export-editor

It'll ask you which $EDITOR you are interested in, just press enter for the default EDITOR variable. Then inside the shell you can type crontab -e and edit your crontab within emacs. Press C-c C-c to save the crontab or C-c C-k to cancel editing.

If you want a more permanent setup:

(add-hook 'shell-mode-hook  'with-editor-export-editor)
(add-hook 'term-mode-hook   'with-editor-export-editor)
(add-hook 'eshell-mode-hook 'with-editor-export-editor)

Alternatively, you can use M-x with-editor-async-shell-command crontab -e RET for quick commands.

deleted 7 characters in body
Source Link
Silex
  • 821
  • 6
  • 7

[NOTE] this answer was heavily edited to follow the updates of with-editor developments. Most comments likely won't make much sense anymore. There are some new comments which do make sense.


Magit's next branch contains a library named with-editor which allows you to use your local Emacs as an $EDITOR on remote machines over TRAMP.

Another alternative is https://github.com/habnabit/remote-emacsclient, but it seems more complicated & less generic.

The simplest way to install with-editor is through MELPA:

M-x package-install with-editor

Otherwise, just grab https://github.com/magit/magit/blob/next/with-editor.elhttps://github.com/magit/magit/blob/master/lisp/with-editor.el somewhere to your load path and require it (it also depends on dash).

Then, simply start shell, eshell or ansi-term and do the following:

M-x with-editor-export-editor

It'll ask you which $EDITOR you are interested in, just press enter for the default EDITOR variable. Then inside the shell you can type crontab -e and edit your crontab within emacs. Press C-c C-c to save the crontab or C-c C-k to cancel editing.

If you want a more permanent setup:

(add-hook 'shell-mode-hook  'with-editor-export-editor)
(add-hook 'term-mode-hook   'with-editor-export-editor)
(add-hook 'eshell-mode-hook 'with-editor-export-editor)

Alternatively, you can use M-x with-editor-async-shell-command crontab -e RET for quick commands.

[NOTE] this answer was heavily edited to follow the updates of with-editor developments. Most comments likely won't make much sense anymore. There are some new comments which do make sense.


Magit's next branch contains a library named with-editor which allows you to use your local Emacs as an $EDITOR on remote machines over TRAMP.

Another alternative is https://github.com/habnabit/remote-emacsclient, but it seems more complicated & less generic.

The simplest way to install with-editor is through MELPA:

M-x package-install with-editor

Otherwise, just grab https://github.com/magit/magit/blob/next/with-editor.el somewhere to your load path and require it (it also depends on dash).

Then, simply start shell, eshell or ansi-term and do the following:

M-x with-editor-export-editor

It'll ask you which $EDITOR you are interested in, just press enter for the default EDITOR variable. Then inside the shell you can type crontab -e and edit your crontab within emacs. Press C-c C-c to save the crontab or C-c C-k to cancel editing.

If you want a more permanent setup:

(add-hook 'shell-mode-hook  'with-editor-export-editor)
(add-hook 'term-mode-hook   'with-editor-export-editor)
(add-hook 'eshell-mode-hook 'with-editor-export-editor)

Alternatively, you can use M-x with-editor-async-shell-command crontab -e RET for quick commands.

[NOTE] this answer was heavily edited to follow the updates of with-editor developments. Most comments likely won't make much sense anymore. There are some new comments which do make sense.


Magit contains a library named with-editor which allows you to use your local Emacs as an $EDITOR on remote machines over TRAMP.

Another alternative is https://github.com/habnabit/remote-emacsclient, but it seems more complicated & less generic.

The simplest way to install with-editor is through MELPA:

M-x package-install with-editor

Otherwise, just grab https://github.com/magit/magit/blob/master/lisp/with-editor.el somewhere to your load path and require it (it also depends on dash).

Then, simply start shell, eshell or ansi-term and do the following:

M-x with-editor-export-editor

It'll ask you which $EDITOR you are interested in, just press enter for the default EDITOR variable. Then inside the shell you can type crontab -e and edit your crontab within emacs. Press C-c C-c to save the crontab or C-c C-k to cancel editing.

If you want a more permanent setup:

(add-hook 'shell-mode-hook  'with-editor-export-editor)
(add-hook 'term-mode-hook   'with-editor-export-editor)
(add-hook 'eshell-mode-hook 'with-editor-export-editor)

Alternatively, you can use M-x with-editor-async-shell-command crontab -e RET for quick commands.

there's at least one new and useful comment
Source Link

[NOTE] this answer was heavily edited to follow the updates of with-editor developments. TheMost comments likely won't make much sense anymore. There are some new comments which do make sense.


Magit's next branch contains a library named with-editor which allows you to use your local Emacs as an $EDITOR on remote machines over TRAMP.

Another alternative is https://github.com/habnabit/remote-emacsclient, but it seems more complicated & less generic.

The simplest way to install with-editor is through MELPA:

M-x package-install with-editor

Otherwise, just grab https://github.com/magit/magit/blob/next/with-editor.el somewhere to your load path and require it (it also depends on dash).

Then, simply start shell, eshell or ansi-term and do the following:

M-x with-editor-export-editor

It'll ask you which $EDITOR you are interested in, just press enter for the default EDITOR variable. Then inside the shell you can type crontab -e and edit your crontab within emacs. Press C-c C-c to save the crontab or C-c C-k to cancel editing.

If you want a more permanent setup:

(add-hook 'shell-mode-hook  'with-editor-export-editor)
(add-hook 'term-mode-hook   'with-editor-export-editor)
(add-hook 'eshell-mode-hook 'with-editor-export-editor)

Alternatively, you can use M-x with-editor-async-shell-command crontab -e RET for quick commands.

[NOTE] this answer was heavily edited to follow the updates of with-editor developments. The comments likely won't make much sense anymore.


Magit's next branch contains a library named with-editor which allows you to use your local Emacs as an $EDITOR on remote machines over TRAMP.

Another alternative is https://github.com/habnabit/remote-emacsclient, but it seems more complicated & less generic.

The simplest way to install with-editor is through MELPA:

M-x package-install with-editor

Otherwise, just grab https://github.com/magit/magit/blob/next/with-editor.el somewhere to your load path and require it (it also depends on dash).

Then, simply start shell, eshell or ansi-term and do the following:

M-x with-editor-export-editor

It'll ask you which $EDITOR you are interested in, just press enter for the default EDITOR variable. Then inside the shell you can type crontab -e and edit your crontab within emacs. Press C-c C-c to save the crontab or C-c C-k to cancel editing.

If you want a more permanent setup:

(add-hook 'shell-mode-hook  'with-editor-export-editor)
(add-hook 'term-mode-hook   'with-editor-export-editor)
(add-hook 'eshell-mode-hook 'with-editor-export-editor)

Alternatively, you can use M-x with-editor-async-shell-command crontab -e RET for quick commands.

[NOTE] this answer was heavily edited to follow the updates of with-editor developments. Most comments likely won't make much sense anymore. There are some new comments which do make sense.


Magit's next branch contains a library named with-editor which allows you to use your local Emacs as an $EDITOR on remote machines over TRAMP.

Another alternative is https://github.com/habnabit/remote-emacsclient, but it seems more complicated & less generic.

The simplest way to install with-editor is through MELPA:

M-x package-install with-editor

Otherwise, just grab https://github.com/magit/magit/blob/next/with-editor.el somewhere to your load path and require it (it also depends on dash).

Then, simply start shell, eshell or ansi-term and do the following:

M-x with-editor-export-editor

It'll ask you which $EDITOR you are interested in, just press enter for the default EDITOR variable. Then inside the shell you can type crontab -e and edit your crontab within emacs. Press C-c C-c to save the crontab or C-c C-k to cancel editing.

If you want a more permanent setup:

(add-hook 'shell-mode-hook  'with-editor-export-editor)
(add-hook 'term-mode-hook   'with-editor-export-editor)
(add-hook 'eshell-mode-hook 'with-editor-export-editor)

Alternatively, you can use M-x with-editor-async-shell-command crontab -e RET for quick commands.

added 112 characters in body
Source Link
Silex
  • 821
  • 6
  • 7
Loading
added 151 characters in body
Source Link
Silex
  • 821
  • 6
  • 7
Loading
deleted 1057 characters in body
Source Link
Silex
  • 821
  • 6
  • 7
Loading
added 318 characters in body
Source Link
Silex
  • 821
  • 6
  • 7
Loading
added 2 characters in body
Source Link
Silex
  • 821
  • 6
  • 7
Loading
added 447 characters in body
Source Link
Silex
  • 821
  • 6
  • 7
Loading
added 103 characters in body
Source Link
Silex
  • 821
  • 6
  • 7
Loading
added 103 characters in body
Source Link
Silex
  • 821
  • 6
  • 7
Loading
added 23 characters in body
Source Link
Silex
  • 821
  • 6
  • 7
Loading
added 4 characters in body
Source Link
Silex
  • 821
  • 6
  • 7
Loading
added 152 characters in body
Source Link
Silex
  • 821
  • 6
  • 7
Loading
deleted 7 characters in body
Source Link
Silex
  • 821
  • 6
  • 7
Loading
added 464 characters in body
Source Link
Silex
  • 821
  • 6
  • 7
Loading
added 127 characters in body
Source Link
Silex
  • 821
  • 6
  • 7
Loading
added 232 characters in body
Source Link
Silex
  • 821
  • 6
  • 7
Loading
Source Link
Silex
  • 821
  • 6
  • 7
Loading