From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jean-Christophe Helary Newsgroups: gmane.emacs.help Subject: Re: Help with PHP setup Date: Sun, 22 Jul 2018 22:56:43 +0900 Message-ID: <372A84EC-BB98-4127-9391-02B34085B0E4@gmail.com> References: <20180720165431792380014@bob.proulx.com> <441C26FC-5F31-4C6E-A201-56FBAC5070D0@gmail.com> <20180720215215494599155@bob.proulx.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1532267712 13706 195.159.176.226 (22 Jul 2018 13:55:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 22 Jul 2018 13:55:12 +0000 (UTC) To: Help Gnu Emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jul 22 15:55:08 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 1fhEpI-0003Qb-9L for geh-help-gnu-emacs@m.gmane.org; Sun, 22 Jul 2018 15:55:08 +0200 Original-Received: from localhost ([::1]:56083 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhErO-0000Lo-TH for geh-help-gnu-emacs@m.gmane.org; Sun, 22 Jul 2018 09:57:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhEqz-0000Lg-4O for help-gnu-emacs@gnu.org; Sun, 22 Jul 2018 09:56:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhEqw-0004Qd-2l for help-gnu-emacs@gnu.org; Sun, 22 Jul 2018 09:56:53 -0400 Original-Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]:37528) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fhEqv-0004QZ-Q1 for help-gnu-emacs@gnu.org; Sun, 22 Jul 2018 09:56:50 -0400 Original-Received: by mail-pf1-x42d.google.com with SMTP id a26-v6so432202pfo.4 for ; Sun, 22 Jul 2018 06:56:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:date:references:to:in-reply-to:message-id; bh=8LDmAeSk+Xe66DaUb/l0Gnck5UW6tLlPNGRr9TrvJgE=; b=myWpC3TunXCUEftkKuoHFwClg9tmx6F6LFV0q72OUoqCjUGD56BefBloLWPDxdXvjW pMkUU2mN2CHP59bg0jTgsvqBKyBDb8kYQr23uVoKwxULWc9Zh+LTjykzByLOUDNgWNqp EOq42Uc+XXLCWeXzLoZjTJdAb0qL0xHqPwOLHzj6CSCDwqD43dNuznVx3neXuGkxUF+F S8xilJmAwCx6No+soQnsdp+xO7zMmDYdeHdtYDecfhmiud+v8RzWc3C6izB6YFNfF+8N DV/5qgBfM0NUSYA8PHN5cLk3jvy1oeB80jOzbD2DyDoBYZgTn4WkHsusWUe0fRlhSrA5 C0UQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:date:references:to :in-reply-to:message-id; bh=8LDmAeSk+Xe66DaUb/l0Gnck5UW6tLlPNGRr9TrvJgE=; b=iqSqygAL9suNiJeN2b3Fvj+noFoctQOR05i/Ci0mDT11NmhD3Hu2RzUwgdaj1RlhMd 4FADAQJDSt65v/msOFIcaVvL5TatyJ1igkAhMZ9Etwab9zxe+PJ71GqKR8vVWFA2ukcY rf4D8DU4Bq+bHkchVW+j7oLGN7inMZYgaeL67dJFHu4XmKbf1OqKJxd+5yITnxnTcQxn +Sm7dBV8BqAlMWgdgLqQG/aCLYUAKea9bNYkOpX1hG4tR0TOiRpW/MgI7POFSVKDpr/I QVyboH4qQ5S2mA8y1TGzuG23gBY8TT259Piqv7Yll9BQKtlvWinuSI3Y3VFxpdd1a+/I EQMg== X-Gm-Message-State: AOUpUlHbUwUdygEeQJWc4gDus3bF+pqcdhy9wxhaaQ9tbbiqhLXoU5cw xWOGPZWNgt9ggZ/OBfPTcLm842XP X-Google-Smtp-Source: AAOMgpfnxtPht5NPt1LkgBU/yHTeFa1fJezsqFP7IZHu9Qwx0SSygCo0ToA7EfQUEswCdlso8UrGNA== X-Received: by 2002:a62:d8c:: with SMTP id 12-v6mr9545676pfn.202.1532267807694; Sun, 22 Jul 2018 06:56:47 -0700 (PDT) Original-Received: from [192.168.1.7] (pl36180.ag0304.nttpc.ne.jp. [133.232.212.84]) by smtp.gmail.com with ESMTPSA id p66-v6sm11795336pfd.65.2018.07.22.06.56.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Jul 2018 06:56:46 -0700 (PDT) In-Reply-To: <20180720215215494599155@bob.proulx.com> X-Mailer: Apple Mail (2.3445.9.1) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::42d X-Content-Filtered-By: Mailman/MimeDel 2.1.21 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:117549 Archived-At: > On Jul 21, 2018, at 12:53, Bob Proulx wrote: >=20 > Jean-Christophe Helary wrote: >> So we can actually have a function that replaces the path part of >> the file by a localhost url and run a command that opens that in the >> default browser. >=20 > Won't that stack up new tabs endlessly? Or at least every time the > function runs, which as I understand it would be every time the buffer > was saved to a file? >=20 >> Nothing icky about it, we just need the correct parameters to put >> that together. >=20 > As I said, someone will prove that it is possible. :-) On macOS it seems the "open " command targets the same tab so I don't = seem to have to be worried about that: (defun myLocalhostTest () "saves and opens the file opened in the current buffer into = localhost" (interactive) (save-excursion (save-buffer) (setq myRoot "http://localhost:8888/") (setq myFile (file-name-nondirectory (buffer-file-name))) (setq myTestCommand (concat "open " myRoot myFile)) (shell-command myTestCommand))) The above trivial code needs improvements to handle cases where the file = is not at the root of localhost, but that can wait for now :) Jean-Christophe Helary ----------------------------------------------- http://mac4translators.blogspot.com @brandelune