Re: disabling F4 opening large files
I have tried following, but that does not have any effect: include/video Open=([ $(id -u) != 0 ] [ $DISPLAY ] mplayer %f /dev/null 21 ) View=%view{ascii} mediainfo %f Edit= When I click F4 on a video file, mc still tries to open in in my text editor. What am I doing wrong? Martin, I can not comment about what you are doing wrong but what I understand about F4 is that it is supposed to open the raw file, whatever it is. This means to look into what is inside the file, for the purpose of editing it or otherwise seeing what is really there. That means if for example it is a binary file then one may be privileged to see plain text or, possibly, a bunch of hex numbers in a nice rectangular array. One might keep in mind that this is exactly what some people want to see, and they are glad to have a convenient way to do that. Theodore, I have no doubt some people can find it useful. However, I don't need to edit raw mpeg or mp3 files, and I would like to have f4 selectively disabled. I am not arguing whether this functionality is useful or not, I was just asking this list whether there is na option to configure it. It the answer is not, this is hardcoded, then so be it. thanks, Martin ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: disabling F4 opening large files
Martin Vegter martin.veg...@aol.com wrote (Tue, 29 Apr 2014 20:39:41 +0200): #View (F3), Edit (F4) When I click F4 on a video file, mc still tries to open in in my text editor. What am I doing wrong? F3== View F4== Edit ENTER == Open include/video# does nothing ...Open=(mplayer %f /dev/null 21 ) # you might have to apply it to a file name pattern regex/\.(wmv|WMV)$ Include=video # using default or freedesktop binding, I guess Open= ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: disabling F4 opening large files
When I click F4 on a video file, mc still tries to open in in my text editor. What am I doing wrong? F3== View F4== Edit ENTER == Open include/video# does nothing ...Open=(mplayer %f /dev/null 21 ) # you might have to apply it to a file name pattern regex/\.(wmv|WMV)$ Include=video of course, I have matching pattern like this (I just left it out for the sake of brevity): regex/\.([aA][vV][iI])$ Include=video ... ... include/video Open=([ $(id -u) != 0 ] [ $DISPLAY ] mplayer %f ) View=%view{ascii} mediainfo %f Edit= ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: disabling F4 opening large files
On Wed, 2014-04-30 at 11:24 +0200, Martin Vegter wrote: Edit= Maybe you can try something like /bin/true instead of leaving it empty? -- Sincerely yours, Yury V. Zaytsev ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: disabling F4 opening large files
On 04/30/2014 11:56 AM, Yury V. Zaytsev wrote: On Wed, 2014-04-30 at 11:24 +0200, Martin Vegter wrote: Edit= Maybe you can try something like /bin/true instead of leaving it empty? Indeed, this works. Thanks a lot Edit=true Is there any similar way to disable executing executable when Enter is pressed? Martin ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: disabling F4 opening large files
On Wed, 2014-04-30 at 14:03 +0200, Martin Vegter wrote: Is there any similar way to disable executing executable when Enter is pressed? Sadly, I don't think so, it seems to be hardcoded in panel.c, see: /* Check if the file is executable */ If you don't want to patch, then you can try setting empty Open for type of binaries and scripts, which is imperfect, but might be good enough. -- Sincerely yours, Yury V. Zaytsev ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
disabling F4 opening large files
Dear list, when I press F4, midnight opens selected file in my editor. This happens for all files, even for video, mp3, iso image,... This obviously makes no sense. Is there a way to disable F4 for specified files ? in mc.ext, I see only the binding for F3 and ENTER Open= View= Which brings me to my second point: Is it possible to disable executing an executable when pressed ENTER ? many thanks, Martin ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: disabling F4 opening large files
Hello Martin, On Tue, 29 Apr 2014 16:01:51 +0200 Martin Vegter martin.veg...@aol.com wrote: Dear list, when I press F4, midnight opens selected file in my editor. This happens for all files, even for video, mp3, iso image,... This obviously makes no sense. Is there a way to disable F4 for specified files ? in mc.ext, I see only the binding for F3 and ENTER Open= View= Which brings me to my second point: Is it possible to disable executing an executable when pressed ENTER ? Maybe it should just ask confirmation when attempting to open a binary file? Regards, -- wwp signature.asc Description: PGP signature ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: disabling F4 opening large files
when I press F4, midnight opens selected file in my editor. This happens for all files, even for video, mp3, iso image,... This obviously makes no sense. Is there a way to disable F4 for specified files ? in mc.ext, I see only the binding for F3 and ENTER Open= View= Which brings me to my second point: Is it possible to disable executing an executable when pressed ENTER ? Maybe it should just ask confirmation when attempting to open a binary file? I would prefer no action at all when pressing F4. I can define rules for: Open= View= but AFAIK, there is no option for Edit= or is there? ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: disabling F4 opening large files
On 18:06 Tue 29 Apr , Martin Vegter wrote: when I press F4, midnight opens selected file in my editor. This happens for all files, even for video, mp3, iso image,... This obviously makes no sense. Is there a way to disable F4 for specified files ? in mc.ext, I see only the binding for F3 and ENTER Open= View= Which brings me to my second point: Is it possible to disable executing an executable when pressed ENTER ? Maybe it should just ask confirmation when attempting to open a binary file? I would prefer no action at all when pressing F4. I can define rules for: Open= View= but AFAIK, there is no option for Edit= or is there? I think there is. Read ./home/YOU/.config/mc/mc.ext: #Open (if the user presses Enter or doubleclicks it), # #View (F3), Edit (F4) ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: disabling F4 opening large files
I would prefer no action at all when pressing F4. I can define rules for: Open= View= but AFAIK, there is no option for Edit= or is there? I think there is. Read ./home/YOU/.config/mc/mc.ext: #Open (if the user presses Enter or doubleclicks it), # #View (F3), Edit (F4) I have tried following, but that does not have any effect: include/video Open=([ $(id -u) != 0 ] [ $DISPLAY ] mplayer %f /dev/null 21 ) View=%view{ascii} mediainfo %f Edit= When I click F4 on a video file, mc still tries to open in in my text editor. What am I doing wrong? ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: disabling F4 opening large files
On Tue, 29 Apr 2014, Martin Vegter wrote: I would prefer no action at all when pressing F4. I can define rules for: Open= View= but AFAIK, there is no option for Edit= or is there? I think there is. Read ./home/YOU/.config/mc/mc.ext: #Open (if the user presses Enter or doubleclicks it), # #View (F3), Edit (F4) I have tried following, but that does not have any effect: include/video Open=([ $(id -u) != 0 ] [ $DISPLAY ] mplayer %f /dev/null 21 ) View=%view{ascii} mediainfo %f Edit= When I click F4 on a video file, mc still tries to open in in my text editor. What am I doing wrong? Martin, I can not comment about what you are doing wrong but what I understand about F4 is that it is supposed to open the raw file, whatever it is. This means to look into what is inside the file, for the purpose of editing it or otherwise seeing what is really there. That means if for example it is a binary file then one may be privileged to see plain text or, possibly, a bunch of hex numbers in a nice rectangular array. One might keep in mind that this is exactly what some people want to see, and they are glad to have a convenient way to do that. Cheers, Theodore Kilgore ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc