From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robert Thorpe Newsgroups: gmane.emacs.help Subject: Re: Ways to use Emacs when programming C++ with Visual Studio? Date: Tue, 02 Dec 2014 20:50:02 +0000 Message-ID: <87d281g4jp.fsf@robertthorpeconsulting.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1417553451 31589 80.91.229.3 (2 Dec 2014 20:50:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 2 Dec 2014 20:50:51 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Ken Goldman Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 02 21:50:44 2014 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 1XvuPD-0000iE-JT for geh-help-gnu-emacs@m.gmane.org; Tue, 02 Dec 2014 21:50:43 +0100 Original-Received: from localhost ([::1]:38755 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvuPD-0006hz-8O for geh-help-gnu-emacs@m.gmane.org; Tue, 02 Dec 2014 15:50:43 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43361) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvuOi-0006hm-Nl for help-gnu-emacs@gnu.org; Tue, 02 Dec 2014 15:50:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XvuOa-0007CU-FK for help-gnu-emacs@gnu.org; Tue, 02 Dec 2014 15:50:12 -0500 Original-Received: from outbound-smtp04.blacknight.com ([81.17.249.35]:40140) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvuOa-0007AK-AH for help-gnu-emacs@gnu.org; Tue, 02 Dec 2014 15:50:04 -0500 Original-Received: from mail.blacknight.com (pemlinmail04.blacknight.ie [81.17.254.17]) by outbound-smtp04.blacknight.com (Postfix) with ESMTP id 8BF6E98993 for ; Tue, 2 Dec 2014 20:46:40 +0000 (UTC) Original-Received: (qmail 29590 invoked from network); 2 Dec 2014 20:50:03 -0000 Original-Received: from unknown (HELO RTLaptop) (rt@robertthorpeconsulting.com@[109.76.254.213]) by 81.17.254.9 with ESMTPSA (DHE-RSA-AES128-SHA encrypted, authenticated); 2 Dec 2014 20:50:03 -0000 In-Reply-To: (message from Ken Goldman on Wed, 26 Nov 2014 09:55:44 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 81.17.249.35 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:101377 Archived-At: Ken Goldman writes: > On 11/25/2014 6:40 PM, Mike wrote: >> >> Thanks for letting me know about autorevert. >> > > Besides autorevert, there's also M-x revert-buffer, which does it manually. > >> So I'd make the changes in Emacs, then I would close every file >> window in VS, save all the files open in Emacs, then tell VS to >> rebuild everything! Not really much fun, > > Tools - Options - Documents - Detect when file is changed outside the > environment - auto-load changes if saved. > > I assume that Microsoft added that option so their developers could use > emacs. :-) Many years ago when I used Microsoft Visual Studio I used the same procedure. I did my editing in Emacs and used auto-revert mode. I had VS setup to revert periodically too. I found it best to avoid global-auto-revert-mode and setup auto-revert mode only for the relevant modes (C++ in my case). Something to watch out for here is that Emacs believes that .h files are C files not C++. Microsoft don't use the .hpp file extension. If you use VS a lot it's best to make .h files automatically choose C++ mode. I don't have any code for this unfortunately, I deleted it from my .emacs years ago when I stopped using VS. BR, Robert Thorpe