From: Craig STCR <craig.stcr1@gmail.com>
To: Ihor Radchenko <yantar92@gmail.com>, Max Nikulin <manikulin@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug in 9.5.3 org--file-default-apps
Date: Mon, 23 May 2022 10:14:55 -0400 [thread overview]
Message-ID: <4a2b36e9-800f-f02f-c566-3a38e14d9d8c@gmail.com> (raw)
In-Reply-To: <af8eb9cd-3941-d9b2-01a0-b08f2bf8f82b@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2598 bytes --]
Everything I mentioned so far has been my Bionic desktop. Which,
incidentally was an upgrade from Xenial, not a clean install. But... in
my Focal headless container, if I run:
>$ run-mailcap myscript
it invokes emacs. Yay! It works! DISPLAY, EDITOR, and VISUAL are all
unset or empty. There's nothing in /etc/mailcap for emacs, and what
*IS* in /etc/mailcap is (amongst others of course):
application/x-shellscript; vim %s; needsterminal
So I really need to spend some time reading man pages about mailcap,
mime, etc because that's not what I would expect, and I'm really confused.
On 5/23/22 8:59 AM, Craig STCR wrote:
> I guess maybe I should have given a little better description of what
> I tried that did NOT work? But it's a little off-topic for this
> mailing list. Nevertheless, here it is...
>
> I created a ~/.mailcap file and put this in it, which I cut and pasted
> from /etc/mailcap:
>
> application/x-shellscript; emacs27 %s; test=test -n "$DISPLAY"
>
> But obviously that's not going to change anything, since it's already
> in the system mailcap file, /etc/mailcap. DOH! And sure enough,
> running '>$ run-mailcap myscript' invokes 'less'. But what I wasn't
> expecting is that running '>$ update-mime -- local' gives me: "Error:
> '/home/user/.mailcap' is not in required format -- not updated". Not
> sure why I'm getting that when I cut-and-pasted from /etc/mailcap.
>
> No worries. I'll look in more depth later.
>
>
> On 5/23/22 8:40 AM, Craig STCR wrote:
>> Thanks all for your help!
>>
>> On 5/20/22 9:44 PM, Ihor Radchenko wrote:
>>> Dear Craig, ... or provide plain/text handler in ~/.mailcap.
>>>
>> OK, I did a first-try on this and was unsuccessful, but I'm sure it's
>> user error. I need to refresh my knowledge on how to customize
>> user-local mime database, and that will write-out a new ~/.mailcap,
>> etc, I think? I've done it before, but it was awhile ago, and I
>> wasn't paying attention to ~/.mailcap when I did it. I know for
>> Gnome I can create a .desktop file. But I know there's a way to
>> customize user-local mime database without Gnome desktop. I'll take
>> a closer look when I have a little more time.
>>
>>
>> On 5/20/22 9:44 PM, Ihor Radchenko wrote:
>>> However, I am not sure what to do on Windows/Mac.
>> Maybe try a quick-and-dirty, cross-platform solution that checks
>> non-binary files for a first-line shebang? Could use existing Emacs
>> hooks that determine major-mode when opening files.
>>
>> Again, thanks all for your help!
>>
>> Best,
>> -Craig
>>
>
[-- Attachment #2: Type: text/html, Size: 3739 bytes --]
next prev parent reply other threads:[~2022-05-23 14:16 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-15 16:49 Bug in 9.5.3 org--file-default-apps Craig STCR
2022-05-16 4:53 ` Ihor Radchenko
[not found] ` <6615610d-93ae-171f-b554-3f4cc79354cc@gmail.com>
2022-05-16 8:33 ` Ihor Radchenko
[not found] ` <86692975-4d5f-6933-3227-c6b208f76862@gmail.com>
2022-05-16 11:57 ` Ihor Radchenko
2022-05-16 15:14 ` Max Nikulin
2022-05-16 19:15 ` Craig STCR
2022-05-16 19:29 ` Craig STCR
2022-05-17 16:03 ` Max Nikulin
2022-05-18 11:36 ` Ihor Radchenko
2022-05-18 16:10 ` Max Nikulin
2022-05-19 13:39 ` Ihor Radchenko
2022-05-19 14:45 ` Max Nikulin
2022-05-20 8:22 ` Ihor Radchenko
2022-05-20 11:31 ` Max Nikulin
2022-05-21 1:44 ` Ihor Radchenko
2022-05-21 14:56 ` Max Nikulin
2022-05-22 4:10 ` [PATCH] " Ihor Radchenko
2022-05-22 7:40 ` Max Nikulin
2022-05-26 4:23 ` [PATCH v2] " Ihor Radchenko
2022-05-29 6:07 ` Max Nikulin
2022-05-30 14:00 ` [PATCH v3] " Ihor Radchenko
2022-05-30 15:38 ` Max Nikulin
2022-05-31 15:07 ` Max Nikulin
2022-06-04 13:42 ` [DISCUSSION, default settings] Using mailcap as default handler for opening file links (was: [PATCH v3] Re: Bug in 9.5.3 org--file-default-apps) Ihor Radchenko
2022-06-04 17:01 ` Greg Minshall
2022-06-06 12:50 ` [DISCUSSION, default settings] Using mailcap as default handler for opening file links Max Nikulin
2022-06-06 15:22 ` Max Nikulin
2022-06-06 17:47 ` Bhavin Gandhi
2022-06-10 16:38 ` Max Nikulin
2024-02-12 12:36 ` Ihor Radchenko
2024-02-13 10:59 ` Max Nikulin
2024-02-13 11:27 ` Ihor Radchenko
2024-02-13 15:44 ` Max Nikulin
2024-02-13 15:47 ` Max Nikulin
2024-02-14 14:51 ` Ihor Radchenko
2024-02-27 10:43 ` Max Nikulin
2022-05-29 7:07 ` [PATCH v2] Re: Bug in 9.5.3 org--file-default-apps Max Nikulin
2022-05-23 12:40 ` Craig STCR
2022-05-23 12:59 ` Craig STCR
2022-05-23 14:14 ` Craig STCR [this message]
2022-05-23 14:32 ` Craig STCR
2022-05-25 6:18 ` Ihor Radchenko
2022-05-23 15:28 ` Max Nikulin
2022-05-25 6:24 ` Ihor Radchenko
2022-05-25 11:38 ` Craig STCR
2022-05-25 6:10 ` Ihor Radchenko
[not found] ` <e9b4e88d-3807-9080-fa86-c297b17794cb@gmail.com>
2022-05-16 12:38 ` Craig STCR
2022-05-18 11:38 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4a2b36e9-800f-f02f-c566-3a38e14d9d8c@gmail.com \
--to=craig.stcr1@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=manikulin@gmail.com \
--cc=yantar92@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).