From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Rusi Newsgroups: gmane.emacs.help Subject: advice vs hooks in org (was DWIM region) Date: Mon, 8 Jan 2018 08:09:50 -0800 (PST) Message-ID: <8027eddf-4a45-49f8-af69-f4f8eeeb32f8@googlegroups.com> References: <86shbmcldx.fsf@zoho.com> <86d12pcvgj.fsf@zoho.com> <86d12pb988.fsf_-_@zoho.com> <868tddb50j.fsf@zoho.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1515427748 25497 195.159.176.226 (8 Jan 2018 16:09:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 8 Jan 2018 16:09:08 +0000 (UTC) Injection-Date: Mon, 08 Jan 2018 16:09:51 +0000 User-Agent: G2/1.0 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 08 17:09:04 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 1eYZyt-0005xp-V2 for geh-help-gnu-emacs@m.gmane.org; Mon, 08 Jan 2018 17:09:00 +0100 Original-Received: from localhost ([::1]:41810 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYa0t-000817-8b for geh-help-gnu-emacs@m.gmane.org; Mon, 08 Jan 2018 11:11:03 -0500 X-Received: by 10.55.104.13 with SMTP id d13mr3649703qkc.31.1515427791625; Mon, 08 Jan 2018 08:09:51 -0800 (PST) X-Received: by 10.31.52.71 with SMTP id b68mr1314229vka.13.1515427791246; Mon, 08 Jan 2018 08:09:51 -0800 (PST) Original-Path: usenet.stanford.edu!g35no2887819qtk.1!news-out.google.com!v55ni1123qtc.0!nntp.google.com!g35no2887813qtk.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: <868tddb50j.fsf@zoho.com> Complaints-To: groups-abuse@google.com Original-Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=117.195.61.209; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui Original-NNTP-Posting-Host: 117.195.61.209 Original-Xref: usenet.stanford.edu gnu.emacs.help:221501 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:115618 Archived-At: On Friday, January 5, 2018 at 4:33:59 AM UTC+5:30, Emanuel Berg wrote: > Kaushal Modi wrote: >=20 > > (defun modi/advice-region-or-whole (orig-fun > > &rest args) "Advice function that applies >=20 > Sweet heaven! Advices make you crazy sooner > rather than later... And especially for this > simple task I dare not imagine how the rest of > your system ever sticks together. But TEHO, of > course... This reminds me=E2=80=A6 I find that org-protocol uses advice on server-visit-files to work Would it not have been possible to do it cleaner using the various server-h= ooks? [Ive spent the last several days trying to get it to work. Its particularly rough going since have to debug across firefox and emacs ]