Blog de Luis Mochán


Sobre
Blog de Luis Mochán.

Blog de Luis Mochán del Instituto de Ciencias Físicas.

Mantenido por
Luis Mochán
mochan@fis.unam.mx
GPG id: DD344B85
Fingerprint: 2ADC B65A 5499 C2D3 4A3B 93F3 AE20 0F5E DD34 4B85

Subscripciones
Aquí puedes suscribirte a este blog vía RSS.

Instrucciones
Aquí hay (o habrá) un instructivo sobre el uso de este blog.

Sabores
Este blog puede verse con otros estilos, como son:

  • índice
  • RSS
  • Ligas
    Algunas ligas:

  • Esta computadora
  • Página personal de Luis Mochán
  • Página del ICF-UNAM
  • Wiki del ICF-UNAM
  • Blog del ICF-UNAM
  • Página de; Campus Morelos de la UNAM
  • Página de la UNAM

  • Tue, 01 Nov 2011

    Use Gmail-like Labels with Mutt

    Gmail style labels in mutt

    I waste lot's of time managing my email. I actually organize most of my working schedule around my email. I used to save any message in a folder correspondiong to the sender when I get done with whatever work was related to that message. The problem became finding and recovering messages that were related to more than one person or more than one project. Gmail offers a solution, which is the use of multiple labels for each message and the ability to search within labels.

    I found a program, sup (distributed as sup-mail within Debian), which is a fast console-based email client that emulates the behaviour of gmail. However, my main language is Spanish and sup turned out to be inadequate for handling its accented and other non-ascii characters. I did try to fix it, but got in trouble with my Debian Ruby installation. I also worried about the maturity of Sup (current version is 0.12), as my email is work related.

    Then I found through Steve Kemp's blog an alternative solution for mutt. I have been a user of mutt for a long time and I enjoy its lean text interface. However, I was not aware until recently of its power. In particular, it has powerfull commands for searching, grouping and limiting displayed emails using a search machine that understands regular expressions. It can search within headers, within a particular header and it may can combine search criteria with logical and/or/not operators. Furthermore, it can search within the X-Label header, which may thus be employed for writing gmail-like headers. What it is needed is an X-Label editor. Fortunately, Alberto Bertogly provided a very nice solution. He wrote a script to edit the X-Label field and a series of mutt macros to call that script. The main idea is that mutt allows incoming messages to be edited. What Alberto did was to replace within his macros the usual text editor by his own script to edit labels.

    I have built on top of his solutions making a few changes. I wrote the script in perl, and used a few tools in order to allow completion of new labels based in known previous labels, allow a history mechanism to recall previous label lists, added macros to append, remove, show, clean, list and edit labels, and allowed the macros to act over tagged collections of messages beyond acting on single messages.

    The macros to be added to the .muttrc file are here. My perl script is here. You should make it executable and modify muttrc to point to the correct path.

    The available macros are:

    1. y append new label
    2. YA append new label (the same)
    3. YR remove existing label
    4. YC clean all labels of message
    5. YS show labels attached to message
    6. YL show all existing labels
    7. YE edit labels (enter an Append/Remove/Clean/Show/List/Quit cycle)
    8. <ctrl-y> limit view to a given label.

    The command is applied to the current message unless there is one or more tagged message, in which case, the command is applied to all the tagged messages (one message at a time).

    Usefull commands are:

    1. l !~h ^X-Label: to show only messages that have not been labeled yet, i.e., unrpcessed messages.
    2. l ~h ^X-Label: to show only messages that have already been labeled.
    3. T ~h ^X-Label: followed by ;s > to move all labeled messages to mbox.
    4. <ctrl-y> label to limit view to messages with label label
    5. l ~y label1 ~y label2 to limit view to messages that have both label1 and label2
    6. l ~y label1 |~y label2 to limit view to messages that have either label1 or label2.
    7. l ~y label1 !~y label2 to limit view to messages that have label1 but don't have label2.

    Cargado a las 11:14 en /mochan/varios / 20111101mutt, | Etiquetas: | liga permanente



    Lista global de etiquetas:

    aborto, acmor, ade651, administración, age, agua, amc, AMC, AMLO, amor, América Latina, android, anharmonic oscillator, animaciones, anuncios, análisis dimensional, Aristegui, arte, astronomy, astronomía, asymptote, atmósfera, autoreferencia, bachillerato, backflip, Belkin, biblioteca, bicicleta, bicicletas, bicycle, bikepath, biofísica, biografía, biopolímeros, blosedit, blosxom, books, burocracia, Cablemás, cablevision, Calderón, calentamiento global, campus morelos, captcha, Casimir, censura, charlatanería, chistes, ciclopista, ciencia, cine, ciudad, Ciudad de México, club de astronomía, colegio, colloids, coloquio, conacyt, congreso, consejoConsultivo, contaminación, corrupción, counter, creation and anhilation operators, crimen, ctic, cuento, Cuernavaca, cuernavaca, cómputo, danza, debate, debian, defensa, deformed operators, derechos humanos, detector molecular, dgsca, diputados, distinción, divulgación, DNS , docencia, documentation, doi, doppler, drenaje, drogas, earthquake, earthquakes, ecology, ecología, economía, edad de hielo, editoriales, educación, eficiencia, ejército, elecciones, electrodinámica, electrodynamics, email, empleos, emérito, encuestas, energy, energía, EPN, equilibrium, espcm, estado, eventos, extorsión, extraordinary transmission, extraterrestres, familia, fascism, fiesta, firefox, firewall, fluctuations, fluidos, formulaE, fotos, freedom, Fukushima, física, game theory, garciaLorca, gas, generación, geology, gnu, graphics, GT200, gt200, guerra, guitar, guitarra, guns, guías de onda, hacienda, halos, harmonic oscillator, historia, homeopatía, hospital, humanidades, humor, icf, IFAI, ifai, impunidad, infraestructura, ingeniería, innovación, instrumentación, instrumentation, interacción radiación-materia, internet explorer, ionosphere, ionósfera, IOP, ipicyt, iusacell, japón, jueces, justicia, Karman, laicismo, laptop, Leika, lenovo, ley, libertad, libertad

    , libros, licenciatura, linux, literatura, lylipond, manchas solares, matemáticas, materiales fotónicos, mathematics, mb300, medicina, medicine, medio ambiente, metamateriales, metamaterials, microsoft, militares, moire, moires, moiré, mole, Morelos, morelos, morse oscillator, motivation, mountaineering, movimiento perpetuo , museo, music, mutt email perl labels gmail, México, música, nanociencias, nanoparticles, nanotechnology, narco, network, noticias, nsa, nuclear, nuclear magnetic resonance, obituario, olimpiadas, opinión, pacto, paging, papers, partituras, pcf, pdf, periódico historia, periódicos, personajes, PHP, physics, physicsWorld, plasmones, plegado, plugins, podcast, politics, polímeros, política, posgrado, positron, Poynting, prensa, prevención, pride, productividad, propaganda, pseudociencia, pseudociencia , pseudoscience, puentes, quantum mechanics, radiación, radio, rayos X, reactores nucleares, red, redacción, reforma, regular expressions, religion, religión, retrato, rewards, robbery, rock, root, routing, schools, science, security, seguridad, seguridad nacional, seminario, seminarios, senado, senadores, sheetMusic, simuladores, skydiving, SNI ciencia, sociedad, software, sol, spam, spamassasin, ssh, subdesarrollo, tagging, tcj, tecnología, telefonía celular, temblor, teoría de juegos, terremoto, terrorism, terrorismo, tomography, topes, tortura, trafico, transporte, tráfico, turbulence, turbulencia, uaem, ultrasound, UNAM, unam, universidad, universidades, universum, vacuum, vehículos eléctricos, video, violencia, von Kármán, vortices, vórtices, wbcaptcha, wiki, wikileaks, wireless, X, X rays, zahorismo, ética, óptica


    Visitas: 94863141925667