unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* crontab from Emacs not only with Emacs
@ 2019-05-12  7:57 Emanuel Berg
  2019-05-12  7:59 ` tomas
  2019-05-12 11:21 ` Marcin Borkowski
  0 siblings, 2 replies; 6+ messages in thread
From: Emanuel Berg @ 2019-05-12  7:57 UTC (permalink / raw)
  To: help-gnu-emacs

I found the crontab-mode [1] in MELPA...

I know 'crontab -e' looks for the EDITOR env to
get you your favorite editor...

But how on Earth do I edit my (user's) crontab
file _from the Emacs that I already have open_,
24/7/365+ ?


[1] https://github.com/emacs-pe/crontab-mode

-- 
underground experts united
http://user.it.uu.se/~embe8573




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: crontab from Emacs not only with Emacs
  2019-05-12  7:57 crontab from Emacs not only with Emacs Emanuel Berg
@ 2019-05-12  7:59 ` tomas
  2019-05-12 11:21 ` Marcin Borkowski
  1 sibling, 0 replies; 6+ messages in thread
From: tomas @ 2019-05-12  7:59 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 349 bytes --]

On Sun, May 12, 2019 at 09:57:46AM +0200, Emanuel Berg wrote:
> I found the crontab-mode [1] in MELPA...
> 
> I know 'crontab -e' looks for the EDITOR env to
> get you your favorite editor...
> 
> But how on Earth do I edit my (user's) crontab
> file _from the Emacs that I already have open_,
> 24/7/365+ ?

emacsclient?

Cheers
-- t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: crontab from Emacs not only with Emacs
  2019-05-12  7:57 crontab from Emacs not only with Emacs Emanuel Berg
  2019-05-12  7:59 ` tomas
@ 2019-05-12 11:21 ` Marcin Borkowski
  2019-05-12 11:28   ` Noam Postavsky
  1 sibling, 1 reply; 6+ messages in thread
From: Marcin Borkowski @ 2019-05-12 11:21 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: help-gnu-emacs


On 2019-05-12, at 09:57, Emanuel Berg <moasenwood@zoho.eu> wrote:

> I found the crontab-mode [1] in MELPA...
>
> I know 'crontab -e' looks for the EDITOR env to
> get you your favorite editor...
>
> But how on Earth do I edit my (user's) crontab
> file _from the Emacs that I already have open_,
> 24/7/365+ ?

Tramp?

-- 
Marcin Borkowski
http://mbork.pl



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: crontab from Emacs not only with Emacs
  2019-05-12 11:21 ` Marcin Borkowski
@ 2019-05-12 11:28   ` Noam Postavsky
  2019-05-12 13:25     ` Marcin Borkowski
  2019-05-13  1:15     ` Emanuel Berg
  0 siblings, 2 replies; 6+ messages in thread
From: Noam Postavsky @ 2019-05-12 11:28 UTC (permalink / raw)
  To: Marcin Borkowski; +Cc: Help Gnu Emacs mailing list, Emanuel Berg

On Sun, 12 May 2019 at 07:26, Marcin Borkowski <mbork@mbork.pl> wrote:
>
>
> On 2019-05-12, at 09:57, Emanuel Berg <moasenwood@zoho.eu> wrote:
>
> > I found the crontab-mode [1] in MELPA...
> >
> > I know 'crontab -e' looks for the EDITOR env to
> > get you your favorite editor...
> >
> > But how on Earth do I edit my (user's) crontab
> > file _from the Emacs that I already have open_,
> > 24/7/365+ ?
>
> Tramp?

I think the answer here would be to set EDITOR to emacsclient.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: crontab from Emacs not only with Emacs
  2019-05-12 11:28   ` Noam Postavsky
@ 2019-05-12 13:25     ` Marcin Borkowski
  2019-05-13  1:15     ` Emanuel Berg
  1 sibling, 0 replies; 6+ messages in thread
From: Marcin Borkowski @ 2019-05-12 13:25 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: Help Gnu Emacs mailing list, Emanuel Berg


On 2019-05-12, at 13:28, Noam Postavsky <npostavs@gmail.com> wrote:

> On Sun, 12 May 2019 at 07:26, Marcin Borkowski <mbork@mbork.pl> wrote:
>>
>>
>> On 2019-05-12, at 09:57, Emanuel Berg <moasenwood@zoho.eu> wrote:
>>
>> > I found the crontab-mode [1] in MELPA...
>> >
>> > I know 'crontab -e' looks for the EDITOR env to
>> > get you your favorite editor...
>> >
>> > But how on Earth do I edit my (user's) crontab
>> > file _from the Emacs that I already have open_,
>> > 24/7/365+ ?
>>
>> Tramp?
>
> I think the answer here would be to set EDITOR to emacsclient.

Yes, I think I misunderstood Emanuel's problem.  Somehow I was thinking
about editing root's crontab.

Best,

-- 
Marcin Borkowski
http://mbork.pl



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: crontab from Emacs not only with Emacs
  2019-05-12 11:28   ` Noam Postavsky
  2019-05-12 13:25     ` Marcin Borkowski
@ 2019-05-13  1:15     ` Emanuel Berg
  1 sibling, 0 replies; 6+ messages in thread
From: Emanuel Berg @ 2019-05-13  1:15 UTC (permalink / raw)
  To: help-gnu-emacs

Noam Postavsky wrote:

> I think the answer here would be to set
> EDITOR to emacsclient.

Thanks to all of you, you are right of course!

In Emacs, do

    M-x server-start RET

Then in the shell do

    $ EDITOR=emacsclient crontab -e

Then edit the file in Emacs and do `C-x #'
when done.

The MELPA `crontab-mode' does not kick in by
default tho, but one can live with that, or
configure it, I suppose, based on the crontab
filename. As for me, I think I'll uninstall it
as I don't plan to do that much scheduling with
crontab. Not everything has to have its own
mode! Just like with space. Just because we are
in space, not _everything_ has to be called
something with "space": the "space bar", "space
police", etc. Right?

Anyway if anyone is hooked on SX rep here is
the exact same question [1] but with a couple
of comments and an answer and there is no
mention of this method, which IMO works much
better than their by all means creative
attempts :)


[1] https://emacs.stackexchange.com/questions/10077/how-to-edit-crontab-directly-within-emacs-when-i-already-have-emacs-open

-- 
underground experts united
http://user.it.uu.se/~embe8573




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-05-13  1:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-12  7:57 crontab from Emacs not only with Emacs Emanuel Berg
2019-05-12  7:59 ` tomas
2019-05-12 11:21 ` Marcin Borkowski
2019-05-12 11:28   ` Noam Postavsky
2019-05-12 13:25     ` Marcin Borkowski
2019-05-13  1:15     ` Emanuel Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).