From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jorge Alberto Garcia Newsgroups: gmane.emacs.devel Subject: Re: Why not processing emacsclient's command line arguments with user defined functions? Date: Mon, 18 Jan 2016 10:57:32 -0600 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1453136308 27475 80.91.229.3 (18 Jan 2016 16:58:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Jan 2016 16:58:28 +0000 (UTC) Cc: emacs-devel To: Constantin Kulikov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 18 17:58:21 2016 Return-path: Envelope-to: ged-emacs-devel@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 1aLD8D-0003vB-UZ for ged-emacs-devel@m.gmane.org; Mon, 18 Jan 2016 17:58:18 +0100 Original-Received: from localhost ([::1]:60777 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLD8D-0007od-C8 for ged-emacs-devel@m.gmane.org; Mon, 18 Jan 2016 11:58:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48278) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLD89-0007nm-FE for emacs-devel@gnu.org; Mon, 18 Jan 2016 11:58:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLD88-0002Yy-Ji for emacs-devel@gnu.org; Mon, 18 Jan 2016 11:58:13 -0500 Original-Received: from mail-ob0-x235.google.com ([2607:f8b0:4003:c01::235]:36020) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLD88-0002Yt-EM for emacs-devel@gnu.org; Mon, 18 Jan 2016 11:58:12 -0500 Original-Received: by mail-ob0-x235.google.com with SMTP id ba1so577538611obb.3 for ; Mon, 18 Jan 2016 08:58:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=FB3S2fBGRIXL4hE6+xbaY195jKS1KVK74Dntxxnw1GI=; b=a9SpIrkJ1dCEg+c5E+ezNuJZSeli7Rw37kdzMv3QiCOcnfClPZmSp2NP6NFP+9P5O7 tIHrqRb+CKCxeHpUfL6oE30IsHx17Umh/aXqG2b0LkvIcJ/QFfxGVkBYjpD5Bhs0qSSv I28bYwAvlDfmllhNMbkvmBvGaXiDqnVURF9FBwQVgkfX3Ngu+l8agGEP1C6UD5xQrrJZ uM1pHOXUZni442G1hhXbZoJJYOkkHMp90GDvLELx+0TaRLVYT5vtW5jkfTNiBlehVUmR TQZnvfsqHDKXMMzBSmAwEtFzqiKXR9ubOKZ8qyrrmzI+IdA3Rm29Y7PYQFmb5i0KJ86l pULw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=FB3S2fBGRIXL4hE6+xbaY195jKS1KVK74Dntxxnw1GI=; b=kFty3lw5qxwEnw4gl9G01tSsDCJ11LU7c9HWrvRgerZkKxygHdrqagI+E8tkvW5vvV f9b3WSM5XYDOlxjMwsENbkgH175+jc14QVMNfzDQu2fv41vXFo8Y1oxpAjITweuUGIiS 0zp7xBVW0+V0t+98n9rf/J6wu3ScCL06pb+rY/WG2fGgnWPbpvSK1/5AdVwtLMrfsssI UHQ7A7OEcS7hNEdiWW02Qjom+vN8ZZ1omDcFS3tZXWwR6pFotZAO20LY5HHE1bn+QY4x FfsIaKouxYAY0O5T+Oh4FJlBmiYxcYwCRxruAaGbsMe9CiKsiEgBmwme/Ev+AcqjeQkU Tt6Q== X-Gm-Message-State: ALoCoQnBT/GJ4ZSjO4l02C/j1LpZItbHEwsCr/TH4RWwxxTDlsTlbjICNIClYsQMU3HXS4BMYgV31I6CUUtOG4lkcGEbz7FGaw== X-Received: by 10.182.221.201 with SMTP id qg9mr19308733obc.1.1453136291724; Mon, 18 Jan 2016 08:58:11 -0800 (PST) Original-Received: by 10.202.179.7 with HTTP; Mon, 18 Jan 2016 08:57:32 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c01::235 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:198260 Archived-At: On Mon, Jan 18, 2016 at 1:10 AM, Constantin Kulikov wrote: >> Can you elaborate > > What to eleborate here? You want a new feature for emacsclient so you go and > patch C source. Tomorrow you'l want a new commandline option. Hi ! This specific feature works at the same layer that the current +line:col option; implemented at emacsclient.c, > So why no one here think about general solutions? > I agree on having an infrastructure to handle command line options, this patch uses what is available right now. > Emacslisp solution is always better than C. (Hooks, hooks must be everywhere > in emacs) If you mean an elisp hook is usually better than C, I would agree. > > How it could be implemented: > (I'd say that we can use the same command-line-functions and > command-switch-alist but it could break backward compatibility, so it'll > better to use a new variables I think -- emacs-client-argumet-string or > something.) > Thanks I didn't knew about this. > 1. emacsclient searches for 'connection related' arguments because they are > needed to know how to connect to the daemon. > 2. emacsclient sends the full arguments string to the server. > 3. server calls user(and predefined) hooks which must examine and do > manipulations on that string. Feel free to send a proposal, If a new implementation is better, I would be happy to use it on next emacs release. >