From mboxrd@z Thu Jan 1 00:00:00 1970 From: Herbert Sitz Subject: problem with command-line call to emacsclient Date: Sat, 2 Jul 2011 04:42:30 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:53260) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qcs2X-0004LE-CK for emacs-orgmode@gnu.org; Sat, 02 Jul 2011 00:42:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qcs2W-0002o7-Ex for emacs-orgmode@gnu.org; Sat, 02 Jul 2011 00:42:45 -0400 Received: from lo.gmane.org ([80.91.229.12]:56615) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qcs2W-0002o1-9q for emacs-orgmode@gnu.org; Sat, 02 Jul 2011 00:42:44 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Qcs2T-000680-Gt for emacs-orgmode@gnu.org; Sat, 02 Jul 2011 06:42:41 +0200 Received: from c-24-22-131-140.hsd1.wa.comcast.net ([24.22.131.140]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 02 Jul 2011 06:42:41 +0200 Received: from hsitz by c-24-22-131-140.hsd1.wa.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 02 Jul 2011 06:42:41 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org I'm making a call to an emacsclient and trying to figure out how to get the buffer to unload at the end of the function I'm calling. I know kill-buffer isn't supposed to unload the buffer but I can't figure out what will. I've tried server-edit and server-kill-buffer in place of kill-buffer below and they also haven't worked. The buffer gets "pushed to the kill buffer", but remains loaded. The problem with having buffer remain loaded is when I redo the command-line call after editing the org file outside of emacs it prompts user for whether to reload changed file. One option would be to simply disable that prompt, I guess, but I'd rather be able to clear the buffer. Here's the function I'm calling: ---------------------------------- (defun vimorg-export-publish (fname exp-function) (find-file fname) (funcall exp-function nil) (kill-buffer) ) --------------------------------- And here's sample command line that calls it. Strange characters are because it's on Windows system, but it works fine other than that the buffer is not unloaded at end of vimorg-export-publish function: ----------------------------- c:\users\herbert\emacsclientw.exe --eval ^"(vimorg-export-publish \^"~/myorgfile.org\^" 'org-export-as-html-and-open )^" ------------------------------ Thanks for any tips. -- Herb