From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Martin Kaffanke Newsgroups: gmane.emacs.help Subject: Re: automate command after saving Date: Thu, 19 Nov 2015 20:03:23 +0100 Message-ID: <87mvu9hkw4.fsf@kaffanke.at> References: <87ziyamhx1.fsf@kaffanke.at> <87lh9u6pk9.fsf@newcastle.ac.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1447959837 29513 80.91.229.3 (19 Nov 2015 19:03:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Nov 2015 19:03:57 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Phillip Lord Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 19 20:03:48 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZzUUj-0004uA-1h for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Nov 2015 20:03:45 +0100 Original-Received: from localhost ([::1]:43625 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzUUi-0002Q5-CF for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Nov 2015 14:03:44 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzUUX-0002PX-94 for help-gnu-emacs@gnu.org; Thu, 19 Nov 2015 14:03:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZzUUS-0007DW-NG for help-gnu-emacs@gnu.org; Thu, 19 Nov 2015 14:03:33 -0500 Original-Received: from kaffanke.at ([91.228.52.116]:46648) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzUUS-0007DJ-Hj for help-gnu-emacs@gnu.org; Thu, 19 Nov 2015 14:03:28 -0500 Original-Received: from martin-arch (212-197-164-242.adsl.highway.telekom.at [212.197.164.242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by kaffanke.at (Postfix) with ESMTPSA id 99F5844F00FF; Thu, 19 Nov 2015 20:03:25 +0100 (CET) User-agent: mu4e 0.9.15; emacs 24.5.1 In-reply-to: <87lh9u6pk9.fsf@newcastle.ac.uk> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 91.228.52.116 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:108140 Archived-At: Phillip Lord writes: > You could do this using after-save-hook. So, something like > > (add-hook 'after-save-hook > 'pandoc-hook) > > (defun pandoc-hook() > (compile "pandoc -t latex....")) That sounds interesting, but is this a 'per buffer hook' or something? Maybe I find out a possibility to automatically create the pathes too and do a trigger-hook so I can switch it on or of on a specific buffer. But this seems to be a good start. Your bash script is also interesting, but as this is mosty required on org-attachments, the path is not really human guessable, so its better to have it out of emacs. Thanks, Martin