File: shr.el.html

This package takes a HTML parse tree (as provided by libxml-parse-html-region) and renders it in the current buffer. It does not do CSS, JavaScript or anything advanced: It's geared towards rendering typical short snippets of HTML, like what you'd find in HTML email and the like.

Defined variables (34)

shr-allowed-imagesIf non-nil, only images that match this regexp are displayed.
shr-blocked-imagesImages that have URLs matching this regexp will be blocked.
shr-bulletBullet used for unordered lists.
shr-content-functionIf bound, this should be a function that will return the content.
shr-cookie-policyWhen to use cookies when fetching dependent data like images.
shr-correct-attribute-caseAttributes for correcting the case in SVG and MathML.
shr-discard-aria-hiddenIf non-nil, don’t render tags with ‘aria-hidden="true"’.
shr-external-browserFunction used to launch an alternative browser.
shr-external-rendering-functionsAlist of tag/function pairs used to alter how shr renders certain tags.
shr-fill-textNon-nil means to fill the text according to the width of the window.
shr-hr-lineCharacter used to draw hr lines.
shr-image-animateNon-nil means that images that can be animated will be.
shr-image-ascentThe value to be used for :ascent property when inserting images.
shr-image-zoom-level-alistAn alist of possible image zoom levels.
shr-image-zoom-levelsA list of image zoom levels to cycle through with ‘shr-zoom-image’.
shr-inhibit-imagesIf non-nil, inhibit loading images.
shr-max-image-proportionHow big pictures displayed are in relation to the window they’re in.
shr-max-inline-image-sizeIf non-nil, determines when the images can be displayed inline.
shr-max-widthMaximum text width to use for HTML rendering.
shr-offer-extend-specpdlNon-nil means offer to extend the specpdl if the HTML nests deeply.
shr-prefer-media-type-alistPreferences for media types.
shr-put-image-functionFunction called to put image and alt string.
shr-sliced-image-heightHow tall images can be before slicing in relation to the window they’re in.
shr-sub-raise-factorThe value of raise property for subscripts.
shr-sup-raise-factorThe value of raise property for superscripts.
shr-table-cornerCharacter used to draw table corners.
shr-table-horizontal-lineCharacter used to draw horizontal table lines.
shr-table-vertical-lineCharacter used to draw vertical table lines.
shr-target-idTarget fragment identifier anchor.
shr-url-transformerFunction to transform URLs.
shr-use-colorsIf non-nil, respect color specifications in the HTML.
shr-use-fontsIf non-nil, use proportional fonts for text.
shr-use-xwidgets-for-mediaIf non-nil, use xwidgets to display video and audio elements.
shr-widthWindow width to use for HTML rendering.

Defined functions (142)

shr--blink-link()
shr--current-link-region()
shr--extract-best-source(DOM &optional URL PREF)
shr--fix-table(DOM CAPTION HEADER FOOTER)
shr--fix-tbody(TBODY)
shr--get-media-pref(ELEM)
shr--have-one-fringe-p()
shr--image-type()
shr--image-zoom-fill-height(DATA CONTENT-TYPE WIDTH HEIGHT)
shr--image-zoom-image-size(DATA CONTENT-TYPE WIDTH HEIGHT)
shr--image-zoom-original-size(DATA CONTENT-TYPE WIDTH HEIGHT)
shr--inline-image-p(IMAGE)
shr--parse-srcset(SRCSET &optional WIDTH)
shr--preferred-image(DOM)
shr--remove-blank-lines-at-the-end(START END)
shr--set-target-ids(IDS)
shr--use-cookies-p(URL BASE)
shr-adaptive-fill-function()
shr-add-font(START END TYPE)
shr-browse-image(&optional COPY-URL)
shr-browse-url(&optional EXTERNAL MOUSE-EVENT NEW-WINDOW)
shr-collect-extra-strings-in-table(DOM &optional FLAGS)
shr-color-check(FG BG)
shr-colorize-region(START END FG &optional BG)
shr-column-specs(DOM)
shr-copy-url(URL)
shr-correct-dom-case(DOM)
shr-count(DOM ELEM)
shr-descend(DOM)
shr-dom-max-natural-width(DOM)
shr-dom-print(DOM)
shr-dom-to-xml(DOM &optional CHARSET)
shr-encode-url(URL)
shr-expand-alignments(START END)
shr-expand-url(URL &optional BASE)
shr-face-background(FACE)
shr-fill-line()
shr-fill-lines(START END)
shr-fill-text(TEXT)
shr-fontize-dom(DOM &rest TYPES)
shr-generic(DOM)
shr-get-image-data(URL)
shr-heading(DOM &rest TYPES)
shr-image-blocked-p(URL)
shr-image-displayer(CONTENT-FUNCTION)
shr-image-fetched(STATUS BUFFER START END &optional FLAGS)
shr-image-from-data(DATA)
shr-indirect-call(TAG-NAME DOM &rest ARGS)
shr-insert(TEXT)
shr-insert-document(DOM)
shr-insert-image()
shr-insert-table(TABLE WIDTHS)
shr-insert-table-ruler(WIDTHS)
shr-make-placeholder-image(DOM)
shr-make-table(DOM WIDTHS &optional FILL STORAGE-ATTRIBUTE)
shr-make-table-1(DOM WIDTHS &optional FILL)
shr-mark-fill(START)
shr-max-columns(DOM)
shr-maybe-probe-and-copy-url(URL)
shr-mouse-browse-url(EV)
shr-mouse-browse-url-new-window(EV)
shr-next-link()
shr-outline-level()
shr-outline-search(&optional BOUND MOVE BACKWARD LOOKING-AT)
shr-parse-base(URL)
shr-parse-style(STYLE)
shr-previous-link()
shr-pro-rate-columns(COLUMNS)
shr-probe-and-copy-url(URL)
shr-probe-url(URL CONT)
shr-put-image(SPEC ALT &optional FLAGS)
shr-render-buffer(BUFFER)
shr-render-region(BEGIN END &optional BUFFER)
shr-render-td(DOM WIDTH FILL)
shr-render-td-1(DOM WIDTH FILL)
shr-replace-image(DATA START END &optional FLAGS)
shr-rescale-image(DATA CONTENT-TYPE WIDTH HEIGHT &optional MAX-WIDTH MAX-HEIGHT)
shr-save-contents(DIRECTORY)
shr-show-alt-text()
shr-store-contents(STATUS URL DIRECTORY)
shr-string-number(STRING)
shr-string-pixel-width(STRING)
shr-table-body(DOM)
shr-table-widths(TABLE NATURAL-TABLE SUGGESTED-WIDTHS)
shr-tag-a(DOM)
shr-tag-abbr(DOM)
shr-tag-acronym(DOM)
shr-tag-audio(DOM)
shr-tag-b(DOM)
shr-tag-base(DOM)
shr-tag-bdi(DOM)
shr-tag-bdo(DOM)
shr-tag-blockquote(DOM)
shr-tag-body(DOM)
shr-tag-br(DOM)
shr-tag-code(DOM)
shr-tag-comment(DOM)
shr-tag-dd(DOM)
shr-tag-del(CONT)
shr-tag-div(DOM)
shr-tag-dl(DOM)
shr-tag-dt(DOM)
shr-tag-em(DOM)
shr-tag-font(DOM)
shr-tag-h1(DOM)
shr-tag-h2(DOM)
shr-tag-h3(DOM)
shr-tag-h4(DOM)
shr-tag-h5(DOM)
shr-tag-h6(DOM)
shr-tag-hr(DOM)
shr-tag-html(DOM)
shr-tag-i(DOM)
shr-tag-img(DOM &optional URL)
shr-tag-ins(CONT)
shr-tag-li(DOM)
shr-tag-mark(DOM)
shr-tag-math(DOM)
shr-tag-object(DOM)
shr-tag-ol(DOM)
shr-tag-p(DOM)
shr-tag-pre(DOM)
shr-tag-s(DOM)
shr-tag-script(DOM)
shr-tag-span(DOM)
shr-tag-strong(DOM)
shr-tag-style(DOM)
shr-tag-sub(DOM)
shr-tag-sup(DOM)
shr-tag-svg(DOM)
shr-tag-table(DOM)
shr-tag-table-1(DOM)
shr-tag-template(DOM)
shr-tag-title(DOM)
shr-tag-tt(DOM)
shr-tag-u(DOM)
shr-tag-ul(DOM)
shr-tag-video(DOM)
shr-url-at-point(IMAGE-URL)
shr-urlify(START URL &optional TITLE)
shr-vertical-motion(COLUMN)
shr-zoom-image(&optional POSITION ZOOM-LEVEL)

Defined faces (15)

shr-abbreviationFace for <abbr> elements.
shr-codeFace used for rendering <code> blocks.
shr-h1Face for <h1> elements.
shr-h2Face for <h2> elements.
shr-h3Face for <h3> elements.
shr-h4Face for <h4> elements.
shr-h5Face for <h5> elements.
shr-h6Face for <h6> elements.
shr-linkFace for link elements.
shr-markFace used for <mark> elements.
shr-selected-linkTemporary face for externally visited link elements. When a link is visited with an external browser, the link temporarily blinks with this face.
shr-sliced-imageFace used for sliced images. This face should remove any unsightly decorations from sliced images. Otherwise, decorations like underlines from links would normally show on every slice.
shr-strike-throughFace for <s> elements.
shr-supFace for <sup> and <sub> elements.
shr-textFace used for rendering text.