From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Luca Ferrari Newsgroups: gmane.emacs.help Subject: Re: emacsclient and sudo Date: Mon, 8 Mar 2021 16:32:09 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4879"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 08 16:36:06 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lJHvS-00019M-9L for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 08 Mar 2021 16:36:06 +0100 Original-Received: from localhost ([::1]:51536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJHvR-00015e-BU for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 08 Mar 2021 10:36:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJHsI-0007nH-R8 for help-gnu-emacs@gnu.org; Mon, 08 Mar 2021 10:32:50 -0500 Original-Received: from mail-ot1-x333.google.com ([2607:f8b0:4864:20::333]:37814) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJHsG-0004Ac-1H for help-gnu-emacs@gnu.org; Mon, 08 Mar 2021 10:32:50 -0500 Original-Received: by mail-ot1-x333.google.com with SMTP id 75so6290865otn.4 for ; Mon, 08 Mar 2021 07:32:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=x8ZHRHqtLZw8jz5bxezCCtXOlbpplXk/n4IPOJf/6k0=; b=Ux4cIPRR70V3e99NrGTiua9We3b0rzghyt904rGHwURJpzefP/1/Ruuh+HF0i1a3d2 KdJdgGr3hZARtgpECGcx03m1qV2yB2PfWHdM+nhUsMY0kuMWFoX6T1NuAYlG57lpVNqU A6b6Z6j+oOW903VhgFBgjc5vMr6idLrKkfNd7xcW3NGaU8LQlYlDoc70WImLyzjEZq1L gQe3h2Q3zLA6uSqJQ6yG9cUXJsu1yaRACLq6J7gtDJfeQuj7KYjAE4pZ1VBEPvzLuN+B jpG8VYnmtGg1sgt41FjxSX58i3MRpsPmzwf+t56vYHqNKtxAUt95QUOaZcz5gzJ/fAqC zyAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=x8ZHRHqtLZw8jz5bxezCCtXOlbpplXk/n4IPOJf/6k0=; b=DYpzlxek/kUKCgYTELd02zuxjZCiWrSjgqEJ7uaJUZtEykFDNITyACiv0c+hetuVj9 fWgbba+LjY9g3lkVFrJbYCwLoDRYHyHUIiHPLNq39zeOMNcnvG3QnVZC0VGCMD8FsvFa ccG1Pf0ERouV0RfcP3/xIvYYBCk4FwFKlIscWTekg6bZ6bEbLnaMCwPACAOf7Ru2Eyc2 FjwVXBnBRA6yEBYmB0cqeFnpcIHBFFkN/ImsVIOgML36piyygEOeDhmR/wLNFjv+LsRk 518tVBkJZ1h7TYxrQoeOwRhLGJFdA70qVlcUtpfgJdu/68CAIG/CAobAlzk8i+F187AC 3kpA== X-Gm-Message-State: AOAM532tWglmrSElg5AbcAb90wYeFORtVaV8X+wFehJ5YiaHYn/XEiY1 DKNScmsSxuQPZFASkLm2dEYIlyeD0jAYRP8t4nFG3KFO/1oJ+g== X-Google-Smtp-Source: ABdhPJxOjOfIkqcvFs7A2ifrKfacDOdakdpA5ppplFChh6XPt/827495gdmQPjikzrCMr6m1ovafksNe49ThNTSV3d0= X-Received: by 2002:a9d:6553:: with SMTP id q19mr20014695otl.201.1615217566592; Mon, 08 Mar 2021 07:32:46 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::333; envelope-from=fluca1978@gmail.com; helo=mail-ot1-x333.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:128363 Archived-At: On Wed, Feb 24, 2021 at 6:48 PM Luca Ferrari wrote: > > So far, I'm starting it normally (without sudo) and use tramp to edit > a file with sudo, but sometimes my fingers are faster than my brain > and I type "sudo emacs ...". Another solution I found is to export SUDO_EDITOR variable set to emacsclient and then use `sudo -e` to edit a file. While this works with regard to emacsclient, it does prevent emacs to load my .emacs configuration file. % export SUDO_EDITOR="emacsclient -t -a ''" % sudo -e /etc/fstab I would like to be able to use my customizations, any idea? Thanks, Luca