Re: Is there a tool I can use to convert a whole email to webpage or something alike?
On 2015-11-16, Magicloud Magiclouds wrote: > Hi, > > Using Mutt, one pain is dealing with multi-media emails. Yes, with > w3m, I could almost read the email. And I could save the pictures then > view them. But this is too much work if I repeat it too many times. > > So is there a way that, I could press a hotkey in Mutt, it would pipe > current email to some converter then open browser with the result > webpage? Check out the viewhtmlmsg program here: https://bitbucket.org/blacktrash/muttils Regards, Gary
Re: How to ask mutt to not check for new mail
On 2015-06-18, Xu Wang wrote: > On Thu, Jun 18, 2015 at 5:48 AM, Suvayu Ali wrote: > > On Thu, Jun 18, 2015 at 04:46:02AM -0400, Xu Wang wrote: > >> > >> It is actually not documented (in 'man muttrc') what happens if > >> mail_check is set to 0. Does this mean it never checks or that it > >> checks as often as possible? > > > > Look at the main manual (usually available from Mutt with F1). On my > > system it resides in: > > > > /usr/share/doc/mutt-kz/manual.html > > /usr/share/doc/mutt-kz/manual.txt > > > > Hope this helps, > > Ah interesting. I did not realize about this. I will read it. > > However, searching for "mail_check" gives me: > No matching help pages found in “Terminal”. > > I'm not sure if there is such a way to search outside of restricted > scope "Terminal". Mutt and Terminal both use F1 for help. Terminal sees the key first, so it "wins". You can get around that by disabling F1 in Terminal, binding a different key to help in mutt, or by accessing mutt's help from the mutt command line with: :push Regards, Gary
Re: Exact semantics of ignore?
On 2015-05-27, Ian Zimmerman wrote: > The part of the documentation about the "ignore" command talks about > "patterns". As far as I can see it never precisely says what kind of > patterns these are - regexps, shell globs, fixed substrings, or what. Look in the mutt manual for Chapter 4, Advanced Usage, and Section 2, Patterns: Searching, Limiting and Tagging. > The reason I ask is I had "x-" as one of the patterns, precisely as the > documentation suggests (in an offhand example). But Mario's posts from > today have an X-URL header and it was not weeded. It is when I add > "x-url" to the ignore. What gives? Patterns are case-insensitive as long as they contain only lower-case letters. If you include an upper-case letter in a pattern, or include a range (e.g., [a-z]) that because of your locale includes an upper-case letter, the pattern becomes case-sensitive. That could be why "x-url" in the pattern is not matching "X-URL" in the header, but that's just a guess. Regards, Gary
Re: TAB key in index
On 2015-03-26, Aitor wrote: > Hi all, > > the TAB key (in the index) cycles among unread messages. I would like to > change its behaviour so that it cycles among unread _and_ flagged > messages (e.g., those having a "!" mark). > > Do you know it this is feasible ? Try this: :macro index /~N|~F HTH, Gary
Re: How to prevent file disappearing before browser sees it?
On 2015-01-22, David Champion wrote: > To solve this you need a wrapper script around Firefox. The wrapper > will take the file content from $1 and save it somehow for Firefox, so > that mutt may delete the original. > > There are various techniques for this. I personally like the approach > of hard-linking the temp file so that it doesn't use more storage. > Something like this: > > #!/bin/sh > COPY="$1.firefox.html" > ln "$1" "$COPY" > /usr/bin/firefox "$COPY" & I'm surprised that linking works because it used to be that mutt overwrote the temporary file with 0s before deleting it. I thought it still did, but I don't know for sure. Another place that you might look for solutions, Chris, is here: http://www.spocom.com/users/gjohnson/mutt/#background Regards, Gary
Re: mutt/vim line wrap configuration
On 2014-11-19, Dale wrote: > On Wed, Nov 19, 2014 at 08:34:15PM +, John Long wrote: > > On Wed, Nov 19, 2014 at 03:15:15PM -0500, Dale wrote: > > > read in the docs and on google > > > > > > this line in my ~/.slrnrc > > > set editor="vim +':set textwidth=0' +':set wrapmargin=0' +':set wrap'" > > > > > > seems to wraps when I type or copy/paste into vim > > > > Problem solved! > > not yet, when I type, as opposed to cut/paste, it wraps but it puts a plus > sign in front of each line, this would be especially troublesome with URLs There are two senses in which Vim wraps text. One is that with 'wrap' on, Vim will wrap lines in the display so that all characters appear in the display and none extend beyond the right side of the display. You can see this by typing a line longer than than the width of Vim's display and alternately setting 'wrap' and 'nowrap'. Note that the characters in the line are not affected by these settings. Note also that the point at which the line is wrapped is the right side of the display and that this point is not affected by either 'textwidth' or 'wrapmargin'. The other sense is that of adjusting the lengths of lines themselves so that they are not longer than some limit. To do this, Vim adds and removes newlines in the text so that lines are within the limits set by 'textwidth' or 'wrapmargin'. The rules Vim uses to determine when to break a line by inserting a newline are a little complicated and are affected by the setting of 'formatoptions'. In most cases, Vim just automatically inserts a newline where it seems that it should. If the formatting doesn't look right to you, executing gqap will re-format the current paragraph and usually adjusts the lines the way you think it should. For more on this, see :help 25.1 :help 25.4 :help 'formatoptions' :help 'fo-table' :help gq The problem you seem to be having is that you are configuring Vim to wrap the display of the lines you enter, but not wrap them by inserting actual line breaks. Therefore the lines you enter are really long and unbroken and therefore appear with a leading + when displayed by mutt. If you want Vim to actually break lines so that they are not longer than, say, 72 characters, use :set wrapmargin=0 :set textwidth=72 The default settings of 'formatoptions' are probably fine unless you run into further problems that changing those settings might fix. HTH, Gary -- Note to purists: I know that Vim doesn't really insert newlines into the text as some other editors would, but in most cases it appears to and the I think the explanation is close enough in this case.
Re: Display image in attached html file
On 2014-11-11, steve wrote: > Hi all, > > I'm receiving reports in html containing images. In mutt, those images > are separated from the html file. For example, when I press 'v', I see > the html file on one line and the image on another. Pressing 'enter' > fires up firefox to display the html file. Problem, the image will not > show in that page (it doesn't find the image's address). > > I've been looking around for a solution but failed until now, so > that's the reason I'm posting here. > > How could I achieve that? I use viewhtmlmsg from the muttutils package, https://bitbucket.org/blacktrash/muttils. It opens the message, including images, in a browser. To make it more convenient to use, I have these macros in my ~/.vimrc which use the shell script shown below. # View the message using viewhtmlmsg. # macro index,pager ,v "\ set my_pipe_decode=\$pipe_decode my_wait_key=\$wait_key \ pipe_decode=no wait_key=no\ mutt_viewhtmlmsg -s\ set pipe_decode=\$my_pipe_decode wait_key=\$my_wait_key \ &my_pipe_decode &my_wait_key\ " "view HTML (safe) in browser" macro index,pager ,V "\ set my_pipe_decode=\$pipe_decode my_wait_key=\$wait_key \ pipe_decode=no wait_key=no\ mutt_viewhtmlmsg\ set pipe_decode=\$my_pipe_decode wait_key=\$my_wait_key \ &my_pipe_decode &my_wait_key\ " "view HTML (unsafe) in browser" - mutt_viewhtmlmsg - #!/bin/bash tmpfile=$(tempfile) || exit 1 cat > "$tmpfile" export BROWSER=midori { viewhtmlmsg "$@" < "$tmpfile" >/dev/null 2>&1 rm -f "$tmpfile" } & Regards, Gary
Re: Format flowed equals no space in depth 1
On 2014-09-14, Derek Martin wrote: > This is one important way in which the "hand some functionality > off to another program" model falls down. I don't think that this is a problem with that model. There is no reason that an e-mail client should not hand off the task of editing a message to an external editor capable of editing a markup language. The problem is that that are no stand-alone WYSIWYG HTML editors, that I know of anyway. Regards, Gary
Re: Format flowed equals no space in depth 1
On 2014-09-13, Will Yardley wrote: > I don't think the stuff_all_quoted patch has been kept up to date. No, it hasn't. One reason is that I no longer work at the company where mutt was my primary mail client and where I regularly received all sorts of different mail formats including format=flowed, so even if I was motivated to keep it up to date, I don't have a good way to test it. I don't remember the last time I received a format=flowed message. Regards, Gary
Re: Colouring deletions [Was: mail box vanished]
On 2014-08-12, Gary Johnson wrote: > Something else worth mentioning is that the effect of these rules > depends on the order in which they are defined. Later rules > supersede earlier rules. I didn't say that very well. Rules are executed in the order in which they are defined, so later rules are executed after earlier rules and their coloring may replace that of earlier rules. Regards, Gary
Re: Colouring deletions [Was: mail box vanished]
On 2014-08-12, Cameron Simpson wrote: > On 11Aug2014 19:36, Erik Christiansen wrote: > >On 11.08.14 09:33, Cameron Simpson wrote: > >>I colour deleted messages in dark blue (and my terminal has a black > >>background) so that at least makes such accidents visually obvious. > > > >That looks useful. I tried a quick: > > > >:color index black default ^[0-9]+..D > > > >but that coloured neither the pre-existing deleted messages, nor one > >subsequently deleted. Is your working solution very different? > > I use: > > color index blue black "~D" > > I see someone's already mentioned "Patterns" to you instead of regexps:-) > > In case anyone cares, I list my colour scheme below. Bear in mind I > work in green-on-black terminals. > > The main points of interest are: > > - "new" messages get cyan index lines - more visible than "read" messages > > - serious warning messages from monitoring systems get red index lines > > - message bodies colour "(FAIL|ERROR|CRITICAL|DOWN)" in red also Something else worth mentioning is that the effect of these rules depends on the order in which they are defined. Later rules supersede earlier rules. Regards, Gary
Re: mutt Applies fcc-hooks Inconsistently
On 2014-06-28, Koralatov wrote: > (And my understanding of mutt's hook operation was that the last > instruction overrides any preceding ones, so having the default > last shouldn't be right anyway.) Mutt has two types of hooks. One type invokes an operation that can be performed multiple times per event. An example of that type would be the folder-hook. There are all sorts of settings you might like to make or operations you might like to perform on entering a folder having certain attributes. When mutt enters a folder, it traverses its list of folder-hooks looking for patterns that match the folder name, executing every match it finds. When setting a particular option with that type of hook, you need to specify the more general patterns first and the more specific patterns later because the setting performed by the last matching pattern "wins". The other type of hook invokes an operation that can be performed only once per event or that can set only one value per event. An example of that type would be the fcc-hook. You can set only one fcc: mailbox per message. Therefore, when searching the list of fcc-hooks, mutt sets the fcc: mailbox to the value of the first matching hook and stops searching. When specifying that type of hook, you need to specify the more specific patterns first and the more general patterns later because if mutt finds a match to a general pattern, it will stop searching and never try a later more specific pattern. The mutt manual describes this behavior of the fcc-hook in the section, "Specify Default Fcc: Mailbox When Composing", as Mutt searches the initial list of message recipients for the first matching regexp and uses mailbox as the default Fcc: mailbox. > The correct version is below: > > fcc-hook.* =Sent > fcc-hook@googlegroups\.com /dev/null > --> fcc-hook@koralatov\.com /dev/null <-- works! > fcc-hook@lists\.alioth\.debian\.org /dev/null > fcc-hook@lists\.sourceforge\.net/dev/null > fcc-hook@mailman\.lug\.org\.uk /dev/null > fcc-hook@reply\.github\.com /dev/null > fcc-hook@six\.pairlist\.net /dev/null > fcc-hookmutt-users@mutt\.org/dev/null > > Since my original email, I've tried the following to fix the problem: > > * Removing the leading `@' symbol from the domains (even though it > works fine for the koralatov.com domain /with/ the `@' symbol) > * Tried the form `*@googlegroups\.com' > * Tried the form `.*@googlegroups\.com' > * Tried the form `\.*googlegroups\.com' > > None of the above have worked; mutt still defaults to using =Sent as > the FCC for outgoing e-mails to everything *except* the @koralatov.com > domain. I'm still completely bamboozled, and no closer to fixing it. In your case, the first fcc-hook pattern is ".*" which matches anything and prevents later patterns from being considered. That of course raises the question: why does the pattern "@koralatov\.com" seem to work? Do you have "@koralatov.com" anywhere else in your muttrc that would cause it to be used as the default fcc: mailbox, overriding Sent? I'm thinking of options such as $copy, $record, $save_name, $force_name and the fcc-save-hook. I'm afraid I'm not familiar enough with the various factors affecting the setting the fcc: mailbox to have any better idea of where the problem might be. Regards, Gary
Re: Writing a wrapper for the editor: mutt aborts in-between
On 2014-05-17, Karl Voit wrote: > I thought that mutt has a "weird" method of tracking changes to the > tempfile. Mutt checks the modification time on the temp file before it runs the editor, then checks the modification time again when the editor exits. If the modification time hasn't changed, mutt assumes that you have not changed the file and it aborts the sending of the message. Regards, Gary
Re: I how to customize the help line on top
On 2014-04-20, michael kaiser wrote: > On 08:42 Sat 19 Apr , Gary Johnson wrote: > > On 2014-04-19, Maurice McCarthy wrote: > > > > > On 18/04/2014, michael kaiser wrote: > > > > Hallo all > > > > > > > > My mutt display a help line with any important keys. > > > > Can I customize this line with my own favorite key-bindings? > > > > > Yes you can. See the Mutt manual. In mutt press F1 or see > > > http://www.mutt.org/doc/manual.txt and search for "key bindings". > > > > > > You have to use the bind command in ~/.muttrc or in Mutt running. You > > > have to restart Mutt to see the changes. > > > > The question was not whether one can customize key bindings but > > whether those key bindings can be displayed in the top line. > > > > I'm pretty sure but not positive that that can't be done. > > > > Regards, > > Gary > > > > I use mutt more than one imap account. > I use macros F2 F3 ... to switch between this accounts. > I want display "F2 ACCOUNT_JOB" "F3-ACCOUNT_PRIVAT". > I need a small recall so see what key is what. > The standard keys are not so important. If all you need is an occasional reminder of which key is for which account, typing ? will show the help menu for the current screen. The help menu includes user-defined bindings and macros. The only other way I can think of to display a custom line on the screen is to use the status line and the 'status_format' variable. Fitting your function key operations on that line could be a tight squeeze, though, unless you use a wide terminal. Note that I'm replying to the list as well so that others can see and comment on your request and my reply. Regards, Gary
Re: I how to customize the help line on top
On 2014-04-19, Maurice McCarthy wrote: > On 18/04/2014, michael kaiser wrote: > > Hallo all > > > > My mutt display a help line with any important keys. > > Can I customize this line with my own favorite key-bindings? > Yes you can. See the Mutt manual. In mutt press F1 or see > http://www.mutt.org/doc/manual.txt and search for "key bindings". > > You have to use the bind command in ~/.muttrc or in Mutt running. You > have to restart Mutt to see the changes. The question was not whether one can customize key bindings but whether those key bindings can be displayed in the top line. I'm pretty sure but not positive that that can't be done. Regards, Gary
Re: a few suggestions for the docu
On 2014-04-13, Ulrich Lauther wrote: > BTW, in my current environment - Ubuntu 12.4 - pressing F1 does NOT > bring up the mutt-manual, but the manual of the gnome-termial in which > it is run. To work around this, you can execute :push where all those characters are typed literally, followed by the Enter key. Regards, Gary
Re: strange chars with mutt, xterm, vim and gnome
On 2014-03-21, Elimar Riesebieter wrote: > * Gary Johnson [2014-03-20 14:22 -0700]: > > [...] > > It would be useful to know the value of 'fileencoding' in Vim as > > well. 'encoding' is the encoding used internally by Vim. > > 'fileencoding' is the encoding used when writing a buffer out to a > > file. Check the results of this: > > > > :verbose enc? fenc? > > Shouldn't that be > :verbose set enc? fenc? > ? Yes. Sorry. Thanks. Regards, Gary
Re: strange chars with mutt, xterm, vim and gnome
On 2014-03-20, Derek Martin wrote: > On Thu, Mar 20, 2014 at 11:01:23AM +0100, Louis-David Mitterrand wrote: > > In gnome when I reply some french emails with accented chars I > > sometimes get weird wide chars in place of the accented characters in > > vim. The accented character would appear normally when reading the > > message in mutt's pager but become a double character in vim's quoted > > text. > We know this: > - Your locale looks fine > - as it happens the encoding you set in vim should match > - Characters display correctly in the pager It would be useful to know the value of 'fileencoding' in Vim as well. 'encoding' is the encoding used internally by Vim. 'fileencoding' is the encoding used when writing a buffer out to a file. Check the results of this: :verbose enc? fenc? It could also be that this Vim was not compiled with multibyte support. You can check this by executing ":version" and looking for the + or - in front of "multi_byte". HTH, Gary
Re: disable text wrapping
On 2014-02-28, YuGiOhJCJ Mailing-List wrote: > Hello, > > On Mutt 1.5.21, my editor is Vim 7.3. > I don't like when it breaks automatically my lines when I am > writing an e-mail. > > Is there a way to disable the text wrapping in Mutt? > (I saw the "wrap" setting in ~/.muttrc that can be set to > positive, negative or null value but in these 3 cases, the text > wrapping is still enabled) As Sebastian wrote, this is a Vim configuration issue, not a Mutt configuration issue. There are easier ways to solve this than by making settings manually every time you edit a message, though. Most Linux distributions configure their Vim packages to have filetype detection on. If yours does not, you can enable this by putting the following in your ~/.vimrc. filetype on Then create a new file under your ~/.vim directory, ~/.vim/after/ftplugin/mail.vim. In that file put the Vim commands you want executed when you start editing a message. In your example, that would be setlocal formatoptions-=t That tells Vim not to auto-wrap text in that buffer. Then you don't have to think about it anymore. If that doesn't do what you want, come back with a description of the problem and we can help. It would be better, though, to ask Vim-related questions on the vim_...@googlegroups.com mailing list. In Vim's help system, see also :help :filetype :help 'formatoptions' :help 'textwidth' Regards, Gary
Re: folder-hook for sending to lists
On 2014-02-03, glphvgacs wrote: > On Mon, Feb 03, 2014 at 11:09:42AM -0500, glphvgacs wrote: > > alright, i saw the unhook, let me think if and how i can use it here. > > > > cann't unhook from within a hook : > folder-hook . "unhook *" > > this has no effect, or not the effect i want it to have: > unhook * Sure you can. At least you can unhook specific hook types and I see no reason that you couldn't unhook all hooks, although that might kill the execution of other folder-hooks until they are redefined. As an example from my muttrc: folder-hook . 'unhook message-hook' Regards, Gary
Re: folder-hook for sending to lists
On 2014-02-02, glphvgacs wrote: > when starting the Mail composition in mutt, is there a way skip the 'To:' > header by filling it up based on a given pattern? > i don't think a folder-hook would do this since i don't think there is such > a thing as 'set to = ' in configuration file (correct me if i'm wrong > please). so perhaps a macro? Yes. Here is what I do. I have a separate folder for each list to which I'm subscribed and a folder-hook for each of those lists. I also use aliases to expand the list name to the full address of the list. Here are the hook and alias I use for mutt-users: folder-hook +Incoming/mutt-users\ 'macro index M "mutt-users^M^M" "mail to list"' alias mutt-usersmutt-users@mutt.org Note that the "^M" is an ASCII carat followed by an ASCII upper-case M. With that, I type M to send a new message to the list and the first prompt I see is for the Subject. Regards, Gary
Re: message body (text) not displayed in compose menu
On 2013-12-07, Martin Vegter wrote: > On 2013-12-07 19:12, Patrick Shanahan wrote: > >* Martin Vegter [12-07-13 10:44]: > > [...] > >>Yes, when I exit the editor, I am done with editing. That does not mean > >>however, that I could not see the text of my message. A the moment 70% > >>of the lower screen in compose editor is empty (black). Why not use > >>that empty space to display the message-to-be sent? That would seem > >>logical to me. > > > >What really seems "logical" to me is to ascertain that I am finished > >editing the message body prior to exiting the editor. Should I decide > >that is not so, only one keystroke is required to return to the editor. > > how do you decide the message needs re-editing, when you don't see > the message in the compose menu? How many times and ways do you need to see a message before deciding to send it? If you want to see it, press Enter; if you want to edit the body, press e; if you want to edit it with headers included, press E. Whichever way you choose to view it, you then decide whether it is OK to send or not. Decision done. What do you think is going to change between the time you look at the message and the time you press y to send it? Regards, Gary
Re: w3m HTML displays
On 2013-12-01, Peter Davis wrote: > As I understand it, gnus uses w3m to display html messages if it's > available. > > I have my .mailcap file setup to use w3m to display html messages > in mutt, but they don't look like the same messages do in gnus. > There's less use of color, italics and bold and other text > features. Also, column layouts in the html appear in gnus but not > in mutt. > > Here's my .mailcap entry: > > text/html; w3m -I %{charset} -dump %s -cols $COLUMNS; copiousoutput; > description=HTML Text; nametemplate=%s.html > text/*; more > > Is there anything I can do to get mutt's w3m display to look more > like that in gnus? According to the Gnus Manual (http://www.gnu.org/software/emacs/manual/html_node/gnus/HTML.html) section 4.3 HTML: If you have w3m installed on your system, Gnus can display HTML articles in the article buffer. There are many Gnus add-ons for doing this, using various approaches, but there's one (sort of) built-in method that's used by default. So to start with, since there appear to be several ways for gnus to display HTML, and since I didn't see any screen shots in the manual, I don't know what you mean by "look more like that in gnus." That aside, there are two ways that mutt can use w3m to display HTML messages. One is to use w3m's -dump option to output the message formatted as plain text, as in your .mailcap entry, and display it using mutt's pager. When used that way, w3m does not output any color information, so the only color that mutt can add to the text is according to mutt's pager's coloring rules. The other is to run w3m on the HTML part of the message via the attachment menu (bound to 'v' by default). In this method, w3m is doing the rendering of the message directly to your terminal, including any coloring of the text, and is not interacting with mutt at all, so you should see all the color rendering w3m is capable of. The coloring that w3m applies is also affected by its configuration, so there may be configuration options that gnus sets that you aren't setting in your .mailcap entry and that aren't in your ~/.w3m/config file. The column layouts should appear the same in both cases and, if gnus is indeed using w3m for HTML rendering, should appear the same in gnus. If you can be more specific and give at least one reproducible example, I can take a look at the column layout problem. Regards, Gary
Re: Unsetting mailboxes?
On 2013-07-08, Tycho Andersen wrote: > Hi all, > > I'm switching between two different imap servers which have some > different mailboxes that I would like to monitor. Unfortunately, mutt > has no way to monitor two imap servers at once, so I'd like to create > two modes, one for each server, where when you're in one mode, you see > one list of mail boxes, and vise versa. > > To do this, I need to clear the `mailboxes' list and set it to > something new, so that only the mailboxes for that server are present. > Is there a way to do this? You can use the unmailboxes command. See the mutt manual. Regards, Gary
Re: Search utilities for use with mutt - I use mairix but it's not perfect
On 2013-05-08, Erik Christiansen wrote: > On 07.05.13 10:58, Gary Johnson wrote: > > On 2013-05-08, Erik Christiansen wrote: > > You might find this script, which I've named vimgrep, useful. > > > > #!/bin/bash > > > > tmp=$(mktemp) > > > > cat > $tmp > > exec < /dev/tty > > vim --cmd 'let &efm=&gfm' -q $tmp "$@" > > rm $tmp > > > > It's invoked like this: > > > > grep -Hn | vimgrep > > That hangs here, because /dev/tty is not used. (Confirmed by fuser) > Depending on which xterm it's invoked in, it'll be /dev/tty1 ... 6. > If I knew what the redirection is expected to achieve, then we could > probably hack something which works. I'm not sure of the correct terminology to use here, but /dev/tty is an alias for the tty actually used by your terminal. So any process can access /dev/tty and it will get the correct tty allocated to its process group. You do not need to specify a particular device, such as /dev/tty1, etc. If /dev/tty is not working for you, something is wrong with your environment. It's at least not consistent with common Unix practice. The reason for the redirection is to connect vim's stdin to your terminal. Otherwise, vim's stdin will be connected to the script's stdin which is a pipe and vim will be unhappy: Vim: Warning: Input is not from a terminal and upon exit will leave your terminal settings messed up, e.g., no echo. > > All the lines that grep finds will be fed to vim as a quickfix list, > > which you can traverse with :cn, :cp, etc., or browse with :copen. > > That's what I was trying to get away from, because (as described) it was > very clumsy to step blindly through the helpgrep hits, using those > commands. That's why I use the mappings I described. Typing :cn and :cp to traverse the quickfix or :helpgrep lists is just ridiculous. Find a pair of keys you don't use for anything else and map them to :cn and :cp. > I have now tried your :copen suggestion with helpgrep, but > that splits the window into 3, introducing a great deal if visual > clutter. Agreed. I don't use :copen much myself either. > My method is much more attractive, in that it keeps the list of search > hits visually separate, avoids those cluttered vim window splits, and > allows any regex. (Helpgrep seemed very limited in that regard when I > tried it, just now.) :helpgrep is limited to single-line patterns, but other than that, I think it will accept any Vim regex. > Keeping the list in a separate buffer, and using "gf", re-uses vim > commands which I use a lot. When trying the quickfix alternative, > the need to both ":q" _and_ ":ccl", to get rid of the window > splits, is also annoying. Using "gf" means having to go back and forth between the window containing the list of files and the selected file. Using and mapped to :cn and :cp just zips among all the matches. Regards, Gary
Re: Search utilities for use with mutt - I use mairix but it's not perfect
On 2013-05-08, Erik Christiansen wrote: > If you always have a spare xterm or two open, then it is quick to bring > one to the foreground, whack in a quick egrep invocation, and pipe > its output to "more", or redirect it to a file, e.g: > > egrep -n 'line *number' /usr/local/src/vim73/runtime/doc/* > /tmp/vim > > Here I had become impatient with "helpgrep" in vim taking too long to > step (via successive :cnext) to what I was hoping to find. That egrep > invocation put all matches into /tmp/vim, which I opened with vim, then > did a "gf" (go file) on the filename preceding the matching text on the > most promising line I could see. If no good, Ctrl-^ whips us back to > the egrep-generated file index, and we "gf" on the next likely > candidate. Pretty much any text in the filesystem succumbs rather > quickly to such searching.) You might find this script, which I've named vimgrep, useful. #!/bin/bash tmp=$(mktemp) cat > $tmp exec < /dev/tty vim --cmd 'let &efm=&gfm' -q $tmp "$@" rm $tmp It's invoked like this: grep -Hn | vimgrep All the lines that grep finds will be fed to vim as a quickfix list, which you can traverse with :cn, :cp, etc., or browse with :copen. I have mapped to :cn and to :cp so that I can traverse the quickfix list more easily. Regards, Gary
Re: Search utilities for use with mutt - I use mairix but it's not perfect
On 2013-05-07, Chris Green wrote: > On Wed, May 08, 2013 at 12:21:58AM +1000, Erik Christiansen wrote: > > On 07.05.13 14:53, Chris Green wrote: > > > What other search programs work well with mutt? > > > > Mutt's own body search does the job for me within a mail folder, and > > egrep provides full Extended Regular Expressions when searching some set > > of my 1106 mail folders. Over more than a decade of mutt use, they've > > always allowed me to find stuff quickly, even when I've no idea where an > > email ended up. (So I've never had any need to look for anything else.) > > > > Neither suffers from the single word restriction, described. > > > Yes, one of the reasons I use mbox rather than maildir is the easier > searching, I guess I can make myself a grep script. http://grepmail.sourceforge.net/ http://www.barsnick.net/sw/grepm.html Regards, Gary
Re: Highlighted item in pager status bar setting
On 2013-04-17, Gary Johnson wrote: > On 2013-04-17, rj wrote: > > On Wed 17 at 02:00 PM -0400, Paul Hoffman wrote: > > > > > I use vim and it knows I'm editing a file of type muttrc, which is nice. > > > > Likewise for myself on both counts. > > > > > My guess is that your editor is applying the wrong syntax hiliting rules. > > > > This very well could be the case, though I don't quite get why the "%>" > > isn't highlighted elsewhere in similar (i.e., status bar) settings. > > > > Meanwhile I'll have a look at my vim.muttrc (or whatever exactly it's > > called.) > > This highlighting is determined by the file > $VIMRUNTIME/syntax/muttrc.vim. Perhaps yours is old and contains > some bugs or does support the version of mutt you're using. Here is ^ not > the header from mine, with e-mail addresses deleted. > > > " Vim syntax file > " Language: Mutt setup files > " Original: Preben 'Peppe' Guldberg > " Maintainer: Kyle Wheeler > " Last Change: 2 Feb 2012 > > " This file covers mutt version 1.5.21 (and most of the mercurial tip) > " Included are also a few features from 1.4.2.1 > > > Regards, > Gary >
Re: Highlighted item in pager status bar setting
On 2013-04-17, rj wrote: > On Wed 17 at 02:00 PM -0400, Paul Hoffman wrote: > > > I use vim and it knows I'm editing a file of type muttrc, which is nice. > > Likewise for myself on both counts. > > > My guess is that your editor is applying the wrong syntax hiliting rules. > > This very well could be the case, though I don't quite get why the "%>" > isn't highlighted elsewhere in similar (i.e., status bar) settings. > > Meanwhile I'll have a look at my vim.muttrc (or whatever exactly it's > called.) This highlighting is determined by the file $VIMRUNTIME/syntax/muttrc.vim. Perhaps yours is old and contains some bugs or does support the version of mutt you're using. Here is the header from mine, with e-mail addresses deleted. " Vim syntax file " Language: Mutt setup files " Original: Preben 'Peppe' Guldberg " Maintainer: Kyle Wheeler " Last Change: 2 Feb 2012 " This file covers mutt version 1.5.21 (and most of the mercurial tip) " Included are also a few features from 1.4.2.1 Regards, Gary
Re: Forward with original mail
On 2013-04-12, Will Yardley wrote: > On Fri, Apr 12, 2013 at 05:41:23PM -0300, Leonardo M. Ramé wrote: > > Hi, many times I need to forward mails generated by Outlook, and would > > like to edit the original mail as inline, but this apparently cannot be > > done in mutt, at least with messages encoded as message/rfc822. > > > > Am I correct? is there a workaround?. > > Do you have $mime_forward set or unset? I don't think it matters. I'd be happy to be proven wrong, but I haven't found any way in mutt to forward messages the way "everybody else" does. The closest I came was setting 'mailcap_path' to "/dev/null" to prevent mutt from converting certain attachments to text/plain, then tagging all message parts in the attachment menu and doing a tag forward. Regards, Gary
Re: Time Format
On 2013-02-14, s. keeling wrote: > Incoming from Konrad Vrba: > > On 2/14/13, christoph wrote: > > > > > > I have this index_format: > > > set index_format="%Z %{%e.%m.%y %H:%M} %-15.15F %s" > > > which translates to lines like this one: > > > L 14.02.13 14:14 Konrad Vrba Time Format > > > > > fantastic, that is exactly what I was looking for > > Better: > >set index_format="%Z %{%y.%m.%e %H:%M} %-15.15F %s" > > ISO-8601 compliant. :-) The ISO-8601 date separator is a hyphen, not a period. Regards, Gary
Re: rendering color in html emails inside mutt
On 2013-02-09, Brendan Cully wrote: > Elinks does work fine to view attachments in color. You can't get > color when autoviewing though -- in this case, the elinks output is > recolorized by the pager using color body rules, which mangle the > underlying color. Even if allow_ansi is set? Regards, Gary
Re: rendering color in html emails inside mutt
On 2013-02-08, Eric Smith wrote: > Hi. > > (For those deeply offended by manifestations of html in emails, > please look away now). > > I mainly receive email from non-technical people. Recently, > while in the chaos ahead of a deadline I missed some > important email where answers to my questions where inserted > inline in a red color. > > I have never managed to render color in html email, how is this > possible? This is a function of the external program used to render HTML as text. The two that seem to be the most popular, lynx and w3m, don't seem to do this, but elinks does. So, all you should have to do is set your mailcap file to use elinks for text/html and configure elinks to use 256 colors. While running elinks, type to see the menu bar, then go to "Setup menu" -> "Terminal options" and select under "Color mode"->"256 color". I've often wondered if this was possible, but never investigated it very deeply. Your question piqued my curiosity, so I searched a little and just discovered that elinks could do this. I've verified its behavior on a few web sites, but not from within mutt. Let us know if this works for you. Regards, Gary
Re: Difficulty with html-mail
On 2012-12-19, Alan McConnell wrote: > Assembled Wisdom! > > No, the difficulty is not just that it exists, it is how > my mutt occasionally deals with it. > > I call up mutt from one of my terms(URxvt) and it displays my > E-mail from /var/spool/mail/alan, as is normal. With many > of my mails I press 'v' to get a display like > > I 1 [multipa/alternativ, 7bit, > 13K] > I 2 ├─> [text/plain, quoted, utf-8, > 1.6K] > I 3 └─> [text/html, quoted, utf-8, > 11K] > > and use my arrow keys to get to the number 3, '[text/html, . . .' > I then press 'Enter' and _sometimes_ a tab opens on my browser to > display the interpreted content of the mail. This is what I want. > But _sometimes_ I get a tab: "Problem loading page" with a display > > "File not found > Iceweasel can't find the file at /home/alan/tmp/mutt.html." > > And this is true; there is nothing in my ~/tmp directory. > But there is also nothing in my tmp/ directory when the html-mail > opens successfully. The Tab says: > file:///home/alan/tmp/mutt.html > but there is nothing of that kind in my ~tmp/. > > I suspect that my ~/.mailcap file is not correct. I was given it > several years ago, and I've never understood it. I give it here, in > its one-line entirety: > > text/html; iceweasel -new-tab '%s'; test=test -n > "$DISPLAY";nametemplate=%s.html There are some tips on handling that problem here: http://www.spocom.com/users/gjohnson/mutt/#background Regards, Gary
Re: on-demand rewrap received mail and display in builtin pager
On 2012-12-05, Chris Green wrote: > On Wed, Dec 05, 2012 at 06:43:34PM +1100, Erik Christiansen wrote: > > On 04.12.12 14:00, Jeremy Kitchen wrote: > > > alternatively, you could reformat the mails at receive time through > > > a procmail filter or something if you have that kind of access to the > > > mail server. > > > > If anyone has a working solution, I'd be interested too. The following > > had to be commented out, because folded URLs and code patches weren't > > much use: > > > Can I add another vote/want for this too! > > I mostly find the formatting in the internal pager is 'near enough' the > problem arises when I hit R[eply] (or more likely L[ist reply]) and the > long lines get into my editor. While I can set the linewrap option > (it's a vi clone) that's far from perfect, it would be much nicer if > lines were fed into the editor in the format seen in mutt's pager. Maybe you could filter the reply through "fold -s" on its way to your editor, perhaps with a wrapper script around your editor. I use Vim and have 'linebreak' set for mail files so that they're readable without reformatting. When I send a reply I reformat any long lines with gq. I've been reading all these complaints about mutt's wrapping and people's wrapping but I just don't see the problem. I have "set wrap=80" in my muttrc. Lines that the author wraps and lines that mutt has to wrap all look fine to me. Regards, Gary
Re: Multipart MIME
On 2012-11-27, mutt wrote: > Jamie Paul Griffin wrote: > > > Hi > > > > Does anyone have or know of a perl or python script, or even a shell > > script, that removes the multipart/(mixed|alternative| ... ) parts of > > incoming mail and leaves or converts the message into plain text? > > Also, i wouldn't want to lose any attachments that people might send me. > > > > Jamie. > > hi, > > i wrote something like that. by default, it converts to text anything > that can be converted to text and deletes everything else but you > can turn off any specific transformation. it can delete specific > mail headers. it translates (most) winmail.dat attachments. if a > transformation fails, it leaves the original in place for safety by > default. it works via procmail on individual messages or it can be > applied to an entire mbox file. > > it requires the presence of various utilities (e.g. perl, antiword > or catdoc, xls2csv, lynx, pdftotext and mktemp). you'd probably just > need lynx and mktemp installed. Why aren't you all using mutt's built-in ability to select MIME-type-to-text converters? There's no risk of losing a message through improper conversion, you have some limited choice over conversion methods (depending on whether the message/attachment is displayed by the pager or via the attachment menu), and since the message itself is unaffected, you can use different methods of viewing messages in different environments and at different times as your methods improve. Regards, Gary
Re: Putting table in email?
On 2012-11-21, David Champion wrote: > * On 20 Nov 2012, Brian Salter-Duke wrote: > > > > OK, I have done that. I also changed nroff to groff as I have both and > > they are different sizes. However, I still do not really understand by > > "press T over table to format. I type the table, hit >esc> and then > > shift-T. Nothing happens. What am I supposed to do? > > Does your cursor move at all? If the macro is defined when you invoke > vim, then pressing T should move to the top of the current/previous > paragraph, then pipe text to the end of the paragraph, moving the cursor > twice. If the cursor is not moving, then I imagine vim isn't creating > the macro. You can check that the mapping took by executing :map T which will show the definition. > Sometimes vi/vim/etc have trouble with macros that overlap builtin > behaviors. Maybe there's a problem with T as a binding? Does anyone > who uses vim know? There should be no problem at all mapping T for this purpose. I tried it myself and it works fine using Vim 7.3.646 on an Ubuntu Linux 10.4 system. (Nice tip, by the way.) It can be tricky using literal ^Ms in a mapping. It may be safer to use this definition of the mapping instead. map T {!}mutt-table Regards, Gary
Re: so many useless text
On 2012-11-21, horse_rivers wrote: > hi, > > in my mutt mailbox , I do not know why all mails contain so many > useless message text , as below: > > Received: by x > Received: from > envelope-from xxx > > Received: by mailxxx > > > .. and so on > > these text occupy more place than mail content ,which is so annoying . > > > is there some method to disable mutt displaying these text ? Yes, the ignore command. See the mutt manual (not man page), section 10.1. Selecting Headers. From the example there, you might try putting these lines in your muttrc: ignore * unignore from date subject to cc Regards, Gary
Re: Please set your line wrap to a sane value (was ... Re: Is there any gmane.org user in the list?)
On 2012-11-20, Will Yardley wrote: > As far as quoting flowed text, I don't love mutt's current handling of > it -- I still prefer the behavior of patch-1.5.5.1.gj.stuff_all_quoted.3 > (space-stuffing all quoted lines vs. just the last one, which is > obviously the more conservative way to go). If anyone's updated this > patch for current mutt, let me know - Gary's email seems to have > changed. Sorry. Employer changed and I haven't been good about updating all the places where I used that address. I have not updated that patch. I haven't had an issue with FF text for quite a while and I didn't know there was still a need for it. Regards, Gary garyjohn AT spocom DOT com or gjohnson AT spocom DOT com
Re: Viewing attachments with wrong MIME types
On 2012-11-19, Suvayu Ali wrote: > Hi, > > I often get attachments with completely wrong MIME types. For example > today I received a pdf and a doc file as application/octet-stream. Is > there anyway to bypass my mailcap and ask mutt to open the attachment > with the proper application? So in this particular case, I would want > to open the pdf file with evince and the doc file with LibreOffice. > > Thanks for any hints, For application/octet-stream attachments, put this in your muttrc: mime_lookup application/octet-stream That tells mutt to determine the correct MIME type by looking up the file name extension in your mime.types file Regards, Gary
Re: Is there a way to get mutt to do a 'slow' scan for new mail?
On 2012-11-16, Chris Green wrote: > On Fri, Nov 16, 2012 at 12:04:01PM +, Chris Green wrote: > > On Thu, Nov 15, 2012 at 12:28:50PM -0800, Gary Johnson wrote: > > > On 2012-11-15, Matthias Apitz wrote: > > > > > > set check_mbox_size > > > > > > which will tell mutt to check mailbox file sizes instead of access > > > times. > > > > [snip minor rant] > > > > I may try check_mbox_size but I seem to remember that it has some > > associated downsides as well. > > > Does this work from run to run of mutt? I.e. does mutt remember the > sizes somehow? ... or will it only work during a single run of mutt? It works from run to run. Regards, Gary
Re: Is there a way to get mutt to do a 'slow' scan for new mail?
On 2012-11-15, Matthias Apitz wrote: > El día Thursday, November 15, 2012 a las 07:43:13PM +, Chris Green > escribió: > > > My incoming mailboxes (as specified to mutt) get periodically backed up > > and thus the 'accessed' time gets updated and mutt doesn't see them as > > containing new mail. > > > > However when mutt opens these mailboxes it *does* recognise that they > > have new mail in them and flags the new mail with an 'N'. > > > > Is there any way I can ask mutt to actually scan through all the > > mailboxes rather than just look at the file times to see if there is new > > mail in them? > > Or use a backup method which does not modify the access time (cpio has > a flag for this); Or set check_mbox_size which will tell mutt to check mailbox file sizes instead of access times. Regards, Gary
Re: keep headers fixed in pager
On 2012-10-05, Brandon McCaig wrote: > On Fri, Oct 05, 2012 at 08:40:55AM -0700, Gary Johnson wrote: > > The only headers I usually care about are the sender, subject > > and date/time, and all those are in the status bar at the > > bottom of the screen or in the mini-index at the top. For the > > rare times when I want to see other header information, I > > scroll or jump to the top of the message. For more detail I > > hit the 'h' key. I wouldn't want to lose that vertical space > > all the time. > > My status line is at the top of the message. I am assuming we are > referring to the same thing because at the bottom I don't have > anything like that (and I can't find an option to configure it; > correct me if I'm wrong). The default pager_format lacks the date > and sender address (a name can be useful, but sometimes an E-mail > is more distinct and/or unique). My mistake. I meant pager_format. I was in a hurry and didn't look the name up. I have my pager configured like this: Help Line (help is set) 5 lines of Pager Index (pager_index_lines=6) Status Bar/Line (uses status_format) Message text Message Status Line (uses pager_format) Command Line Where the status line goes can be set with status_on_top, which I have left unset. This is my pager_format: set pager_format="%4C %Z %[!%b %e at %I:%M %p] %.20n %s%* -- (%P)" The line below your message looks like this: 2711 s Oct 5 at 11:30 AM Brandon McCaig Re: keep headers fixed in pager -- (96%) I use a wide screen (currently 207 columns) so there is actually a lot of space between "pager" and the "--". Regards, Gary
Re: keep headers fixed in pager
On 2012-10-05, steve wrote: > Hi Adam, > > Thank you for your answer. > > But your suggestion seems (unfortunately) much too complicated for me. I guess > I'll have to live with this. But I'm curious to know how people deal with the > issue I raised. Do people simply scroll back to the top to get this info ? > Just > curious. The only headers I usually care about are the sender, subject and date/time, and all those are in the status bar at the bottom of the screen or in the mini-index at the top. For the rare times when I want to see other header information, I scroll or jump to the top of the message. For more detail I hit the 'h' key. I wouldn't want to lose that vertical space all the time. Regards, Gary
Re: Hide Autoview using elinks...
On 2012-09-07, Jamie Paul Griffin wrote: > [ Gary Johnson wrote on Thu 6.Sep'12 at 17:31:34 -0700 ] > > > On 2012-09-06, Leonardo M. Ramé wrote: > > > Is there a way to hide the "Autoview using ..." message in pager?. > > > > You can remove those using the 'display_filter'. My filters have > > become so complicated that I've put them in scripts and I no longer > > have any simple examples lying around. I think the following will > > work for your case. > > > > set display_filter="sed -e '/^\[-- Autoview using .* --]$/d'" > > > > I actually have a set of message-hooks within folder-hooks that set > > various filter scripts as needed with commands such as this: > > > > set display_filter=mutt_gen_display_filter > > > > where mutt_gen_display_filter contains an ad hoc pipeline of sed and > > perl commands to hide Autoview lines, SHA lines, mailing list > > footers and other annoyances. > > > > HTH, > > Gary > > > Do you have a website Gary and would you consider sowing the > scripts there? I'd be interested to see them. No probs if it's too > much hassle. I do: http://www.spocom.com/users/gjohnson/mutt/. It is in sore need of an update. I'll think about putting some of those scripts there, or at least snippets of them. The problem is that my muttrc and those scripts are not nice and tidy--they've grown and changed with my needs of the moment--so they'll need some editing to be useful examples. Regards, Gary
Re: Hide Autoview using elinks...
On 2012-09-06, Leonardo M. Ramé wrote: > Is there a way to hide the "Autoview using ..." message in pager?. You can remove those using the 'display_filter'. My filters have become so complicated that I've put them in scripts and I no longer have any simple examples lying around. I think the following will work for your case. set display_filter="sed -e '/^\[-- Autoview using .* --]$/d'" I actually have a set of message-hooks within folder-hooks that set various filter scripts as needed with commands such as this: set display_filter=mutt_gen_display_filter where mutt_gen_display_filter contains an ad hoc pipeline of sed and perl commands to hide Autoview lines, SHA lines, mailing list footers and other annoyances. HTH, Gary
Re: mode of reply question
On 2012-08-04, markus reichelt wrote: > mutt 1.5.21 > > reply gone wrong; a reply to a mailinglist post. for some reason I > press 'g' for group reply, instead of just 'r' > > so mutt asks about a reply to the mailinglist, and yeah, i dont want > it there, so I press n, but it CC'ed the darn list as well. > > fwiw, the mlist in question is both listed under 'lists' and > 'subscribe' ... > > any (serious) ideas as to prevent such a meltdown from happening > again? thanks. Perhaps putting set askcc in your muttrc will help. Regards, Gary
Re: Reply Group but not myself when CC'd?
On 2012-07-03, David Woodfall wrote: > I don't know if this is possible. > > When someone CCs me and I reply group it of course includes my email > address (I have several). > > Anyway of having it not reply to my email(s)? If I remember then I > edit the To: field, but of course I sometimes forget. > > Ideas? Use the 'alternates' command to specify all the e-mail addresses you use. See the mutt manual (not the man page) section "Alternative Addresses". Regards, Gary
Re: built-in pager and utf-8
On 2012-07-01, Patrice Levesque wrote: > > > > Mutt's built-in pager does not seem to understand utf-8. > > Example copied from a gnu-emacs mailing list: > > [...] > > t₁ = 65536×h₁ + l₁ > > 0 ≤ h₁ < 65536 > > 0 ≤ l₁ < 65536 > > Both display here just fine under mutt-1.5.21-r9 (gentoo). > > Make sure all the components of the displaying chain are set to UTF-8; > in mutt, you'll need to configure 'set charset="UTF-8"'; It should not be necessary to set charset as mutt determines that itself from the locale. Regards, Gary
Re: mutt deletes attachement before libreoffice tries to open it
On 2012-06-22, David Champion wrote: > * On 22 Jun 2012, Gary Johnson wrote: > > > > But that would defeat the purpose of the copy which is to have a > > stable file for LibreOffice to read while allowing mutt to wipe and > > delete its temporary file. A hard link would work if it wasn't that > > mutt wipes the file before unlinking it. > > The last time I worried about this, mutt didn't zero out temporary files > before unlinking them. If it does that now then hard links are not a > solution. The last time I looked at this was a few years ago, so mutt's behavior could well have changed in the mean time. I just assumed it still did that. It seemed like an unusual, deliberate design decision that was not likely to change. Regards, Gary
Re: mutt deletes attachement before libreoffice tries to open it
On 2012-06-22, Luis Mochan wrote: > > But that would defeat the purpose of the copy which is to have a > > stable file for LibreOffice to read while allowing mutt to wipe and > > delete its temporary file. A hard link would work if it wasn't that > > mutt wipes the file before unlinking it. > > > > I guess not. If I understand correctly, the file will remain alive > while its link count of the file is possitive. Even if mutt deletes > (it's link), the other link (and the file) will survive. Yes, but mutt overwrites the contents of the file with zeros first (what I meant by wiping), leaving the other link pointing to a file full of zeros, and leaving LibreOffice with nothing useful to read. Regards, Gary
Re: mutt deletes attachement before libreoffice tries to open it
On 2012-06-22, David Champion wrote: > * On 22 Jun 2012, Luis Mochan wrote: > > I guess a solution used for browsing html attachments (discussed > > here some time ago; see attached perl script) may be adapted for > > running libreoffice. The main idea would be to make a copy of the > > file, send it to libreoffice and sleep a short time before returning > > to mutt, > > I usually recommend hard linking (not symbolic linking!) over copying, > if possible. But that would defeat the purpose of the copy which is to have a stable file for LibreOffice to read while allowing mutt to wipe and delete its temporary file. A hard link would work if it wasn't that mutt wipes the file before unlinking it. Regards, Gary
Re: problem with mailcap and searching
On 2012-05-29, Xylo Drum wrote: > On Tue, May 29, 2012 at 5:20 PM, Gary Johnson wrote: > > On 2012-05-29, Xylo Drum wrote: > >> I have a pretty much default mutt setup including some very simple > >> lines in my .mailcap such as: > >> > >> image/jpg; xview %s > >> image/jpeg; xview %s > >> > >> these work fine for viewing images, but when trying to do a 'l' search > >> with a pattern of ~bfoo mutt keeps throwing up > >> > >> mailcap entry for type image/jpeg not found > > > > Mutt is looking for a rule in your .mailcap for converting > > image/jpeg attachments to plain text. Such rules must contain the > > 'copiousoutput' flag. Unless you have some meaningful way of > > generating text from a JPEG image, you may need to add some sort of > > no-op rule like this (untested): > > > > image/jpeg; true; copiousoutput > > > > just to give mutt something to execute. > Thanks for swift reply. Your solution works in that it fixes the > 'search' problem, but it means that I can't view the attachments with > 'v' - there needs to be a way to use 'switch' in the mailcap, or get > mutt to use different mailcaps in different contexts. Did you use the copiousoutput rule in addition to your original rule, or did you replace the original rule by the copiousoutput rule? You can and should use both, e.g., image/jpeg; xview %s image/jpeg; true; copiousoutput See http://www.spocom.com/users/gjohnson/mutt/#mime for a little more on this. Regards, Gary
Re: problem with mailcap and searching
On 2012-05-29, Xylo Drum wrote: > I have a pretty much default mutt setup including some very simple > lines in my .mailcap such as: > > image/jpg; xview %s > image/jpeg; xview %s > > these work fine for viewing images, but when trying to do a 'l' search > with a pattern of ~bfoo mutt keeps throwing up > > mailcap entry for type image/jpeg not found Mutt is looking for a rule in your .mailcap for converting image/jpeg attachments to plain text. Such rules must contain the 'copiousoutput' flag. Unless you have some meaningful way of generating text from a JPEG image, you may need to add some sort of no-op rule like this (untested): image/jpeg; true; copiousoutput just to give mutt something to execute. Regards, Gary
Re: Search by attachment file name
On 2012-04-30, Leonardo M. Ramé wrote: > On 2012-04-30 14:16:09 -0700, Gary Johnson wrote: > > On 2012-04-30, Leonardo M. Ramé wrote: > > > As the subject says, is there a way to search by attachment name?. > > > > > > I.E.: I know somebody sent me an email with an attached file named > > > "Costsxxyy.xls" and I would like to search for that file. > > > > You can search message bodies by using the ~b flag. Type / to begin > > the search, then > > > > ~b 'filename="?Costsxxyy\.xls"?' > > > > Each "? will match 0 or 1 double-quotes which sometimes surround the > > file name. > > > > Regards, > > Gary > > Thanks Gary. One more question, how can I search for all ".xls" files?. > > This way?: ~b 'filename="?*\.xls"?' Before I tried it, I would have said no, that to match zero or more of any character you needed .* However, a little experimentation with the limit command suggests that * alone will work fine, too. Regards, Gary
Re: Search by attachment file name
On 2012-04-30, Leonardo M. Ramé wrote: > As the subject says, is there a way to search by attachment name?. > > I.E.: I know somebody sent me an email with an attached file named > "Costsxxyy.xls" and I would like to search for that file. You can search message bodies by using the ~b flag. Type / to begin the search, then ~b 'filename="?Costsxxyy\.xls"?' Each "? will match 0 or 1 double-quotes which sometimes surround the file name. Regards, Gary
Re: can't read attached file docx
On 2012-04-26, Gerard ROBIN wrote: > On Thu, Apr 26, 2012 at 08:26:33AM +0200, Jostein Berntsen wrote: > > I have these entries for docx files in my ~/.mailcap: > > > > application/vnd.msword; mutt_bgrun libreoffice3.5 %s; #test=RunningX > > application/vnd.openxmlformats-officedocument.wordprocessingml.document; > > mutt_bgrun libreoffice3.5 %s; #test=RunningX > > > You might check out the mutt_bgrun script as well to make it work. > > > Jostein > > Thanks for your advice but the result is the same as before. > But thanks to you I discovered mutt_bgrun, and the Gary Johnson's Mutt Page :) I hope you find it helpful. I was going to suggest that earlier, but I don't think it solves this particular problem. mutt_bgrun copies the attachment to a temporary file, runs the viewer on that file, then deletes that file when the viewer exits. If libreoffice3.5 returns immediately, you still have the same problem of the file being deleted before the viewer can open it. One solution would be to modify mutt_bgrun to not delete the temporary file. Then you have to solve the problem of accumulated temporary files. Another approach would be to put something like 'sleep 60' on the line before 'rm -f "$tmpfile"' in mutt_bgrun to keep the temporary file around long enough for the viewer to open it before it is deleted. Regards, Gary
Re: mutt and stdin
On 2012-04-17, Andrei Mikhailov wrote: > Thank you ! > I think I now understand, more or less, why it does not work as expected. > Perhaps my question is more about Linux, than about Mutt. What I really > want to achieve is the following: > > echo "mydata" | myscript.sh > > where myscript.sh is the following: > > #!/bin/bash > some-program-which-reads-from-stdin.sh > mutt > > In other words, the script first reads the pipe and does something, > and then just calls mutt. > Somehow, beteween ``some-program-...'' and ``mutt'' I have to insert > some command, saying: > ``finished reading pipe, control is now returning to the terminal'' > Is that possible? > Is it possible to call Mutt from within scripts accepting pipe input? Yes. You just need to connect mutt's stdin to a terminal, e.g., #!/bin/bash do-something-with-data-read-from-stdin < /dev/tty mutt your-mutt-options Regards, Gary
Re: How to save a thread to a file
On 2012-04-07, Tim Johnson wrote: > * Gary Johnson [120407 14:07]: > > What is your 'mbox_type' variable set to? I had been assuming that > > yours was set like mine to "mbox". If 'mbox_type' is set to "mbox", > > then the mailbox that mutt creates in your example above will be a > > file named ~/save-thread.txt. > > > Clearly I am not using the correct command. > > > > I think you're using the right command, but we may have overlooked > > the effect of the 'mbox_type' variable. > I had set that variable to 'maildir'. > Changed as per your instructions, now it is all saved to file. > Thanks a lot! You're very welcome. It bothered me that we hadn't been able to resolve that. > One more question if I may: > Might I expect any changes in mutt's behavior after changing the > `mbox_type' variable? I don't think I can give you a very good answer since I've always left it set to "mbox". The mutt manual discusses it in two places. 6. Mailbox Formats Mutt supports reading and writing of four different local mailbox formats: mbox, MMDF, MH and Maildir. The mailbox type is autodetected, so there is no need to use a flag for different mailbox types. When creating new mailboxes, Mutt uses the default specified with the $mbox_type variable. 3.125. mbox_type Type: folder magic Default: mbox The default mailbox type used when creating new folders. May be any of ?mbox?, ?MMDF?, ?MH? and ?Maildir?. This is overridden by the -m command-line option. It appears to affect only those mailboxes that you create. If you want to save most of your messages in the maildir format but some threads in the mbox format, you may have to change 'mbox_type' as needed. Whenever you save a message to an already-created mailbox, mutt is supposed to detect the mailbox type so you don't need to worry about 'mbox_type'. I don't think there is a way to make it "just work", so that messages are always saved in maildir mailboxes but threads are saved in mbox mailboxes, unless perhaps you create a macro for saving threads. Regards, Gary
Re: How to save a thread to a file
On 2012-04-07, Tim Johnson wrote: > * Gary Johnson [120407 13:06]: > > > > > > > > > > > > Well, mbox folders are just files. Could you save to an mbox > > > > > > folder? > > > > > > > > > > Of course, but what I was really inquiring about was whether I could > > > > > save 'en masse' :: a thread to one file. > > > > > thanks > > > > > > > > I don't understand what you are asking. > > > It would be nice if I could save all of the tagged messages to one > k > *named* (not mbox) file - just as if I were saving a viewed > > > attachment. It looks like that is not doable. > > > > I'm not following you at all. An mbox file _is_ a named file. You > > can choose any name you like, absolute, relative to your mail folder > > directory, or relative to the directory in which you started mutt. > > > > > > You can tag the thread, and save it all 'en masse' to an 'mbox' file > > > > anywhere where you can create a file. How would the file you are want > > > > to create differ from what you get when it is created as an 'mbox'? > > > Yeah, what would work for me is a special mbox directory for just > > > saving stuff then open them in vim and weed out headers, saving > > > content to a new file.. > > > > Save a thread to any file name you like, open that file in vim and > > tell me how that differs from what you requested. > Gary, below is my original question: > > > > > > > I can t to tag the thread and then ;s to save to another > > > > > > > mailbox, but I don't know if I can save the same to a file. > To recap, if I tag the thread and invoke ;s > I get the following response > "Save tagged to mailbox ('?' for list): =tim" > If I back up the cursor and enter "~/save-thread.txt", > mutt creates a mailbox named save-thread.txt > That is not what I want. Hi Tim, What is your 'mbox_type' variable set to? I had been assuming that yours was set like mine to "mbox". If 'mbox_type' is set to "mbox", then the mailbox that mutt creates in your example above will be a file named ~/save-thread.txt. > --- > Please tell me how you would save the entire thread to one file. > Clearly I am not using the correct command. I think you're using the right command, but we may have overlooked the effect of the 'mbox_type' variable. Regards, Gary
Re: How to save a thread to a file
On 2012-04-07, Tim Johnson wrote: > * David Ellement [120407 01:10]: > > On 2012-04-06, Tim Johnson wrote > > > * Gerald LaMontagne [120406 17:55]: > > > > On Fri, Apr 06, 2012 at 04:52:16PM -0800, Tim Johnson wrote: > > > > > Is it possible to save a thread to a file? > > > > > > > > > > I can t to tag the thread and then ;s to save to another > > > > > mailbox, but I don't know if I can save the same to a file. > > > > > > > > Well, mbox folders are just files. Could you save to an mbox folder? > > > > > > Of course, but what I was really inquiring about was whether I could > > > save 'en masse' :: a thread to one file. > > > thanks > > > > I don't understand what you are asking. > It would be nice if I could save all of the tagged messages to one > *named* (not mbox) file - just as if I were saving a viewed > attachment. It looks like that is not doable. I'm not following you at all. An mbox file _is_ a named file. You can choose any name you like, absolute, relative to your mail folder directory, or relative to the directory in which you started mutt. > > You can tag the thread, and save it all 'en masse' to an 'mbox' file > > anywhere where you can create a file. How would the file you are want > > to create differ from what you get when it is created as an 'mbox'? > Yeah, what would work for me is a special mbox directory for just > saving stuff then open them in vim and weed out headers, saving > content to a new file.. Save a thread to any file name you like, open that file in vim and tell me how that differs from what you requested. Regards, Gary
Re: regexp and pattern limit
On 2012-04-02, steve wrote: > Hi, > > I'm trying to write a regexp in order to capture some words to put them > in color. I have a line like this in my .muttrc: > > color body red default > "\|((L|l)enny)|((S|s)queeze)|((S|s)arge)|((P|p)otato)" > > I want to catch only etch, but not fetch nor fetchera (or whatever > combination). So I tried the \ syntax without success. I also > tried the Perl way \bword\b which fails too. > > I'm no regex guru, so could someone help me please? Take a look at the mutt manual, in the Regular Expression section. There it says that the beginning and end of a word are matched with '\\<' and '\\>', respectively. Quoting in mutt has always confused me. Try "\\" alone first. If that doesn't work, try adding backslashes until it does. Then expand your expression from there. HTH, Gary
Re: Mail times/date in local time zone
On 2012-03-30, Kumar Appaiah wrote: > Dear Mutt Users, > > Often, I wish to know the time at which someone wrote me an e-mail > converted to the local time zone. Since most of my contacts live in > another time zone, (and some use the time zone + even though that > isn't where they live), I have to do some mental calculations which > I'd like to avoid sometimes. This is what I use. It puts the local time at which a message was sent in the status line at the bottom of the pager. set pager_format="%4C %Z %[!%b %e at %I:%M %p] %.20n %s%* -- (%P)" Regards, Gary
Re: Mailing list and subject prefix
On 2012-03-07, Marco Paolone wrote: > Hi all, > it's the first time I write here, looking for an answer to a (maybe silly) > question. I noticed that some GUI mail clients (or perhaps their users) > usually put before the subject the mailing list name, enclosed in square > brackets. Is there a way to get this automatically in Mutt? Look in the manual for index_format, then set your index_format to include \[%B\]. You may have to experiment with the number of backslashes. HTH, Gary
Re: Content-Type being ignored for whole message body
On 2012-03-01, Mark H. Wood wrote: > I've looked over all the configuration options I can find, and I see a > lot of stuff about *attachments*. Attachments are working pretty > well. But when I receive a message consisting of a single HTML > bodypart, the Content-Type header is apparently ignored and I see a > stream of markup gibberish. Going through the attachment list ("v m") > gets the message body rendered through lynx as I have it set up, but > what am I missing that this is not done automatically? You need this in your ~/.muttrc (or ~/.mutt/muttrc): auto_view text/html and something like this in your mailcap: text/html; w3m %s; nametemplate=%s.html text/html; w3m -dump %s; nametemplate=%s.html; copiousoutput You might also take a look at this page: http://www.spocom.com/users/gjohnson/mutt/#html Regards, Gary
Re: How to change profile on the fly?
On 2012-02-06, Patrick Shanahan wrote: > * Marcelo Luiz de Laia [02-06-12 07:26]: > > > > When I was in my Gmail mbox, I need that all replaies is sent by gmail > > smtp. So, I need to set, on the fly, gmail profile and sig. > > :source gmail.profile > > > When I was in my Yahoo mbox, I need that all replaies is sent by yahoo > > smtp. So, I need to set, on the fly, yahoo profile and sig. > > :source yahoo.profile > > > When I was in my Work mbox, I need that all replaies is sent by work > > smtp. So, I need to set, on the fly, work profile and sig. > > :source work.profile Just remember that if you do that--and there's nothing wrong with doing that--any setting made in any of those files will have to be set or unset in all of them. Regards, Gary
Re: time zone conversion
On 2012-01-23, Sebastian Tramp wrote: > Hi all, > > I'm looking for a way to convert the date header to my local time zone > in the mail detail view. I'm aware of the index format %D option but > need this for the (internal) pager. > > Any ideas? Would displaying that in the 'pager_format' line work for you? Regards, Gary
Re: How to stop mutt from automatically opening next message?
On 2012-01-21, Michael Hannon wrote: > Greetings. If I'm looking at a bunch of unread messages, then > read a message that's in "the middle" of that bunch, then delete > that message (hit the 'd' key while I still have message open), my > version of mutt (see appended for details) automatically opens the > next message. > > I'd like for that not to happen. I'd like to be dropped back to > the message list. Is there some way to configure mutt to do this? I used to be bothered by that behavior, too, so I had this in my muttrc: macro pager d "delete current message and exit to index" HTH, Gary
Re: Autocheck mail and beep
On 2011-11-23, Alexander Pletnev wrote: > On Tue, Nov 22, 2011 at 10:38:01AM -0800, Gary Johnson wrote: > > > > > > #and this one for pop3 > > > set spoolfile=~/Mail/inbox > > > set pop_host="" > > > set pop_user="" > > > set pop_pass="" > > > set pop_checkinterval="60" > > > set pop_delete="no" > > > > > > set mail_check=5 > > > set check_new=yes > > > set header_cache =~/.mutt/cache/headers > > > set message_cachedir =~/.mutt/cache/bodies > > > set certificate_file =~/.mutt/certificates > > > auto_view text/html > > > set beep_new > > > > > > My system: Fedora 15, xfce, mutt Mutt 1.5.21 (2010-09-15) > > Mutt only checks for new mail when it runs its input processing > > loop, which it does normally only when the user is typing. It also > > runs this loop when an input timer times out, but the default > > timeout is 600 seconds or 10 minutes. To change this timeout value > > to check more often, use something like > > > > set timeout=5 > > Gary, thanks for your reply. But are you sure that mutt checks regular POP > mailbox with this timeout? > It seems like it doesn't. Now it checks only when i press \C-G With timeout=5, mutt will wake up every 5 seconds and check whether any other timers have expired. If the pop_checkinterval timer has expired, it should check the POP3 server. With your configuration, the POP3 server will be checked only every 60 seconds. That was my understanding the last time I looked at the code and the last time I used mutt's internal POP3 client anyway. If that doesn't seem to explain the behavior you're seeing, I'll have to look again. I use fetchmail now. Regards, Gary
Re: Autocheck mail and beep
On 2011-11-22, Alexander Pletnev wrote: > Hello, > > I'm new in mutt. But please help. I like to write letter from my VIM. > I configured mutt to work with my emalil wia POPs protocol and it gets mail > well. But i tired to read manuals and google for this. > but i want to autocheck my email and beep for new. > > This is what i write in my config for this: > > > > #and this one for pop3 > set spoolfile=~/Mail/inbox > set pop_host="" > set pop_user="" > set pop_pass="" > set pop_checkinterval="60" > set pop_delete="no" > > set mail_check=5 > set check_new=yes > set header_cache =~/.mutt/cache/headers > set message_cachedir =~/.mutt/cache/bodies > set certificate_file =~/.mutt/certificates > auto_view text/html > set beep_new > > My system: Fedora 15, xfce, mutt Mutt 1.5.21 (2010-09-15) Mutt only checks for new mail when it runs its input processing loop, which it does normally only when the user is typing. It also runs this loop when an input timer times out, but the default timeout is 600 seconds or 10 minutes. To change this timeout value to check more often, use something like set timeout=5 Regards, Gary
Re: set different index_format for mails
On 2011-11-09, stardiviner wrote: > => On [2011-11-08 09:13:27 -0800]: > Gary Johnson Said: > > You can also use conditional elements in index_format that will > > print different pieces of information depending on the values of > > other pieces of information. This is explained in the mutt manual > > in the "Conditionals" section. > > > > As an example, I have this string as part of my index_format. > > > > %?X?*& ? > I have already tested, this %?n?new? only work in status_format, can not work > on index_format correctly. > here is my result: > I set them like this: > folder-hook =INBOX set index_format = '" %?n?new? %?o?old? %?d?del? %2C|%N > [%4Z] | %-10L %?H?[spam]? %10s %> %4c %[%I:%M %P %b/%d]"' # for macro "gi" > > new old del 9|0 [ O +] | VeryCD » subject: ... > new old del 9|0 [ O +] | VeryCD » subject: ... > new old del 9|0 [ O +] | VeryCD » subject: ... > new old del 9|0 [ O +] | VeryCD » subject: ... > new old del 9|0 [ O +] | VeryCD » subject: ... There is a problem with your folder-hook. The command argument must be a single string, like this. folder-hook =INBOX 'set index_format=" %?n?new? %?o?old? %?d?del? %2C|%N [%4Z] | %-10L %?H?[spam]? %10s %> %4c %[%I:%M %P %b/%d]"' # for macro "gi" Note that I moved the opening single quote to the beginning of the command so that "set index_format=" is included in the command. I also removed the spaces on both sides of the equal sign. I did not test the resulting hook, however. Regards, Gary
Re: set different index_format for mails
On 2011-11-08, Chip Camden wrote: > Quoth Gary Johnson on Tuesday, 08 November 2011: > > As an example, I have this string as part of my index_format. > > > > %?X?*& ? > > > > If the number of attachments (X) is non-zero, "*" is inserted. > > Otherwise, " " is inserted. > That doesn't seem to work for me (it always prints the *). What versions > support it? I'm on 1.4.2.3i (FreeBSD ports version). I don't know--I've been out of the development loop for a while. I've used conditionals in my status_format for a long time, at least as far back as 1.4.2.2i. I think the %X sequence may be fairly recent, though, introduced in 1.5.something. I couldn't find anything about it in the changlog that came in the Ubuntu mutt package. I'm currently using 1.5.20 and this is the first time I've used %X in my index_format. Regards, Gary
Re: set different index_format for mails
On 2011-11-08, Gregor Zattler wrote: > Hi stardiviner, > * stardiviner [08. Nov. 2011]: > > => On [2011-11-08 11:40:18 +0100]: > >> * stardiviner [08. Nov. 2011]: > >>> Is there other way to set different *index_format* for mails ? > >> > >> index_format describes the format of your index which shows > >> (normally) several emails at once while message-hook deals with > >> individual emails. What should your index look like if there are > >> different emails for which you want to have different > >> index_formats? > >> > > So it is impossible to set different index_format for messages ? > > It's not possible to change the index format for individual > emails in the index but you can colour different email entries > differently. You can also use conditional elements in index_format that will print different pieces of information depending on the values of other pieces of information. This is explained in the mutt manual in the "Conditionals" section. As an example, I have this string as part of my index_format. %?X?*& ? If the number of attachments (X) is non-zero, "*" is inserted. Otherwise, " " is inserted. Regards, Gary
Re: charsets
On 2010-07-27, Paul E Condon wrote: > I use Mutt in a system that is running Debian Squeeze. I have > installed the system recently and it should have no legacy > cruft from Lenny or whatever. I did this new install because > I was having serious problems with charsets and utf8. Almost > all such are gone from this. But a problem with Mutt remains. > > In the pager, I see backslash strings instead of quotes and > apostorphies in incoming emails. The offending emails (one of > them, at least) are charset="iso-8859-1". > locales -a indicates that this charset is loaded on the system > > I have looked at the MuttFaq/Charset web page. > > 1) The short answer does not work. My copy of Mutt informs me that > LC_TYPE is not a recognized variable name. > > 2) I have verified that my system settings conform to the Long Answer > except that I have replace 'de_DE' with 'en_US'. The verify check > gives the correct indication that utf-8 is detected. locale -a gives > > C > POSIX > en_US > en_US.iso88591 > en_US.utf8 > > But I still see lines like > > African-American experience, ones who understand \223the slave thing,\224 as > a top > > > (Not sure this will appear correctly on your computer. Your computer may > actually catch the backslash sequences and display the intended quotes. > On my computer there are TWO backslashes, each followed by three digits.) > > I incline toward the belief that my problem is rooted in Squeeze, not Mutt. The problem is rooted in Redmond. > But there may be some suggestions that you can make that will firm up > evidence for some sort of bug report to somebody. The Mutt that I use is > from a Debian repository, not compiled by me, and downloaded with a very > ordinary sources.list. > > Has anyone here seen this? Could the problem be that 'en_US.iso88591' > should be 'en_US.iso88591-1'? The email in the expample contains > 'charset="iso-8859-1"'. Suggestions for a fix/work around? The problem is that those characters, \223 and \224, are not part of ISO-8859-1, but are part of Microsoft's extensions to ISO-8859-1. Microsoft e-mail clients and possibly other clients that strive for compatibility will include those characters in a message but improperly identify the content as "iso-8859-1". Within Mutt at least, that Microsoft-extended charset is referred to as windows-1252. It was suggested on this list some time ago to add the following to one's muttrc to work around this problem. set assumed_charset=windows-1252 charset-hook ^us-ascii$ windows-1252 charset-hook ^iso-8859-1$ windows-1252 That's what I've done and it seems to work, but I'm no expert in charsets. HTH, Gary
Re: Notify-send doesn't work with procmail?
On 2010-07-23, He Wen wrote: > Hi, Every one! > > I try to use notify-send to send a message to my desktop when a new mail > arrives, but i find notify-send dosen't work with procmail: > > In my procmailrc, I have: > > # notification > :0 ic: > | play /usr/share/sounds/gnome/default/alerts/drip.ogg; notify-send -i > 'evolution' "New Mail Arrives" > > Only the sound could be heard, but no notifcation popped out. I can't figure > out > what's wrong with it. Could anyone help me? Thank you ^^ I'm not familiar with notify-send, but I imagine that it's an X application and needs to know the identity of the display on which to display itself. The process that runs procmail is not associated with any display, so notify-send doesn't know what display to use. You might try executing echo $DISPLAY at the shell prompt of some X terminal, then setting DISPLAY to that value in the command that invokes notify-send, something like this. # notification :0 ic: | play /usr/share/sounds/gnome/default/alerts/drip.ogg; DISPLAY=:0.0 notify-send -i 'evolution' "New Mail Arrives" Unfortunately I don't have a way to test that at the moment. HTH, Gary
Re: URL not extracted from HTML by w3m in mutt autoview
On 2010-07-15, Erik Christiansen wrote: > On Wed, Jul 14, 2010 at 11:29:34AM -0700, Gary Johnson wrote: > > On 2010-07-14, Erik Christiansen wrote: > > > It's in an A tag: (I've munged some of the href's characters in this post) > > > > > > > > "> > > e=3D"View Email Online link" href=3D"http://example.media.xyz.com.au:80/t= > > > rack?t=3Dv&mid=3D45671&msgid=3D87652&did=3D87641&edid=3D26341&sn=3D374852= > > > 7545&eid=3df...@example.stuff.net&eeid=3df...@example.stuff.net&uid=3D9= > > > 56897&rid=3D234564&erid=3D234564&fl=3D&mvid=3D&extra=3D&&&2000&eu=3D425&&= > > > &viewonline" style=3D"color: #66">Click here if you cannot view this = > > > email properly=20 > > > > If the URL is embedded within an tag, as this one is, then > > w3m will not display it. That is, in an HTML link written like > > this, > > > > http://foo.com";>bar > > > > w3m will display "bar" but not "http://foo.com";. > > Ah, thank you. (And for improving my understanding of html.) > > > In your original post you said that the URL was rendered as "*". > > Did the "*" appear instead of "Click here if you cannot view this > > email properly" or was the "*" in front of "Click here ..."? > > The latter. It displays like this: > > * > Click here if you cannot view this email properly The "*" is probably a list bullet, or it may be an explicit "*" in the text, possibly in the first column of the table of which the "Click here ..." message is a part. > > > > What happens if you open the attachment in the attachment menu? > > > > That will use w3m to display the message instead of just using w3m > > > > as a filter. Do you see the "*" as a link? > > Wow. It opens the link in firefox. > (Do you know, I've never before considered opening the message body in > the attachment menu.) > > > > It's not an attachment. The message is only text/html. > > > (Yes, I do dump 99% of them, just not this one. :) > > > > I guess I should have been more clear and written, "What happens if > > you open the attachment or the message in the attachment menu?" I > > expect w3m to highlight the link but not display the URL. > > It automatically followed the link, opening it in firefox. I think that Firefox is displaying the message, as a result of the first text/html rule in /etc/mailcap: text/html; /usr/bin/sensible-browser '%s'; description=HTML Text; nametemplate=%s.html (I didn't look at those rules closely enough when I first read your message.) /usr/bin/sensible-browser is either a link to Firefox or a program that somehow decides what a "sensible browser" is in this case and opens it. > > If your w3m is configured to allow the use of an external browser, > > typing > > > > M > > > > on the link will open the link in the external browser. > > Seems like it shot right past any opportunity to do that. > > Many thanks for helping me understand better what's happening between > mutt and w3m, to get to the browser. You're very welcome. > I might just interpose a wrapper around w3m, taking your information to > modify the > > > http://foo.com";>bar > > to > http://foo.com";> "http://foo.com"; bar > > Then I can copy-paste the displayed URL into an extant firefox instance, > instead of locking up mutt until a firefox instance, opened via the > attachment menu, is closed. You can get around the problem of Firefox locking up mutt by using a script that launches Firefox in the background. There's a example here: http://www.spocom.com/users/gjohnson/mutt/#background To extract the URLs from a message, you might try urlview, bound to the Ctrl-B key in mutt by default. You could also try using lynx instead of w3m as your HTML-to-text converter. It doesn't render HTML as well as w3m, or didn't the last time I used it, but it does gather all the URLs in a message and displays them as footnotes. Regards, Gary
Re: URL not extracted from HTML by w3m in mutt autoview
On 2010-07-14, Erik Christiansen wrote: > On Tue, Jul 13, 2010 at 09:16:21AM -0700, Gary Johnson wrote: > > On 2010-07-13, Erik Christiansen wrote: > > > I had thought that "=3D" was a m$-ism? > > > > The "=" at the end of the line and "=3D" stuff is quoted-printable, > > a type of Content-Transfer-Encoding defined by RFC 2045. Mutt > > already knows how to deal with that and decodes it before piping the > > result to w3m. > > > > Is the URL in the text of the message, or is it embedded within an > > > help us see the problem better. > > It's in an A tag: (I've munged some of the href's characters in this post) > > "> e=3D"View Email Online link" href=3D"http://example.media.xyz.com.au:80/t= > rack?t=3Dv&mid=3D45671&msgid=3D87652&did=3D87641&edid=3D26341&sn=3D374852= > 7545&eid=3df...@example.stuff.net&eeid=3df...@example.stuff.net&uid=3D9= > 56897&rid=3D234564&erid=3D234564&fl=3D&mvid=3D&extra=3D&&&2000&eu=3D425&&= > &viewonline" style=3D"color: #66">Click here if you cannot view this = > email properly=20 If the URL is embedded within an tag, as this one is, then w3m will not display it. That is, in an HTML link written like this, http://foo.com";>bar w3m will display "bar" but not "http://foo.com";. In your original post you said that the URL was rendered as "*". Did the "*" appear instead of "Click here if you cannot view this email properly" or was the "*" in front of "Click here ..."? > > What happens if you open the attachment in the attachment menu? > > That will use w3m to display the message instead of just using w3m > > as a filter. Do you see the "*" as a link? > > It's not an attachment. The message is only text/html. > (Yes, I do dump 99% of them, just not this one. :) I guess I should have been more clear and written, "What happens if you open the attachment or the message in the attachment menu?" I expect w3m to highlight the link but not display the URL. If your w3m is configured to allow the use of an external browser, typing M on the link will open the link in the external browser. Regards, Gary
Re: URL not extracted from HTML by w3m in mutt autoview
On 2010-07-13, Erik Christiansen wrote: > Most URLs arriving in html messages are eminently discardable, but today > I received one worth trying. Mutt's autoview invokes w3m, which extracts > most of the html text, but renders the URL as nothing more than '*'. > > There are three matching lines in /etc/mailcap: > text/html; /usr/bin/sensible-browser '%s'; description=HTML Text; > nametemplate=%s.html > text/html; /usr/bin/w3m -T text/html '%s'; needsterminal; description=HTML > Text; nametemplate=%s.html > text/html; /usr/bin/w3m -dump -T text/html '%s'; copiousoutput; > description=HTML Text; nametemplate=%s.html > > OK, since I'm in mutt, one keystroke opens the message in vim, and the > offending URL is revealed. It was spread over 5 lines, with a trailing > '=' on the first 4 serving as continuation escape. I deleted them, and > joined the lines. Also converting 15 occurrences of "=3D" to '=' allowed > the URL to be used in firefox. > > It won't take me many minutes to point /etc/mailcap at a simple shell > script which invokes a few lines of awk to perform the repair, before > piping to w3m to finish off, but I'm very curious to know what other > mutters do with something like that. > > The sender seems to consider the message standards compliant, because > this: > > http://www.w3.org/1999/xhtml";> > > = > /> > > appears early in the message. > > I had thought that "=3D" was a m$-ism? The "=" at the end of the line and "=3D" stuff is quoted-printable, a type of Content-Transfer-Encoding defined by RFC 2045. Mutt already knows how to deal with that and decodes it before piping the result to w3m. Is the URL in the text of the message, or is it embedded within an
Re: Quoted Printable - mutt and vim
On 2010-06-25, George Davidovich wrote: > I'm getting multipart/alternative emails from a Yahoo user that have a > text/plain part like the following (modified): > > 32 Content-Type: text/plain; charset=iso-8859-1 > 33 Content-Transfer-Encoding: quoted-printable > 34 > 35 George=A0=A0-=A0=A0 Lorem ipsum dolor sit amet, consectiscing elit= > 36 Fusce sodales, sapien eu consectetur eleifend, nibh lles=A0=A0=A0= > 37 diam=0A=0ARegards.=0A=0A=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= > 41 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= > 43 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= > 44 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= > 46 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= > 47 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= > 48 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= > 49 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= > 50 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 > > As I understand it, "A0" represents the non-breaking space character. > Mutt displays the message correctly, but in vim, the character appears > as a pipe symbol. And, as you can tell, there's a whole lot of them. > > My questions, then, are: > > 1. Is there a mutt configuration setting I'm missing that causes vim > to get the A0 character? Maybe this behaviour is a feature? ;-) I don't think it's mutt; I think it's the sender's mail user agent. I see this a lot, but only from certain senders or certain lists. > 2. As a workaround, how do I search/replace non-printable characters > in vim? Here is my solution, from my ~/.vimrc: set isprint+=160" Add nbsp (0xa0) to the set of printable " characters so that it will be displayed " as the single character space rather " than as the pair "| ". This seems to be " supported by xterm and gvim on Unix and " by Cygwin's rxvt on Windows. It is " already set for gvim on Windows. Regards, Gary
Re: Problem with Regular Expression
On 2010-06-23, Rado S wrote: > =- Michelle Konzack wrote on Mon 21.Jun'10 at 11:27:15 +0200 -= > > > I need someone who want to save my live! ;-) > > {...} > > but while the first is working perfectly as default, the second > > one is screwed up du to the changeing name in the () at the end of > > the subject. > > {...} > > > > Can some one enlight me how to solv the problem with the changeing > > name in the () at the end of the subject please? > > What do you want to achieve specifically, conceptually? I think he wants to thread messages by subject, ignoring the leading message ID in brackets and the trailing author's name in parentheses. The reply_regexp can tell mutt to ignore one contiguous string in the subject, which is usually anchored to the start of the subject, but Michelle wants mutt to ignore two strings--one at the start of the subject and one at the end--and consider only the string in the middle when threading by subject. As far as I know, mutt can't do that with the current reply_regexp mechanism. Regards, Gary
Re: How to save email plus word attachments as one text file
On 2010-06-14, Steve Brown wrote: > Hi List. > > I'm struggling to get my head around a small problem that I have, and I > wonder if one of you would be kind enough to give me a pointer or two. > > I receive a number of emails with word attachments. > > I can happily read them inline using antiword and things are fine. > > It has come to pass that I need to save some of these emails as a text > file, pretty much as it is in Mutt's pager. That is, the email body, > then the text of the attachments, concatenated into one file. I just > need plain text, nothing fancy at all. > > My guess is that I need to write a macro to do it, and it is here that > things fall down. > > I am a very basic user of Mutt - I use it to read email very quickly and > to send quick replies. I don't have a huge email load at the moment but > this will change and the number of emails I have to process is likely to > increase significantly. All things point to using Mutt over a graphical > client, they are just too damned slow. > > I've toyed with the idea of using procmail to store all of these emails > as text files automatically, but I don't need to keep them all, so Mutt > is the obvious candidate for reviewing and discarding/keeping the > required emails. If I understand you correctly, this is really easy to do, and the functions to do it are built in. To save a copy of the message, use the decode-copy function bound by default to C, or to save the message and mark the original for deletion, use the decode-save function bound by default to s. You can find both of these in the help menus for the index and the pager. The decode- versions of these functions will use filters defined in your mailcap file to decode the attachments from Word to plain text, just as in the pager, as they are written to the specified files along with the message bodies. Regards, Gary
Re: Any way to color a line _following_ the line with 'pattern'?
On 2010-05-27, Mun wrote: > Hi, > > I would like to use 'color body' to highlight a line which matches > 'pattern' AND also highlight the successive line. However, I couldn't > find any way to extend 'pattern' across multiple lines. > > Is such a thing possible in mutt? I don't think you can do this with mutt's built-in coloring facility, but I have done this using 'display_filter' and a Perl script to add ANSI color escape sequences around text that matched some pattern. 'allow_ansi' needs to be set in your muttrc as well for this to work. HTH, Gary
Re: Privacy considerations when using mutt
chombee writes: > I'm wondering about the privacy implications of using mutt. As usual, if "they" have physical access then all bets are off. Having said that, at least physical access to a computer you own is pretty much under your control. Data on some remote server? Not so much, no.
Re: Mutt not generating Mail-Followup-To header?
Michael Elkins writes: > On Sun, May 02, 2010 at 04:28:59PM +0200, Gary wrote: >>set alternates="*...@garydjones.name" >> >># mailing lists >>lists test-l...@garydjones.name >>subscribe test-l...@garydjones.name >> >>What I did to test was set up an address on my domain and test that as a >>"mailing list" (see last section) and then reply to posts to that >>"list". >> >>The problem only occurs when the "alternates" line is included, but I >>don't know if it's faulty config there (should it be "@gary..."?), >>that mutt knows the mailing list is on my domain and therefore decides >>not to generate a header (i.e. my test case is wrong) or if it is a bug. > > The problem is your alternates setting states that any address at your > domain is an alias for your personal address. This is probably > interferring with the list detection code. When generating the > Mail-Followup-To header field, Mutt will check each address, and the > alternates check comes first. In this situation, Mutt will never see it > as a mailing list, and thus will not add the header field. Okay. Well, normally the mailing lists aren't on my domain...
Re: Mutt not generating Mail-Followup-To header?
Christian Ebert writes: > * Gary on Sunday, May 02, 2010 at 16:28:59 +0200 >> On Tue, Apr 20, 2010 at 11:07:13AM -0700, Michael Elkins wrote: >>> The idea is to create a rc file and set of actions that demonstrate the >>> problem. It could be just a bogus mailing list address if you prefer. >> >> Okay. I have cut it down as much as I can and still show the >> problem. Here it is: >> muttrc-test >> set hostname=mimosa.garydjones.name >> set alternates="*...@garydjones.name" > > You didn't mention your mutt version, but since quite some time > alternates is a *command* I have 1.4.something. Alternates was changed to a command in 1.5.6 http://wiki.mutt.org/?UserStory/MultiAccounts -- Gary
Re: Mutt not generating Mail-Followup-To header?
On Tue, Apr 20, 2010 at 11:07:13AM -0700, Michael Elkins wrote: > On Tue, Apr 20, 2010 at 07:46:23PM +0200, Gary wrote: > >>If you can produce a test muttrc and a test email message that exhibit the > >>problem > > > >Well, it applies to outgoing email, so the latter doesn't really apply, > >but I can send my muttrc stripped of comments privately, or somewhat > >more stripped to the list. Whichever you prefer. > > The idea is to create a rc file and set of actions that demonstrate the > problem. It could be just a bogus mailing list address if you prefer. Okay. I have cut it down as much as I can and still show the problem. Here it is: muttrc-test set hostname=mimosa.garydjones.name set alternates="*...@garydjones.name" set envelope_from=yes set followup_to=yes set editor="emacsclient -a='' -t %s" set reverse_name=yes set reverse_realname=yes set sendmail="/usr/sbin/msmtp" set spoolfile="$HOME/Mail/inbox" # mailing lists lists test-l...@garydjones.name subscribe test-l...@garydjones.name end What I did to test was set up an address on my domain and test that as a "mailing list" (see last section) and then reply to posts to that "list". The problem only occurs when the "alternates" line is included, but I don't know if it's faulty config there (should it be "@gary..."?), that mutt knows the mailing list is on my domain and therefore decides not to generate a header (i.e. my test case is wrong) or if it is a bug. > >>you will invoke it this way: > >> > >>mutt -n -F muttrc-test -f testmsg > > > >-f should be a mailbox, right, not a message? > > > >Actually that also doesn't seem to work :( It always springs directly to > >my inbox, but maybe there is something in my config file governing that > >(spoolfile= ?). > > If you are using -n and -F your ~/.muttrc should not be loaded. Well, yeah, but it is using the test muttrc, which is what I was referring to :) -- Gary
Re: Quote headers of incoming message when replying?
On 2010-04-07, Michael Ludwig wrote: > Mutt allows you to edit the headers of the mail you're composing through > setting edit_headers = yes. > > Is there a way to have Mutt copy the headers of the incoming message > (ideally, just a selection) along with the body to your editor so you > can quote them in your reply, like in the following example? > > http://markmail.org/message/vkqs2bvt7ovzhnnt You can include the weeded headers by executing :set header before replying to the message. If you want all headers to be included, also execute :unset weed Regards, Gary
Re: FAQ: How to spawn terminal/screen to reply to messages separately?
On 2010-03-29, Nicolas Williams wrote: > I saw in the archives that this is a bit of an FAQ, and it seems that to > this day there's not much of an answer, sadly. > > The best I could do was to create an index macro that pipes the current > message to a script that then: a) pipes stdin to formail, b) saves the > result in a tmp file, c) starts a new instance of mutt -f that_file. Or > perhaps using -H. But that's clearly not quite what I want, nor what > the various users who have asked for this want. > > Ideas: > > - Add a function like but which instead of piping the >message puts the message in a temp file and then allows for expansion >of several parameters in the command line, including: > > %f (the address of the sender of the message) > %r (the To: addresses of the message) > %c (the Cc: addresses of the message) > %a (the To: and Cc: addresses of the message) > %l (the To: and Cc: addresses of the message that are lists) > %R (the Reply-To: address of the message) > %s (the Subject: of the message, with "Re: " prefixed if not %already) > %F (the name of the file containing the message) > > - Same as above but also provide a Unix domain socket/door/whatever >that mutt can listen on for commands from the external command. The >purpose of this is to support connection sharing and avoid having to >re-type IMAP/SMTP passwords. The main sub-command would be to send >the message found in a given file, and also to mark a message in a >folder as replied. The name of the rendezvous would be set in an >environment variable and mutt would support using it. All >send/save/*-hooks would be applied in the primary mutt. > >(This is not really needed when using SASL/GSSAPI, of course. It's >primrarily useful when there are passwords to type.) > > Where would I start if I was to try to implement the first of the above? I think you can do all of your first idea with a macro. The basic idea is: 1. Set 'editor' to something like 'true'; 2. Set 'postponed' to a tmp file; 3. Reply to the message (which will take you immediately to the compose menu); 4. Postpone the reply; 5. Reset 'postponed'; 4. Reset 'editor'; 5. Execute a script as you did before to start mutt on that postponed message. The tricky part is, and has always been in these discussions, making sure the 'replied' flag on the original message is set properly. That seems to require the primary mutt to listen on some sort of IPC mechanism for a command to set the 'replied' flag on the message of a specified Message-ID as you have outlined in your second idea above. Mutt currently checks things like the presence of new mail upon user input or the expiry of a timer, so it seems that it could check the IPC mechanism the same way. I think the solution to the second problem may influence the solution to the first, so it would be my suggestion to work on the second problem first. My first thought is to have the primary mutt create a pipe, launch a child process whose stdout goes to the pipe, and periodically listen for input from the pipe. The only expected input is some sort of command to set the affected message's replied flag. The child process could be a wrapper around an instance of "mutt -H". If that mutt exits with a status of 0, the wrapper writes the "set replied for this Message-ID" command to stdout and exits. Otherwise, it just exits. Rather than a wrapper, of course, it would be nice to just invoke mutt with a flag that tells it to do all that. Before launching the child process, the primary mutt would just need to construct a reply with all the headers required by "-H" and save it to a tmp file. Those are just some ideas anyway. I'm glad you're looking into this. I don't know where in the code to suggest that you start. I usually run cscope on the source code directory tree, then run "vim -c 'grep some_likely_string *.[hc]'" where some_likely_string is something I expect to find associated with the code I'm interested in, and start browsing the code from there. Regards, Gary
Re: relation between folder-hook and push
On 2010-03-18, peng shao wrote: > I recently found the following interesting phenomenon: > > I included the following lines in my muttrc > > mailboxes ~/.MuttMail/inbox > set spoolfile=~/.MuttMail/inbox > folder-hook . 'push :default' > folder-hook inbox 'push :inbox' > > This is the only four lines in the muttrc because I want to do a clean > test. If the folder-hook is used to set variables then I was told by > the manual > http://www.mutt.org/doc/manual/manual-4.html > that I should place the default hook EARLIER than the specific hook, > as I did in the test. > > However, the result is is I enter mutt then I have > > :inbox:default > > at the bottom command area. It contradicts with my understanding to > the folder-hook because the order is reversed compared to the manual. > > Is this a bug, or supposed way? It's the way it's supposed to work, but it is confusing. Folder hooks are processed as the manual says. However, the push command pushes its arguments onto a stack and mutt's input parser later pops those arguments off the stack to parse and execute them. It's that pushing and popping that reverses the order of your pushed commands. The solution is to enter those folder hooks that contain pushes into your muttrc "upside down", like this: folder-hook inbox 'push :inbox' folder-hook . 'push :default' It would be nice to be able to put commands into a queue rather than onto a stack. I don't know why it is the way it is. Regards, Gary
Re: Mark messages as replied
On 2010-03-17, Udo Hortian wrote: > Dear mutt users, > > I am using mutt since years and love it. Still, sometimes it happens to > me, that I am beginning to reply to a message, I save it as a draft, > continue to edit it and send it at some moment. Then sometimes it > happens that the message I am replying to is not marked as read. I am > not sure about the exact circumstances when this happens. Still I would > like to make mutt to mark these messages as ready automatically or to > mark them as ready manually. Is there a way to mark messages as read > manually? Yes. When in the Index Menu (the view that shows the messages in the current mailbox) or in the Pager, type 'w' to set a status flag or 'W' to clear a status flag. Each command shows the list of available flags. You can find the meaning of the flags in the mutt manual. In your case, you probably want to clear the 'N' (New) flag. Alternatively, you can toggle the state of the New flag when you're in the Index Menu by typing 'N'. You can get a list of these and other commands by typing '?' in any menu. You can find out more about message status flags in the mutt manual in the section "The Message Index" and in the table of "Message status flags". Regards, Gary
Re: color about w3m viewing in mutt
On 2010-03-16, peng shao wrote: > On Tue, Mar 16, 2010 at 7:21 AM, Christian Ebert wrote: > > > > > > > > Mmh, you could create an addional mailcap file and toggle the > > $mailcap_path variable. Try the following (untested): > > > > set my_lynx_cap="/path/to/lynxmailcap" > > > > macro pager K1 "\ > > set my_mailcap_path=\$mailcap_path > > mailcap_path=$my_lynx_cap\ > > \ > > set mailcap_path=\$my_mailcap_path &my_mailcap_path" > > \ > > "autoview html with lynx" > > > > c > Thanks a lot for such detailed and patient instructions. I just tested > again the pipe method I sent to the maillist and I apologized I was > totally out of track. Actually the following should be the correct > > text/html; cat %s | iconv -f %{charset} -t utf-8 | elinks ; copiousoutput; > > But this has a drawback---> If I press v to view the attachments and > choose to view the text/html attachment then there will be a > mistake--> I guess here the pipe is not allowed. The pipe is allowed here. If you are getting an error message from using that rule, the problem is something other than the pipe. The problem could be the semicolon after copiousoutput--you don't need a semicolon at the end of the line, only between terms, but I haven't checked whether having one at the end of the line is an error. > But it is not a big problem because I guess very few people need > to view html message in this way. Also I didn't use lynx because > for I don't why but among all text-based web-brower I tested, > elinks is the only one can recognize pipe input as a "url" page > and gives out the correct page. You sometimes need to tell w3m that the input is HTML by using the "-T text/html" option. Regards, Gary
Re: I cringe but ask anyway: how do I download mutt for Mac 10.4?
On Sat, Feb 27, 2010 at 09:50:58AM -0800, fe...@crowfix.com wrote: > does have mutt 1.5.18 on it. Somewhere out there is a pre-compiled > binary, from a trusted source, that I downloaded before, and I'd like > to do that again. Well, we've no way of knowing where you downloaded that from, but google suggests several places you can get Mac binaries from, of which one is http://mac.softpedia.com/get/Internet-Utilities/Mutt.shtml (sorry, I'm not really au fait with Macs, but I think that's for the OS you want). > Wanting mutt on this second laptop is simply not > important enough to download Xcode and go thru all those steps It might be quicker than asking here and waiting for replies though ;)
Re: How to build mutt
On Mon, Feb 22, 2010 at 09:46:58AM -0800, Michael Elkins wrote: > On Mon, Feb 22, 2010 at 06:21:52PM +0100, Gary wrote: > > On Mon, Feb 22, 2010 at 08:10:17AM -0800, Michael Elkins wrote: > > 'grep -iIr docbook *' in the src directory > > returns no results > I'm unsure why you get that result since there are many references to > docbook in the doc/ subdirectory. Hmm. Maybe only after 2006? That seems to be when 1.4.2.2 was released and that's what I have. This seems to use sgml2html, which I now find doesn't appear to exist for Cygwin, so it would explain why the error about the html files appears. > > > In the example you noted above, they are the same directory so it looks > > > odd, but it is not in error. > > > > Well, make appears to disgree with you on that. It just stops after the > > errors noted above and I don't get a binary or whatever documentation > > it's trying to build. Admittedly, I have an old version, so it might not > > be a current problem (it's also the Cygwin version, so it might not even > > really be *your* problem). > > The problem is not the cp, but the fact that the documentation failed to > build. The 'stat' error is saying the source file does not exist. You're right. Today. I'm sure when I looked a couple of days ago there were several html files with names that were something like: manual-.html (going purely from memory). Well, they're not there now, anyway, and I don't know how they could have got there before if they need sgml2html to generate them. Not so important, anyway, I just don't like leaving mysteries :)
Re: How to build mutt
On Mon, Feb 22, 2010 at 08:10:17AM -0800, Michael Elkins wrote: > On Mon, Feb 22, 2010 at 10:19:56AM +0100, Gary wrote: > > are all the capabilities included using "--enable-WHATEVER"? if so, why > > do some final results start with USE, some with HAVE, and others nothing > > special at all? If not, how do I enable/disable them? > > The USE_* options are typically controlled via --enable-* or --with-* Err. In the sense I can use whichever form I like, or in the sense that one or other will work, depending on which option I am trying to include? > options to configure. The HAVE_* are system aspects that the configure > script automatically detects are are not typically user configurable. > The items without a prefix are primarily items which the user *may* need > to override (most of these are old, but would probably be better labeled > with a USE_ prefix). Okay, thanks for that info. Sorry for asking, but I couldn't find this info anywhere. Maybe my google-fu is a bit off at the moment. So --enable-LOCALES_HACK for example, would result in +LOCALES_HACK in the binary, I guess. > > Additionally, is it possible to not build/install the documentation > > somehow? Trying to do that here gives me an error and then make stops > > *sigh* > > I am not sure, but you may be able to remove the "doc" item from the > SUBDIRS variable in the Makefile. Will try. Thanks. > Typically it's better to just install the docbook packages so you can build the docs. Actually I have (even though 'grep -iIr docbook *' in the src directory returns no results). It doesn't help. > > make[2]: Entering directory `/usr/src/mutt/doc' > > ##test -f manual.html || make manual.html || cp ./manual*.html ./ > > cp ./manual*.html ./ > > cp: cannot stat `./manual*.html': No such file or directory > > make[2]: *** [try-html] Error 1 > > make[2]: Leaving directory `/usr/src/mutt/doc' > > make[1]: *** [install-recursive] Error 1 > > make[1]: Leaving directory `/usr/src/mutt' > > make: *** [install] Error 2 > > > > Why would anyone want to copy ./ to the same place anyway? > > Any why on earth would they expect that to succeed? > > The build system does not assume that you are building in the same > directory where the sources reside. Okay. > In the example you noted above, they are the same directory so it looks > odd, but it is not in error. Well, make appears to disgree with you on that. It just stops after the errors noted above and I don't get a binary or whatever documentation it's trying to build. Admittedly, I have an old version, so it might not be a current problem (it's also the Cygwin version, so it might not even really be *your* problem). Okay, so I tried this removing the doc entry from SUBDIR in the Makefile and that seems to work fine. Thanks for your help. I'll see to getting the configure options sorted out correctly now.
How to build mutt
I know it should be as simple as './configure [some options]' followed by 'make install', but I am at a loss knowing which options I should apply in order to have the same capabilities as another build's. For example in order to have +BUFFY_SIZE -DEBUG -DL_STANDALONE -DOMAIN +ENABLE_NLS -EXACT_ADDRESS +HAVE_BKGDSET +HAVE_COLOR +HAVE_CURS_SET -HAVE_GETADDRINFO +HAVE_GETSID +HAVE_ICONV +HAVE_LANGINFO_CODESET +HAVE_LANGINFO_YESEXPR +HAVE_META +HAVE_PGP +HAVE_REGCOMP +HAVE_RESIZETERM +HAVE_START_COLOR +HAVE_TYPEAHEAD -HAVE_WC_FUNCS -HOMESPOOL -ICONV_NONTRANS -ISPELL +LOCALES_HACK -SUN_ATTACHMENT -USE_DOTLOCK +USE_FCNTL -USE_FLOCK +USE_GNU_REGEX -USE_GSS +USE_IMAP +USE_POP -USE_SASL -USE_SETGID +USE_SSL are all the capabilities included using "--enable-WHATEVER"? if so, why do some final results start with USE, some with HAVE, and others nothing special at all? If not, how do I enable/disable them? Additionally, is it possible to not build/install the documentation somehow? Trying to do that here gives me an error and then make stops *sigh* make[2]: Entering directory `/usr/src/mutt/doc' ##test -f manual.html || make manual.html || cp ./manual*.html ./ cp ./manual*.html ./ cp: cannot stat `./manual*.html': No such file or directory make[2]: *** [try-html] Error 1 make[2]: Leaving directory `/usr/src/mutt/doc' make[1]: *** [install-recursive] Error 1 make[1]: Leaving directory `/usr/src/mutt' make: *** [install] Error 2 Why would anyone want to copy ./ to the same place anyway? Any why on earth would they expect that to succeed?
More problems with umlauts *sigh*
For some reason although when I send emails containing certain umlauted characters everything looks fine to me (i.e., in my editor), the recipient sometimes (or possibly always, I only know because one person mentioned it) doesn't see those characters correctly. They report that in emails containing umlauted character (upper or lower case), the characters appear to be replaced by spaces. If I send *myself* an email containing upper case an umlauted A, O, or U then when I receive it, I see garbage (a patterned "box" followed by something like "~D") in mutt where the character should be, but if I look at the email via webmail it looks fine. Lower case umlauted characters look fine in all cases, so this is a little different to others' experience when reading my emails. If I open the mailbox in my editor, the affected characters are shown as, for example: \304 \344 (i.e. a backslash followed by a number - some character encoding?) I notice that the Content-Type header contains: text/plain; charset=iso-8859-1 Should/could that be correct? I have the following environment variables set: $ env | grep -E "(LANG|LC_)" LANG=en_US.UTF-8 LC_CTYPE=de_CH.UTF-8 and within mutt I can see that the charset variable is set to UTF-8 - ':set &charset ?charset' displays 'charset="utf-8"'. similarly, 'send_charset="us-ascii:iso-8859-1:iso-8859-2:utf-8"' FWIW - $ mutt -v Mutt 1.4.2.2i (2006-07-14) Copyright (C) 1996-2002 Michael R. Elkins and others. [...] System: CYGWIN_NT-5.1 1.7.1(0.218/5/3) (i686) [using ncurses 5.5] Compile options: -DOMAIN -DEBUG -HOMESPOOL -USE_SETGID -USE_DOTLOCK -DL_STANDALONE +USE_FCNTL -USE_FLOCK +USE_POP +USE_IMAP -USE_GSS +USE_SSL -USE_SASL +HAVE_REGCOMP +USE_GNU_REGEX +HAVE_COLOR +HAVE_START_COLOR +HAVE_TYPEAHEAD +HAVE_BKGDSET +HAVE_CURS_SET +HAVE_META +HAVE_RESIZETERM +HAVE_PGP +BUFFY_SIZE -EXACT_ADDRESS -SUN_ATTACHMENT +ENABLE_NLS +LOCALES_HACK -HAVE_WC_FUNCS +HAVE_LANGINFO_CODESET +HAVE_LANGINFO_YESEXPR +HAVE_ICONV -ICONV_NONTRANS +HAVE_GETSID -HAVE_GETADDRINFO -ISPELL SENDMAIL="/usr/sbin/sendmail" MAILPATH="/var/spool/mail" PKGDATADIR="/usr/share/mutt" SYSCONFDIR="/etc" EXECSHELL="/bin/sh" -MIXMASTER (i.e. it is the official Cygwin package; no, I don't know why that hasn't been upgraded to the official stable version since 2007)
Re: HTML view any time ever?
On 2010-02-16, JP Bruns wrote: > Baldur Gislason [16.Feb.2010 15:12]: > > >For the past several years I have been using lynx and links to open > >HTML mail as if it was attachments inside mutt, are there any plans to > >make a simple html renderer or even filter as a part of the normal mail > >viewer? Is there even a way to make the normal mail viewer default to > >run some preprocessor before displaying html mail? > > I think what you are looking for exists in using links/w3m/other + > mailcap. In order to view html mails directly in mutt I have this one > liner (without \) in my .mailcap: > > text/html; w3m -dump %s; copiousoutput; description=HTML Text; \ > nametemplate=%s.html > > Maybe that is what you are looking for? For that to work, you'll also need this in your muttrc: auto_view text/html Regards, Gary
Re: forward email as attachment
On 2010-02-04, Asif Iqbal wrote: > Hi All > > My company policy is report spam email to the abuse as an outlook > attachment. I know mutt can forward email as mime attachment. How do I > make sure it sends the attachment just like the > way outlook can forward an email as an attachment? Do I need to make > any special macro to achieve that or mime attachment does the same? > > I tried to set mime_forward=ask-yes and that sends the email as a > message/rfc822, 7bit type attachment during forward. I am not sure > what kind of mime attachment outlook uses. I don't know what might be special about an Outlook attachment, either. I would have one of your coworkers who uses Outlook forward a message to you following the company's procedure for attaching spam. Then use mutt to examine the message structure. When you think you understand how to use mutt to forward a message the same way, forward one to yourself and compare it with the forwarded message from Outlook. Regards, Gary
Re: Soft killfile, folder-hook limit
On 2010-02-04, Andre Majorel wrote: > On 2010-02-04 00:33 -0600, David Champion wrote: > > > Limit is a function that you bind to a key. To tell mutt to execute > > a function, you use the "push" command. This emulates keystrokes by > > "pushing" them into the keyboard input queue. > > > > folder-hook .'push ~A' > > folder-hook infested 'push ! ~f annoy...@gmail.com' > > Thanks but that doesn't work. The push command works on its own > but after folder-hook, it just makes the screen flash (visual > bell, probably). > > I've tried various combinations of single and double quotes (push > blah, push 'blah', 'push blah', "push blah", 'push "blah"', "push > 'blah'") to no avail. I think that's because push actually pushes those commands onto a stack which mutt subsequently pops. Try putting them in this order instead: folder-hook infested 'push ! ~f annoy...@gmail.com' folder-hook .'push ~A' HTH, Gary
Re: time
On 2010-01-06, Ravi Uday wrote: > On Wed, Jan 6, 2010 at 1:27 PM, Patrick Ben Koetter > wrote: > > * Ravi Uday : > >> Kyle, > >> > >> This didn't work. > >> > >> The mail header shows : > >> > >> Date: Tue, 5 Jan 2010 21:59:44 -0800 > >> > >> but my laptop's time is : Jan-6th-2010 11:38 AM. > > > > Did you source the ~/.bashrc after editing it? > Yes I did it. > On the linux server where i run mutt : > > bash-3.00$ date > Wed Jan 6 08:44:40 IST 2010 > > Now from within mutt, if I check a recent mail's header, I see this : > .. > Date: Wed, 6 Jan 2010 00:44:27 -0800 > .. > > I just have > export TZ=IST > in my .bashrc. > > Both the dates(from bash and from within mutt) are wrong > when I see from my windows m/c. > It rightly shows - Jan-6-2010 2:15 PM ! whichis the correct time now On a Red Hat system I just tried, TZ=IST doesn't work for me, either, but TZ=Asia/Calcutta does. The time zone names are in /usr/share/zoneinfo. HTH, Gary