Re: gnus opening attachments
() Lars Ingebrigtsen la...@gnus.org () Mon, 30 Jan 2012 17:13:07 +0100 expanded set: Sure, but that's pretty annoying to have to do. Agreed. Hence, kludge. ___ info-gnus-english mailing list info-gnus-english@gnu.org https://lists.gnu.org/mailman/listinfo/info-gnus-english
Re: gnus opening attachments
() Lars Magne Ingebrigtsen la...@gnus.org () Thu, 03 Nov 2011 22:17:21 +0100 moabi2000 moabi2...@gmail.com writes: I tracked this down to line 94 of mailcap.el associates gnumeric with vnd.ms-excel files. (vnd\\.ms-excel (viewer . gnumeric %s) (test . (getenv DISPLAY)) (type . application/vnd.ms-excel)) Replacing gnumeric with libreoffice and doing make clean make had me on my way. So there seem to be significant issues in gnus parsing of mailcap files. So basically, the built-in alist in mailcap.el seems to override your .mailcap file? I'm unable to reproduce this. If I put something in my .mailcap file, start Emacs, and then try to view something, the entries from the .mailcap file ends up first in my `mailcap-mime-data' variable. The order in ‘mailcap-mime-data’ is only relevant if there are no wildcards or Lisp-handled viewer candidates. This is because when those are present, they are de-prioritized as a result of: (setq passed (sort passed 'mailcap-viewer-lessp)) You can reproduce the problem by adding something like: image/*; xloadimage -shrink %s to ~/.mailcap and restarting. For example, doing just that, on my computer: (mailcap-mime-info image/jpeg) = /usr/bin/xloadimage '%s' which is from /etc/mailcap, i believe. One solution is to expose the lessp arg to the ‘sort’ call as a variable, so users can specify a function that causes wildcard * to mean override instead of default (as it is currently). This is more upward compatible than the alternative -- adding a variable to disable sorting entirely -- since the MIME support infrastructure in Debian (and maybe others) now includes a user-specified priority option (man update-mime). ___ info-gnus-english mailing list info-gnus-english@gnu.org https://lists.gnu.org/mailman/listinfo/info-gnus-english
Re: gnus opening attachments
Thien-Thi Nguyen t...@gnuvola.org writes: The order in ‘mailcap-mime-data’ is only relevant if there are no wildcards or Lisp-handled viewer candidates. This is because when those are present, they are de-prioritized as a result of: (setq passed (sort passed 'mailcap-viewer-lessp)) You can reproduce the problem by adding something like: image/*; xloadimage -shrink %s Ah, I see. So the idea is to allow (say) image/png to override image/* without the sorting having to be explicit. This allows the user to provide defaults for the stuff not specified in the built-in alist. It makes sense, I guess, but if the user really wants all image/* types to go somewhere specific, then there's no way to do that the current way it works, which sucks. One solution is to expose the lessp arg to the ‘sort’ call as a variable, so users can specify a function that causes wildcard * to mean override instead of default (as it is currently). This is more upward compatible than the alternative -- adding a variable to disable sorting entirely -- since the MIME support infrastructure in Debian (and maybe others) now includes a user-specified priority option (man update-mime). Right... so perhaps the best solution here would just be to add the priority stuff to mailcap.el? Then you can say image/*; xloadimage %s; priority=5 to use xloadimage on all the images? No Gnus/Emacs 24 is in a feature freeze at the moment, though, and this would count as a new feature, I think, so implementing this would have to wait a bit. -- (domestic pets only, the antidote for overdose, milk.) http://lars.ingebrigtsen.no * Sent from my Rome ___ info-gnus-english mailing list info-gnus-english@gnu.org https://lists.gnu.org/mailman/listinfo/info-gnus-english
Re: gnus opening attachments
Sergio Durigan Junior sergio...@gmail.com writes: I am seeing the same problem using Gnus. Actually, not even PDF files are being opened here. Apparently the same thing is happening here: Gnus is not copying the attachment file to /tmp/ before calling xdg-open. I think this was tweaked slightly recently in Gnus -- it'll wait a bit longer before deleting the file from /tmp/. -- (domestic pets only, the antidote for overdose, milk.) http://lars.ingebrigtsen.no * Sent from my Rome ___ info-gnus-english mailing list info-gnus-english@gnu.org https://lists.gnu.org/mailman/listinfo/info-gnus-english
Re: gnus opening attachments
On Wed, Jan 11 2012, Sergio Durigan Junior wrote: I am seeing the same problem using Gnus. Without quoting, it is hard to guess what is the same problem. Actually, not even PDF files are being opened here. Apparently the same thing is happening here: Gnus is not copying the attachment file to /tmp/ before calling xdg-open. I think the problem is that xdg-open exits immediately after opening the file and Gnus then deletes the temp file. You can test this e.g. with such a mailcap entry: application/pdf; xdg-open '%s' sleep 3; test=test $DISPLAY != ; description=Portable Document Format; nametemplate=%s.pdf Is there anything that can be done? A workaround is to use e.g. evince for PDFs. (Note to Gnus developers: Maybe mm-decode.el should handle xdg-open better, see `mm-postponed-undisplay-list´ etc). Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/ ___ info-gnus-english mailing list info-gnus-english@gnu.org https://lists.gnu.org/mailman/listinfo/info-gnus-english
Re: gnus opening attachments
Hello, I am seeing the same problem using Gnus. Actually, not even PDF files are being opened here. Apparently the same thing is happening here: Gnus is not copying the attachment file to /tmp/ before calling xdg-open. Is there anything that can be done? Thanks. ___ info-gnus-english mailing list info-gnus-english@gnu.org https://lists.gnu.org/mailman/listinfo/info-gnus-english
gnus opening attachments
Hi, At some point, attachment opening in gnus seems to have got messed up. Symptoms very similar to this old thread on fedora-userhttp://www.linux-archive.org/fedora-user/121314-gnus-cant-open-attachment.html . /etc/mailcap is: application/pdf; /usr/bin/okular %s application/*; /usr/bin/xdg-open %s xdg-open works fine from the command line, but does not in gnus. PDF attachments work fine. Others (.doc, .xls .odt etc) do not. If I view an attachement interactively (ie press 'v'), if I enter xdg-open, it does not work. If I enter 'libreoffice' it works fine. It seems the attachment isn't being copied to /tmp/ before the call to xdg-open. I'm using Gnus 0.17 Any idea how to diagnose the problem further? thanks M. ___ info-gnus-english mailing list info-gnus-english@gnu.org https://lists.gnu.org/mailman/listinfo/info-gnus-english
re: gnus opening attachments
More info: Thinking that there might be a gnus bug in the parsing of wildlcards in mailcap files, I specifically associated word and excel files with libreoffice via lines in /etc/mailcap: application/msword; /usr/bin/libreoffice %s application/vnd.ms-excel; /usr/bin/libreoffice %s This led to gnus opening word files in libreoffice just fine. BUT, excel files were being opened in gnumeric... I tracked this down to line 94 of mailcap.el associates gnumeric with vnd.ms-excel files. (vnd\\.ms-excel (viewer . gnumeric %s) (test . (getenv DISPLAY)) (type . application/vnd.ms-excel)) Replacing gnumeric with libreoffice and doing make clean make had me on my way. So there seem to be significant issues in gnus parsing of mailcap files. This is a problem, as it means gnus isn't portable across machines (eg some machines have openoffice and some libreoffice etc). Is this just a bug? ___ info-gnus-english mailing list info-gnus-english@gnu.org https://lists.gnu.org/mailman/listinfo/info-gnus-english