From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id HRr0IN2Yb2LtJgAAbAwnHQ (envelope-from ) for ; Mon, 02 May 2022 10:39:57 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id aBqaH92Yb2LHogAAauVa8A (envelope-from ) for ; Mon, 02 May 2022 10:39:57 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1050241D1C for ; Mon, 2 May 2022 10:39:57 +0200 (CEST) Received: from localhost ([::1]:35828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nlRb1-0000zL-Sh for larch@yhetil.org; Mon, 02 May 2022 04:39:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43668) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlRNm-0000Po-Un for emacs-orgmode@gnu.org; Mon, 02 May 2022 04:26:15 -0400 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]:34455) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlRNl-0004mo-1S for emacs-orgmode@gnu.org; Mon, 02 May 2022 04:26:14 -0400 Received: by mail-lf1-x12a.google.com with SMTP id x33so24094591lfu.1 for ; Mon, 02 May 2022 01:26:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=6LrMX1BnPaNDITXUoQQXQhklT1jSqmgx8zo3t77/QmY=; b=lanURXGtf4n9KqQu43m4gy76O2yeluUB4psUNAOtm7Zswi0O6TgPjmNPDCpUatboyU qxni4vPLmjsQDPfNLTkT4ZyPZpEORiHgcxKoIuZKtu33RtbKzDi/ToU1yev4qhK5pKdb Qhpk/88QTp3SG2FDbPhvUBxUDZP4oKXssy/96bYub/wQ6NFbFAGFhsT7YcerqKkLjj2k znRyEHB3wVPJ9l36n/Kzs3y2i0zb+i387OG1+TIWbYNn4Cna9+EYcwuqXHtaTcAH0as/ LcQrmtV4ELCfBd+wTi94TbfGMAs5cmp/DwY7x+dwwBX8s0IxEq87ARGQ6wz/6IaUzqRi 4x5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=6LrMX1BnPaNDITXUoQQXQhklT1jSqmgx8zo3t77/QmY=; b=4Z+yRnwWLN6BdkZcXps770LQ6Rn8j4KtnDad59BG2bVxAqYVCnsMLHnOeKyDclePWc 8AJUtbFi1Y/qk96jmDJ0ZwKibm1w6tue7JUjdynrAL3fZIBKYZZQ/uO2mD1pqVfp6O/l eD8t0ctQWNpLZkzFs+er+OrBuccs9yAjZGS7sCHR6kjcblOusmPZgyv0uHjNHJuKm4Lf xYAromaItBDAO2pVST0ttNICGAkIYCAmyTOYx6KftT4Qb4cnP7sZKxmXkFaf4BfSOsKQ maAQwZepqgLU6hpvglPmF3EDMqmxCqLeqf1gawyIdSO2ZO26qHGM3bNCcwVbNX45uqkG 4cGg== X-Gm-Message-State: AOAM533JOfbnS3SaY9GAKacxFCf5osHYObVVeuhscVv3rT8VH4ESMLmB OLQt00bTHlJbcXOt0tNIgjg= X-Google-Smtp-Source: ABdhPJyQkq6xwihk/5in9ghupGkgab9ujY5ddZug76UayL+TH6csBD+YTDMD1vKpjRaGD23dVtQxfQ== X-Received: by 2002:ac2:4646:0:b0:472:108e:51af with SMTP id s6-20020ac24646000000b00472108e51afmr8335067lfo.184.1651479971255; Mon, 02 May 2022 01:26:11 -0700 (PDT) Received: from [192.168.0.101] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id l6-20020a2e9086000000b0024f3d1daf04sm951965ljg.140.2022.05.02.01.26.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 May 2022 01:26:10 -0700 (PDT) Message-ID: <62673cdd-14da-8526-c1eb-ca4c74592476@gmail.com> Date: Mon, 2 May 2022 15:26:09 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: Emacs launched from Firefox Content-Language: en-US To: Samuel Wales References: <87ilqq6jjr.fsf@localhost> <874k297ukf.fsf@localhost> From: Max Nikulin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::12a; envelope-from=manikulin@gmail.com; helo=mail-lf1-x12a.google.com X-Spam_score_int: -7 X-Spam_score: -0.8 X-Spam_bar: / X-Spam_report: (-0.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_FROM=0.001, NICE_REPLY_A=-0.001, RCVD_IN_BL_SPAMCOP_NET=1.347, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1651480797; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=6LrMX1BnPaNDITXUoQQXQhklT1jSqmgx8zo3t77/QmY=; b=Ukhpjs59bAeIYumP7lfMQyO9GTFhG82KXa8xTcruMDETte1D856PNBVqv7gL1MjhkU6QG+ 8GNj2Y+GBd5e0/b/ovQNnD98Vds195UZSekI6+BEk/qHlbBhCqRVCFVUDALVSvOAECk1ID 3YZxAqETKdQfrzjgKye1oFnkE94GEp141Mx3aYGsFswSC8y1VPhY+PKPrLcdO8DPCLjEvB 3JtXxfnH89PaJYrDGGAH1Gcm6hc0+je0AKUZeDI5TfGWa9aZGu+c/FfunUq9RI65U6+YfZ fTCDLcIfQrHlctWTVZpxv90iX4eUvUJVlZGnJVTjExA3eEgIPS8o8gCnffbUDw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651480797; a=rsa-sha256; cv=none; b=KfwoNklNbnpqJhF8E8vu2Jw22SYYDCwvx0R0U86ZzL/rQ8yTf/oRqDsoRiYpnFroALs+Ei lLnVY7hVn2O9vUMtrU17cM0jCtGzXWrcd+nDqfuuUNtjP8viMfPgHKivp7p8G3sV6Z9tjB Y3usTWK1qc0WzjSt5OvL/aOfD0lGvQEtbD3jkppQn5m3noPJ7GEEhdvJQ3F8+tN72qCyH9 uUPBJekKSVGNbgNSQXruyaV/jSrNaZIbhjKJHjb3KXXXrRUaImYyFyCfG4QTpFracCWtv+ QbC+gZvoCn09ubdA6t/U8io9RHl0gpgniiGSl65MlnydW64W7Z6vBPk7g+tQZg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=lanURXGt; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 6.21 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=lanURXGt; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 1050241D1C X-Spam-Score: 6.21 X-Migadu-Scanner: scn1.migadu.com X-TUID: YfNR12Otji1y On 02/05/2022 09:03, Samuel Wales wrote: > thank you. there is no emacs in my ~/.config/mimeapps.list. where > are those desktop files found or put? i use fluxbox. > [i realize this is not org related. non-list email ok.] Perhaps emacs-help is more suitable for this discussion, but I do not read that mail list due to rather high traffic there. On the other hand I do not know if there is a resource describing such configuration taking into account details specific to Emacs (I have not tried to find it though). I am not sure from which site you downloaded that attachment, MIME type may vary depending on the HTTP server configuration. You yay check Content-Type response header in the browser development tools or using curl -I '' command. It may be "text/plain", "text/x-patch", "application/x-patch", etc. In Firefox settings (about:preferences page) check that "Applications" section either does not contain an entry for the MIME type (is unlikely in your case since you already opened a file) or its handler is configured to "Always ask" till you select your new handler. System-wide .desktop file may reside e.g. in "/usr/share/applications/emacs.desktop". You can put your customized file in e.g. "~/.local/share/applications/" directory ("$XDG_DATA_HOME/applications/") or into "applications" subdirectory of "$XDG_DATA_DIRS" entry. For details see https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html Customize "Exec" entry in the .desktop file to add your options, e.g. create "emacs-a11y.desktop" ---- >8 ---- [Desktop Entry] Version=1.0 Name=Accessible Emacs (GUI) GenericName=Text Editor Comment=GNU Emacs is an extensible, customizable text editor - and more MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; TryExec=/usr/bin/emacs Exec=/usr/bin/emacs %F Icon=emacs Type=Application Terminal=false Categories=Utility;Development;TextEditor; StartupWMClass=Emacs Keywords=Text;Editor; ---- 8< ---- It is better to set unique "Name" to distinguish it from the default Emacs launcher. Desktop file format reference: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html Notice that browser launcher script may reset PATH environment to some safe value, so executables from custom directories may be unavailable without specifying of the full path. MIME type should be among the values of the MimeType field inside the ".desktop" file or in the "mimeapps.list" file. In the former case run (with proper directory) update-desktop-database ~/.local/share/applications In the latter case add to "~/config/mimeapps.list" mapping from the MIME type to your .desktop file ---- >8 ---- [Added Associations] text/plain=emacs-a11y.desktop; ---- 8< ---- And maybe ---- >8 ---- [Default Applications] text/plain=emacs-a11y.desktop; ---- 8< ---- With such recipe a new instance of Emacs will be launched for each downloaded file. Likely you would prefer to use you main Emacs session or a special session of Emacs for untrusted content fetched from web. In such case you can use "emacsclient" command in the ".desktop" file and maybe systemd user socket+service units pair to run Emacs on demand. If you are still using emacs-25 then e.g. "--fg-daemon" option is unavailable and related files are not included in the package. For inspiration you may check http://git.savannah.gnu.org/cgit/emacs.git/tree/etc/emacsclient.desktop http://git.savannah.gnu.org/cgit/emacs.git/tree/etc/emacs.service https://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Server.html Finally a rather unrelated question. Do you find accessibility tools in Gnome or KDE inconvenient? I believed that it should be more difficult to arrange setup from scratch for fluxbox. However I never tried any of these options. > On 5/1/22, Max Nikulin wrote: >> On 01/05/2022 11:53, Samuel Wales wrote: >>> >>> [firefox did not offer to allow a command line to run my shell script >>> which sets up emacs correctly, and idk if it even ran with my .emacs. >>> does it do -q? not sure because emacs is too unusable to even find >>> that out. so firefox fails to be accessible in that dialog box. >> >> Samuel, I think, firefox does exactly what it can find in MIME >> associations (e.g. ~/.config/mimeapps.list) and in the .desktop file of >> the selected application. >> >> There is an emacsclient.desktop file in Emacs git master that tries to >> connect to the existing Emacs session. It is a relatively new addition, >> so packages for Linux distributions may miss it. >> >> You can either use standard Emacs initialization to get all your >> customization available through default emacs.desktop or create a custom >> .desktop file that contain all CLI options specific to your setup.