Re: [orca-list] Mutt questions?



I think I already maiiled Dave about the alias completion off list, but in case I did not or anyone else 
cares who's missed my various mutt posts I am 
going OT/please do not shoot me if this bores or annoys you...smile

Tab completion does not work for finishingf aliases out of the box. 
I'll put the rellevant part of my muttrc below. Anyone who would like to see my rather heavily commented 
muttrc complete can go to the vinux wiki
http://wiki.vinuxproject.org/
The mutt installation/configuration how-to is at
http://wiki.vinuxproject.org/mutt_configuration_and_basic_use
The better&more universal/distro agnostic muttrc file
http://wiki.vinuxproject.org/muttrc.ext

bind editor <space> noop
 
I seldom use mutt in a gnome or other terminal emulator/find it much better for many reasons in a console, 
but do sometime export my display in a 
vt-console and use orca witha GUI app, most commonlyl this is gedit to compose and edit email. I have key 
bindings in my muttrc to deal wilth switching 
editors on the fly. 
I have had mixed results using firefox to open urls, but will paste in myl mailcap below. It mostly uses CLI 
programs to open different mime types, i.e. 
display images, play audio streams and display .doc and other formatted documents. I have extra handlers for 
html as I like to use lynx sometimes and 
elinks others. Note that there is a line first that checks for x and uses firefox if one is in a GUI desktop, 
or has display exported running from a 
vt-console. You can use the same syntax to check for x and use a GUI image viewer, rhythmbox or some other 
GUI media player, etc before falling bacdk to 
the CLI aps I have defined for a number of common mimetypes.
Makes sure you have a /etc/mime.types file, or a personal one somewhere like in yhour home dir. 
The other thing to note is that there are different browser entries depending on whether they are for 
handling an email message body from mutt's pager, 
i.e. those that have dump in them, and other entries for handing attachments. Mutt shows the msg body as an 
attachment as well as anything that we 
traditionally think of as an attachment. Most messages that have html content show three attachments. One is 
pure html, one plain text, and a third is 
alternating, e.g. has both formats together. Some just have the last alternating format. 
I usually put a mailcap in ~/.mutt/ in case I want things different for mutt than for other programs that may 
use a system wide mailcap, or one placed 
in my $HOME folder. I see I have another example of the test=RunningX; check for plain text files, and should 
add the GUI test for .doc and .docx files 
to use libreoffice, but as I almost never get such attachments and usually just want to save them when I do 
have forgotten to do so...lol.   
The lines below can just be put in to a file called mailcap as is.
HTH.


## mailcap file for mutt
## Typicly lives in ~/.mutt/ 
## /etc/mailcap should also be read without explicit mention in your muttrc.
 #
## HTML
text/html; firefox -remote 'openURL(%s)' ; test=RunningX;
text/html; elinks %s; nametemplate=%s.html;
text/html; elinks -dump ; copiousoutput;
#text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 %s; nametemplate=%s.html 
#text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -dump %s; nametemplate=%s.html; 
copiousoutput;
#
## Plain text
text/plain; gedit %s; test=RunningX;
text/plain; nano %s;
#
## Images
image/bmp; fbi %s;
image/gif; fbi %s;
image/jpeg; fbi %s;
image/png; fbi %s;
image/tiff; fbi %s;
image/webp; fbi %s;
#
## Formatted Documents
application/msword; antiword -f %s; copiousoutput;
application/vnd.openxmlformats-officedocument.wordprocessingml.document; docx2txt.sh %s; copiousoutput;
application/rtf; unrtf --text %s; copiousoutput; 
#
## Multimedia
## Audio
audio/flac; vlc -I ncurses %s;
audio/mpeg; vlc -I ncurses %s;
audio/ogg; vlc -I ncurses %s;
audio/x-scpls; vlc -I ncurses %s;
audio/x-mpegurl; vlc -I ncurses %s;
audio/x-ms-wma; vlc -I ncurses %s;
audio/x-wav; vlc -I ncurses %s;
video/mp4; vlc -I ncurses %s;
video/ogg; vlc -I ncurses %s;
application/pls+xml; vlc -i ncurses %s;
 
-- 
     B.H.
   Registerd Linux User 521886


  Janina Sajka wrote:
Thu, Jun 04, 2015 at 07:21:27PM -0400

Dave Hunt writes:
I have two questions re:  the setup of mutt email client:

1) how do I get mutt to launch a browser and pass the selected link from 
a message?


I use my $HOME/.mailcap for this:

/begin code/
text/html; sh ~/bin/push2ff %s ; 'test= pidof firefox
/end code/

The above assumes Firefox is already running. I never succeeded getting
ff to launch via mailcap on some similar command, were it not already
running.

2) How do I make tab completion and the alias menu work?

It should just work. Say more, please.

Janina


Attached is a sample ~/.muttrc, with the only difference being that 
personally-identifiable info is removed.  Using this configuration, I 
can launch a browser using 'ctrl-b', but no url is selected.  In the 
message header input fields, the only way I can get aliases expanded is 
to type the entire nickname; tab just rings the terminal bell, and no 
menu ever comes up.

Thanks for any help,


Dave




# A basic .muttrc for use with Gmail

# Change the following six lines to match your Gmail account details
set imap_user = "MYGmeilUsername"
set imap_pass = "MYDirtySecret"
set smtp_url = "smtp://MyGmeilUsername:587/"
set smtp_pass = "IfITelluIHave2Killu"
set from = "MyGmailUsername gmail com"
set realname = "Sexy Nerd"

# Change the following line to a different editor you prefer.
set editor = "nano"
set alias_file=~/.mutt/aliases
set sort_alias=alias
set reverse_alias=yes
source ~/.mutt/aliases
#  url viewer macro
macro pager \cb <pipe-entry>'iceweasel %s&'<enter> 'Follow links in iceweasel'


# Basic config, you can leave this as is
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set imap_check_subscribed
set hostname = gmail.com
set mail_check = 120
set timeout = 300
set imap_keepalive = 300
set postponed = "+[GMail]/Drafts"
set record = "+[GMail]/Sent Mail"
set header_cache=~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/bodies
set certificate_file=~/.mutt/certificates
set move = no
set include
set sort = 'threads'
set sort_aux = 'reverse-last-date-received'
set auto_tag = yes
ignore "Authentication-Results:"
ignore "DomainKey-Signature:"
ignore "DKIM-Signature:"
hdr_order Date From To Cc
alternative_order text/plain text/html *
auto_view text/html
bind editor <Tab> complete-query
bind editor ^T complete
bind editor <space> noop 

# Gmail-style keyboard shortcuts
# macro index,pager y "unset trash\n " "Gmail archive message"
# macro index,pager d "set trash=\"imap://imap.googlemail.com/[GMail]/Bin# # #  \"\n " "Gmail delete 
message"
#  macro index,pager gi "=INBOX" "Go to inbox"
#  macro index,pager ga "=[Gmail]/All Mail" "Go to all mail"
#  macro index,pager gs "=[Gmail]/Starred" "Go to starred messages"
#  macro index,pager gd "=[Gmail]/Drafts" "Go to drafts"

#end-----------------------------------------

alias shantimission Free Software Activism & Outreach <shantimission blu org>

_______________________________________________
orca-list mailing list
orca-list gnome org
https://mail.gnome.org/mailman/listinfo/orca-list
Visit http://live.gnome.org/Orca for more information on Orca.
The manual is at http://library.gnome.org/users/gnome-access-guide/nightly/ats-2.html
The FAQ is at http://live.gnome.org/Orca/FrequentlyAskedQuestions
Log bugs and feature requests at http://bugzilla.gnome.org
Find out how to help at http://live.gnome.org/Orca/HowCanIHelp


-- 

Janina Sajka, Phone:  +1.443.300.2200
                      sip:janina asterisk rednote net
              Email:  janina rednote net

Linux Foundation Fellow
Executive Chair, Accessibility Workgroup:     http://a11y.org

The World Wide Web Consortium (W3C), Web Accessibility Initiative (WAI)
Chair,        Protocols & Formats     http://www.w3.org/wai/pf

_______________________________________________
orca-list mailing list
orca-list gnome org
https://mail.gnome.org/mailman/listinfo/orca-list
Visit http://live.gnome.org/Orca for more information on Orca.
The manual is at http://library.gnome.org/users/gnome-access-guide/nightly/ats-2.html
The FAQ is at http://live.gnome.org/Orca/FrequentlyAskedQuestions
Log bugs and feature requests at http://bugzilla.gnome.org
Find out how to help at http://live.gnome.org/Orca/HowCanIHelp


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]