I am using notmuch as my email client and using its default interface, the emacs mode. I'm trying to figure out how to prevent it from displaying images in email - since I'm using it for my professional email, the images are pretty much always unwelcome (I also am an enemy of those 1-pixel tracking tags that some anti-social services poke into HTML email).
I'm coming up empty on Google searches and consulting the notmuch mode documentation and M-x customize options. I assume, though, that there's some elisp value I can twiddle to make this work, and it's simply not obvious to me.
How can I tell notmuch to ignore images, or alternatively, to display only the text part of emails by default, ignoring MIME/HTML content?
Adding the following line to ~/.emacs seemed to do it for me:
(gnus-inhibit-images t)
Related
I'm using EWW Emacs browser for opening various remote pages(mostly documentation) which is very handy most of the time.
I'm still trying to understand why certain pages take 4-5-6+ seconds to be rendered in eww(which take <1s in Chrome, for comparison).
For my tasks, I only care about the loaded content - images and fancy styles are not needed.
Is there any simple way to speed it up?
Like setting readable mode/disabling images before calling eww? If that's possible at all.
Update from a few weeks later
I made a few experiments and from what I found the biggest contributing factor in my case is when a page has lots of third-party fonts.
I wasn't able to find a way to disable font fetching in eww source code so probably true "text based" browser like w3m was a better solution in the first place.
Any clarification comments and answers are still very welcome.
I'm trying to work out how to get org mode to open (as clickable links) URLs which link to another piece of software called ConnectedText. ConnectedText allows other applications to link to its files via URLs that look like the following: ct://Welcome/Welcome
If I invoke browse-url via M-x browse-url, and then paste one of these links, then the links open as they should do. But if I add them as clickable links in org mode they don't work (I get the 'no match- create this as a new heading?' dialogue).
According to the org-mode manual, clickable links are handled by the browse-url-at-point function. When I try to use browse-url-at-point to open one of these URLs (via M-x browse-url-at-point), it also doesn't work, and instead tries to open the link in my web browser.
So I'm trying to figure out how to get browse-url-at-point to behave in the same way as browse-url in relation to these URLs.
Browse-url, if invoked when the point is on one of these URLs, defaults to the URL (as per the documentation; "If point is located near a plausible URL, that URL is used as the default.") However, when it does this, it inserts http:// so the resulting URL looks like the following: http://ct://Welcome/Welcome. I assume this is the reason things aren't working.
Is there a way I can get browse-url-at-point to not insert this http:// prefix?
Or am I going about this the wrong way?
Thanks for any suggestions!
David
The Emacs developers provided me with a solution to this issue. If ct:// is added to thing-at-point, then browse-url-at-point works in the same way as M-x browse-url in the scenario described in the question. The following added to the init file does this:
(require 'thingatpt)
(push "ct://" thing-at-point-uri-schemes)
I like to compose messages in Emacs then copy/paste into gmail for sending. I often want to include in the body of the message a link or links to other web sites. In gmail's compose dialog box I can click on the Insert Link button then enter the text to display and the URL for the link. I want to achieve the same effect in Emacs. I thought a standard <a href> link might work, like this:
Google
but gmail doesn't seem to interpret that as it would be here on SO, for example. Obviously, the string http://www.google.com is recognised as a link, but I would like to be able to specify the text.
I have found many posts on the use of mailto link but not on inserting URLs. Maybe I've missed something obvious, but is there any way to achieve this? Some kind of markup that works?
gmail-message-mode was designed for exactly this use case:
gmail-message-mode is an emacs major-mode for editing Gmail messages using markdown syntax, it is meant for use with browser plugins which allow you to edit text fields with external applications (in this case, emacs).
Install an appropriate editor plugin for your browser:
Plugins
Google-Chrome or Chromium - Edit with emacs
Conkeror - Spawn Helper (built-in)
Firefox - Used to work with It's all text. See this thread for a hacky workaround.
Others - Tried it in another browser? let me know!
There will also be some Emacs configuration, depending on the plugin you choose. For instance, to get Edit with Emacs working, I have edit-server installed, and make sure to enable it on startup with (edit-server-start).
Install gmail-message-mode from MELPA or MELPA stable.
ham-mode ("HTML as Markdown") takes care of the Markdown / HTML translation for gmail-message-mode, so you will also have to configure ham-mode's ham-mode-markdown-command to something appropriate.
I usually have Pandoc installed, and use something like this:
(setf ham-mode-markdown-command
'("/usr/bin/pandoc" "--from" "markdown" "--to" "html" "--standalone" file))
Open up a Gmail editing window and trigger the Emacs plugin. For Edit with Emacs, I right-click the message section and select "Edit with Emacs".
Switch to Emacs and edit your message in Markdown format. When you're done, C-x #.
A short test message might look like this:
Test **message** *using* [gmail-message-mode](https://github.com/Bruce-Connor/gmail-mode).
Which renders, correctly, like this in Gmail:
Test message using gmail-message-mode.
This might seem like a lot of work, but if you've alredy got a plugin configured to edit textareas in Emacs like I had, it's really not much of a change.
Use org-mime.
You can enter the links in org-mode format like this:
[[http://stackoverflow.com/questions/26046646/composing-gmail-messages-in-text-editor-complete-with-gmail-links][Composing gmail messages in text editor]]
Then use the org-mime function org-mime-htmlize to convert the message to HTML, including the links.
I have a template which i used for sending emails written purely in hand made with css, and then i tested in Firefox/InternetExplorer/Chrome browser. But when i send that email to My boss PC as he is always Microsoft outlook user.
He always gets the alignment broken, texts broken all problems start. My question is how do you really write then? None of the web browser showing my template wrong.
I searched a lot, but most answers are not deeply and correctly well answered about this. I would really appreciate some experts input on this.
Thanks
outlook uses an older version of Trident, the CSS rendering engine. Depending on what Outlook your boss is on, the worse it can get. Outlook 2010 actually reverted to an older version of Trident because of Microsoft losing the Anti-trust case with the EU, so whatever version was before 2010 actually renders better, however they are both quite subpar # best.
you're going to want to literally stop developing with modern html/css and fall back on old school table layouts. i know, its gross, but you're going to have to do it for email.
the best tests are native, but if you don't have access to both versions (not many do) you should check out EmailOnAcid.com, they provide a plethora of email clients you can test on.
constantcontact.com, mailchimp.com and campaignmonitor.com all offer more than testing services if you need anything else.
Outlook 2007 is the bad guy. Any newer or older is much better. In Outlook 2007 lots of CSS commands don't work.
See this page: http://www.email-standards.org/ for details.
However, try sending your emails to Gmail.com and see how it gets displayed in Gmail web interface - Gmail is quite restrictive and as a rule of thumb, if it displays nicely, it should look good in other web clients too.
Some advice regarding HTML emails:
Outlook
It is good to provide width for Outlook, otherwise the CSS may crash.
Outlook doesn't support padding for <div>s / <p>s, float and various other things.
Gmail
For Gmail, you should use inline CSS in preference to defining classes.
Gmail actually parses CSS provided by you and for instance, changes height to min-height so using height is useless. However min-height of <td> is not respected by the browsers, so internal <div>s inside <td>s can be used to assure that min-height was applied.
Gmail strips background images, and generally in all email clients images are displayed upon user request for security reasons. Therefore, wrap images with <div> and set background color and color of this outer div, and provide alt (alternative text) for image (note also that images with empty src do not preserve width and height while rendered by the browser).
How do you put the Amazon Kindle web browser into Article Mode via HTML or Javascript?
Editor's note: Some pages are not automatically detected as "articles" by the Kindle 3 browser, and give an error message when trying to go into Article mode. What does the Article mode use to determine what portion of the page to display?
Is this related at all to Readability?
http://lifehacker.com/5163401/readability-bookmarklet-quick+formats-pages-for-smoother-text
Actual JavaScript code for Readability, which is heuristic based:
// Study all the paragraphs and find the chunk that has the most <p>'s and keep it:
This also appears to be related to Safari 5's Reader mode. Here is what is required for Safari Reader:
This definitely needs more investigating, but so far, these appear to be the most important factors for Safari’s Reader functionality to kick in:
Use the right markup, i.e. make sure the most important content is wrapped inside a container element. Whether you use <article>, <div> or even <span> doesn’t seem to matter — as long as it’s not <p>.
The content needs to be long enough. Use enough words, use enough paragraphs, use enough punctuation. Every paragraph should have at least 100 characters.
Reader doesn’t work for local documents.
http://www.wired.com/gadgetlab/2010/09/simple-tip-turns-kindle-into-ultimate-news-reader/ - The "f" key feature outlined above or some other feature? Not quite sure what article mode means.
It means that the browser will try to identify if the page you are looking at has a main body of text (is an article), parse it out and then display only that text without clutter and for easy scrolling.
I don't think you can force it via the web page's code
As far as I know, once the website has loaded (and if you are on an specific topic) you can turn on the "Article Mode" from the menu.
I've seen similar JS tools for Chrome too, so I assume it's part of webkit.