From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Bob Proulx Newsgroups: gmane.emacs.help Subject: Re: Help with PHP setup Date: Fri, 20 Jul 2018 17:10:05 -0600 Message-ID: <20180720165431792380014@bob.proulx.com> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1532128119 7908 195.159.176.226 (20 Jul 2018 23:08:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 20 Jul 2018 23:08:39 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jul 21 01:08:35 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgeVk-0001wh-N1 for geh-help-gnu-emacs@m.gmane.org; Sat, 21 Jul 2018 01:08:32 +0200 Original-Received: from localhost ([::1]:50099 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fgeXq-00031w-PX for geh-help-gnu-emacs@m.gmane.org; Fri, 20 Jul 2018 19:10:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fgeXN-00031X-4c for help-gnu-emacs@gnu.org; Fri, 20 Jul 2018 19:10:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fgeXI-0001hI-5L for help-gnu-emacs@gnu.org; Fri, 20 Jul 2018 19:10:13 -0400 Original-Received: from havoc.proulx.com ([96.88.95.61]:59457) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fgeXH-0001gp-VC for help-gnu-emacs@gnu.org; Fri, 20 Jul 2018 19:10:08 -0400 Original-Received: from joseki.proulx.com (localhost [127.0.0.1]) by havoc.proulx.com (Postfix) with ESMTP id A94E02ED for ; Fri, 20 Jul 2018 17:10:06 -0600 (MDT) Original-Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id 372412188F for ; Fri, 20 Jul 2018 17:10:06 -0600 (MDT) Original-Received: by hysteria.proulx.com (Postfix, from userid 1000) id 174AC2DC71; Fri, 20 Jul 2018 17:10:05 -0600 (MDT) Mail-Followup-To: help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 96.88.95.61 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:117523 Archived-At: taariqq wrote: > I am trying to set emacs up so that I can use it for PHP development. I use emacs for PHP development. > What I am looking for: > a) A way to open the files, via my vagrant or lampp setup, in the browser. > b) Update the view in the browser as I save changes to the file in the editor. > c) Switch the view in the browser as I switch from file to file and continue to see the updates upon save. I hate to post something that says it can't be done. Because almost always when someone says something can't be done it actually can be done and other people prove that to be true. But reading the above makes me think that if someone does make that work that it would be "icky". The web browser program is so far removed from the editing program that your desire to connect them together makes this feel "icky" to me. Although maybe you can get part way there with a browser plugin. You didn't say if you were using Firefox, Chromium, or one of the other browsers. Knowing which browser you are using will undoubtedly be important at some point. > Not experienced at this stuff and would appreciate a little help. The way I personally operate is to edit the files with emacs on my local system in my local sandbox. I usually have a local php server running in another terminal "php -S localhost:3000 -t root" or similar (the "root" will be instance specific). I make changes. I then switch over to my web browser (which may be emacs w3m or emacs eww, or it may be Firefox or Chromium, either way) and reload the page. Seeing the result then I make more changes in emacs. Back and forth. I check the output of the php server to check on any errors that may be logged there. I tolerate no spurious output and fix any error or warning that appears. Working this way is very easy. If I switch to a different page then I do need to manually track to that new page using either emacs w3m or Firefox/Chromium or whatever. But then I am on the new page. I only need to reload the page. I must emphasize that most of the time when I am developing that using emacs as the browser through emacs w3m is usually sufficient. (I find the w3m form interaction user interface to be tedious however.) I always develop locally in my local sandbox. Then commit to version control into my development branch. Then test on my victim server. Then push to production. This glosses over a lot of details. When I check into git I use the command line. Usually using the most awesome "git add -p ..." to split my changes into appropriate chunks of changes. That's a killer feature for me. I never picked up the habit of the emacs magit git interface but everyone else says very good things about it and eventually I will try it. Bob