首页 > w3m, 中级, 初级 > Emacs内置浏览器EWW


2015年4月20日 hick 发表评论 阅读评论


EWW, 是 Emacs Web Wowser 的缩写(下边也写作 eww), Wowser 直译是”令人印象深刻的事物”的意思. 是 2013 年出现, Emacs 24.4 开始内置的文本型浏览器. 以下的使用基于 Emacs 24.4 或者以上版本.

不同于传统的 Emacs 常见浏览器方案 w3m 需要外部工具支持, eww 不需要外部工具支持. 另外不支持 js 以及外部引入 css , 损失了页面效果的同时, 也减少了很多 http 请求, 加载速度非常快.


M-x eww ENTER emacsist.com 即可访问 Emacs 爱好者站点 Emacsist.com . 打开网页以后, 显示界面上一般按单个字母即可进行操作, 比如 q 为退出, 也支持简单的书签和浏览历史等功能, 如果当前网页用 eww 查看起来实在糟糕, 则可以用按 & 调用 eww-browse-with-external-browser 的配置在外部浏览器打开当前页面. 更详细的操作指引可以 C-h m 查看.

如果默认的按键不符合操作习惯, 可以参考下面的这样的方式去配置修改:

(with-eval-after-load 'eww
   '(eww-search-prefix "https://www.google.com.hk/search?q="))

  (define-key eww-mode-map (kbd "h") 'backward-char)
  (define-key eww-mode-map (kbd "n") 'next-line)
  (define-key eww-mode-map (kbd "s") 'forward-char)
  (define-key eww-mode-map (kbd "t") 'previous-line)

  (define-key eww-mode-map (kbd "H") 'eww-back-url)
  (define-key eww-mode-map (kbd "S") 'eww-forward-url)

  (define-key eww-mode-map (kbd "b") 'eww-history-browse)
  (define-key eww-mode-map (kbd "c") 'eww-browse-with-external-browser)
  (define-key eww-mode-map (kbd "i") 'eww)
  (define-key eww-mode-map (kbd "m") 'eww-lnum-follow)
  (define-key eww-mode-map (kbd "z") 'eww-lnum-universal)

  (define-key eww-mode-map (kbd "M-n") 'nil)
  (define-key eww-mode-map (kbd "M-p") 'nil)

  (define-key eww-mode-map (kbd "<C-S-iso-lefttab>") 'eww-previous-buffer)
  (define-key eww-mode-map (kbd "<C-tab>")           'eww-next-buffer)

实际对比 Emacsist.com 在 chrome 等浏览器效果, 会发现因为使用外部 css 控制页面布局, 变形还是比较大, 不过因为做过特殊适配, 基本能比较整齐的显示. 如果尝试访问我的 blog: blog.hickwu.com , 由于页面布局简单, 显示效果基本跟 chrome 上差不多. 具体参见 eww1.gif


默认配置下, 如果 M-x eww 回车后输入的内容被检测出来是网址,自动打开, 否则会调用 DuckDuckGo 进行搜索. 前文的 eww-search-preifx 配置即为修改默认搜索方式. 要打开本地文件用 file:// 开头或者 M-x eww-open-file .

另外配合 ace-link 等能很方便的切换以 ace-jump 的方式定位和跳转链接, 如下图 eww2.gif 中使用 ace-link-eww 以后, 按 l 即可跳转到文章”ace-jump-mode高效移动光标”.


理解 eww 的工作方式

eww 是基于另外一个项目 shr.el 构建的, 当然也依赖 libxml2 库, 自己编译 Emacs 的时候注意相关选项.

eww 支持 cookie 的, 它的一些网络操作走的是 url.el , 更多功能可以参考 url package . eww 针对图片也有特殊处理, 可以设置 shr-max-image-proportion 定义图片显示尺寸以及 shr-blocked-images 屏蔽部分图片等.

需要设置代理服务器的也是走 url.el 的方式, 可以设置不代理的规则等, 基本用法如下:

(setq url-proxy-services '(("no_proxy" . "work\\.com")
                       ("http" . "proxy.somedomain.com:8888")))

url-cookie-list 命令可以列出来 Emacs 保存的 cookie 列表, 定义在 url-cookie.el 中, 其中还有定义 url-cookie-retrieve 等函数, elisp 程序获得可以类似这样 (url-cookie-retrieve "" "/") 的用法. cookie 实际保存在变量 url-cookie-file 对应的文件, 大概内容如下:

(setq url-cookie-storage
  [url-cookie "httponly" nil "28-Apr-2015 15:33:47.00 GMT" "/" ".weibo.cn" nil]
  [url-cookie "_T_WM" "XXXXXXXXXXXXXX" "28-Apr-2015 15:33:47.00 GMT" "/" ".weibo.cn" nil])
  [url-cookie "cookie_id" "142355712384279893" "10-Feb-2016 08:32:03.00 GMT" "/" "" nil]))

另外根据查找的资料, eww 支持 html 表单的文件上传, 各种平台的体验情况未知, 参考 http://lists.gnu.org/archive/html/bug-gnu-emacs/2013-12/msg01389.html

eww 的使用场景

有些 Emacs 爱好者习惯用 gnus 等在 Emacs 里收邮件, 可以配合 eww 去查看 html 邮件.

用来访问一些比较简单的网站比如 hackernews 等效果都还可以, 另外一些编程语言的手册等基本还是可以用 eww 来查看.

对一些纯文本格式比如 org/markdown 转化成 html 的预览效果一般也还能接受. 涉及自动刷新等, 也有人在摸索了, 具体可以参考 How do I auto-refresh eww pages?


原文首发 Hick 的 blog  http://blog.hickwu.com/posts/338 , 转载请注明出处

GD Star Rating
Emacs内置浏览器EWW, 8.9 out of 10 based on 29 ratings 标签:eww, w3m


分类: w3m, 中级, 初级
  1. 2016年4月7日21:17 | #1

    “Four Christmases” (2008), 6 p.m. Nov. 27, TBS. louis vuitton outlet online Some commenters are less than thrilled with the staff’s cakedecorating skills, but largely the online public agrees that a cake is about taste buds, not artful taste. d oakley glasses
    “I’m just glad in the end it all worked out. oakley sunglasses Three times the game was tied up.
    That mentality paid off for Hunter on Tuesday againstAtlanta. After burying his first shot at the end of the first quarter,the ex-Georgia State star found a rhythm, earning 20 minutes off the bench and cashing in jumper after jumper. He notched just two assists, but for a Celtics team that ranks 21st in 3-point percentage at 31.9 percent, his long-range shooting — and the space it provides — wasenough of a contribution. http://www.coachhandbags.com.co San Benito also were effective with Sabbatini and Villegas pounding balls from the outside. y michael kors outlet
    On to the trade show floor and a succession of short seminars on various topics: styles of selling sponsorships, expanding food branding and fan engagement through social media. coach factory outlet store “Dave Pipal was a former DA and county counsel and they contracted with our firm to bridge the gap as they were looking to hire their county counsel.
    f In other action Tuesday, the council: cheap ray bans “It costs about $700 and leaves a lot of holes in the car,” Simpson said in an email. michael kors handbags
    The Company is also developing AIR001, a sodium nitrite solution for inhalation via nebulization, for the treatment of heart failure with preserved ejection fraction (HFpEF) michael kors outlet online Then Curry hit another 3-pointer. http://www.michaelkorsoutletbuy.us.com
    Meanwhile, the club has greater needs at positions like offensive line, linebacker and even receiver, despite the signing of Marvin Jones. louis vuitton outlet Monday from the WalMart Home Office, 702 S. h michael kors outlet
    Given the Timing of Pearson s Return, Valeant to Reschedule Call to Discuss Preliminary Fourth Quarter 2015 Financial Results, Deliver Business Review and Provide Updated Expectations for 2016 louis vuitton handbags The median sales price for condos and townhomes increased to $142,000 from $123,900.
    Unforgiving?demise?While his works are brimming with playful humour, there’s an undeniable melancholy that pervades each one. oakley outlet Trump was seeking to assert his influence with the state’s white, workingclass voters, as was Sanders, underscoring the candidates’ overlapping populist appeal.
    The bird couldn’t fly but was trying to hop across the road to get up an embankment. coach outlet store online LOS ANGELES Jason Kokrak sensed something special was about to happen, and he could point to his name atop the leaderboard as evidence Friday in the Northern Trust Open.
    NOTICE AND PROCEDURE FOR MAKING CLAIMS OF COPYRIGHT OR INTELLECTUAL PROPERTY INFRINGEMENT Yahoo respects the intellectual property of others, and we ask our users to do the same. coach handbags Nobody who has worked with Beard is surprised by his success.
    n Bernie Sanders (D-VT) says that Republican presidential candidate Donald Trump will be defeated because love trumps hatred coach outlet online The question will live in their soul.
    Korea fires missiles, liquidates South assetsAFP TrendingDaisy Ridley Hits Back at Body Shamers: I Will Not Apologize for How I Look ETonlineThis Site is SO Addicting!Thank you for your feedbackWe ll review and make changes needed. michael kors outlet online In any case, it is not through fighting terrorism that we can expect to achieve the stabilization of Libya, he said. i ray ban glasses
    Category: Analytical Excellence?? Winner: Saudi Telecom? Project: Transformation from Product-Oriented to Customer-Centric Marketing oakley sunglasses According to the Centers for Disease Control and Prevention (CDC), Body lice are known to transmit disease (epidemic typhus, trench fever, and epidemic relapsing fever).
    q Avila said Tigers reliever Alex Wilson will remain in the team’s bullpen for the foreseeable future. Despite several glaring openings that need to be filled in the rotation, Avila said the Tigers have no plans of removing Wilson from the bullpen. Tigers manager Brad Ausmus said the idea was discussed briefly last season. Wilson has a background of starting in the minors, making 68 starts in Boston’s farm system before being converted to a reliever at Triple-A Pawtucket in 2011. http://www.michaelkorshandbagstrade.us.com Both parties signed it on Sept. n
    This took me a bit to get used to, and I missed the built-in hand rest of the traditional shift lever, but in all I think it looks nice, works well and streamlines the overall appearance of the interior ray ban glasses The decision to hire Eric Larkin, one of Arizona’s most accomplished wrestlers, a few years back was intended to bring a championship mentality to the program that was near extinction at one time because of a lack of numbers. ray ban glasses
    Jennifer Whittier-Krejmas and Anne M. Fifield to Charles E. Pierson Jr. and Luanne I. Pierson, Terrace Street, Parcel A, $3,500. http://www.cheapmichaelkorsbags.us.com The Arkansas Supreme Court ordered Maggio removed from office in September 2014 over unrelated problems, including online comments he made about a legally confidential adoption case involving actress Charlize Theron. s coach outlet
    For more information click here. coach factory outlet store Advent’s all about waiting and preparing ourselves to welcome Jesus, the Light of the world.
    Many hope that the pope’s message of peace and reconciliation can usher in a longer-term stability in a nation of 4.8 million. As part of his trip, the pope plans to visit a displacement camp where Christians have sought refuge. He also will venture into the capital’s Muslim enclave, known as PK5, to meet with community leaders and the displaced. michael kors outlet online In addition to the SEC honor, Bernal was also named MVP of the Shriners Hospitals for Children’s College Classic. m coach online store
    The two are marrying well this week as the world’s biggest, oldest indoor flower show is using inspiration and elements from U. cheap jordans “Everything you hear is created by me in real time, but it sounds like a full band.


  2. 2016年4月7日21:36 | #2

    The R-G’s Austin Meeks forsees an Holiday Bowl. coach outlet store online Except as required by applicable law Industrias Bachoco, S. x louis vuitton outlet online
    TELLURIDE, Colo. cheap oakleys emRecipe from Jolly TimeemDeconstructed GuacamoleYield: 8 servings1/2 baguette1 clove garlic1 ripe avocado, peeled, seeded and cut into 8 slicesSalt to taste1 1/2 tablespoons minced sweet onion4 grape tomatoes, halvedSlice baguette on the diagonal into 8 thin slices.
    Pamela Marie Hyman, Pamela Marie Williams and Pamela Hyman to Carleton J. MacGillivray and Brenda L. MacGillivray, Old County Road, $1,500. michael kors outlet The gallery features work by high schoolers. b michael kors outlet
    Now that Yang has been sentenced, the fossils will be returned to the Chinese government, Plantz said. coach handbags The day after the security message was sent out, an Italian company, Trevi, announced that it had and fix the dam for $300 million, but it won’t be easy.
    i Senate GOP leader Arlan Meekhof told House GOP Speaker Kevin Cotter the Senate Republicans were ready to help House Republicans in the next election by passing their version of a road fix. The one with the 3.3 cent gas tax hike, 40 percent car registration hike and $600 million out of the state’s checkbook. http://www.coachhandbags.com.co The majority. michael kors outlet
    Only 38 percent of Americans had a favorable opinion of China, while 44 percent of Chinese had a favorable opinion of the U. http://www.michaelkors.us.org But the task is not as huge as it otherwise would be. http://www.raybansunglasses.name
    Joseph A. Kurtz and Doreen M. Kurtz to James J. Nodwell Jr., 463 Route 20, $147,500. michael kors outlet store New this week: Community, Season 6; Hogan’s Heroes, Complete Series; Manhattan, Season 2; Rookie Blue, Season 6; Unbreakable Kimmy Schmidt, Season 1. q coach outlet online
    She also says that Better Homes and Gardens Real Estate’s , a luxury program for premier homes was also something that she liked about the company michael kors outlet online OF: Steve Selsky, Louisville Bats (Reds’ Triple-A affiliate)Selsky matched his career-high with a .
    I mean, how do you follow Robin Williams? It was horrible, but he did it on purpose — it was for a reason because he knew it would make me better. louis vuitton handbags On Monday, members of a legislative task force split over his proposal.
    Wildflower Walk, 8 a. coach outlet store 3B SAB: Stewart.
    The : New regime, new players, same low expectations?Has reconsidered his stance on the team’s new direction? In light of the Browns’ first few hours of free agency, he might want to. cheap jordan shoes China, too.
    d Marlins: LHP Wei-Yin Chen makes his first start since signing an $80 million, five-year deal with the Marlins when they host the Cardinals on Saturday coach outlet store online I paid the price.
    With all open you get shaded seating when there are no events. coach outlet store Spring ExhibitionMarch 10-April 17; Kunsthal Charlottenborg, Nyhavn 2, Cph K; 60kr; foraarsudstillingen. b ray ban sunglasses outlet
    America’s new bill is not expected to be unveiled before 2020, but the Bank of Canada said its new bank note will go into circulation sometime in 2018 http://www.louisvuittonhandbagsrack.us.com Take part in a three-course meal on Valentine’s Day at Local Bistro Arizona for $65 per person.
    g She s the definition of student-athlete, she s so book-oriented, so study-driven, he said. I almost chuckle now when people say she only came here for basketball. From Day 1, she embraced the entire culture of her new school. I love that about her. 锘?a href=http://www.michaelkors.us.org>michael kors outlet Arvest Bank biggest in state at yearend l
    Makes 4 parfaits coach outlet store online 9 percent from beyond the arc. michael kors outlet
    “From the perspective of how the economy has been performing overall in growing out of the prior severe recession, things are looking pretty good. The environment has stabilized and progress has been fairly impressive,” Fulton, director of U-M’s Research Seminar in Quantitative Economics, said in a statement. michael kors handbags Any suggestions on how? h michael kors bags
    The crowd parts as he walks leisurely through in his trademark black tux and black sunglasses, a wood shafted golf club over one shoulder. coach outlet “A year ago, the Blackhawks were down 3-1 to the Red Wings in the second round when they headed home for Game 5.
    Syrian refugees are largely barred from working legally and have to resort to informal, low-paying jobs if they can find employment at all. ray ban sunglasses outlet “Detention center surveillance footage appears to support portions of witnesses’ accounts but not the alleged sexual assault,” Woods added. z 锘?a href=http://www.michaelkors.us.org>michael kors outlet
    About Wounded Warrior ProjectThe mission of Wounded Warrior Project? (WWP) is to honor and empower Wounded Warriors. nfl jerseys Their NBA-record start ended after 24 wins when the Milwaukee Bucks beat them 108-95 on Saturday night.


  3. 2016年4月7日23:19 | #3

    Sgt. David Kempas, a spokesman, said a homeowner called 911 around 4:50 a.m. to report a prowler on his property. When officers arrived, they were directed to the chicken coop in the backyard, where they found a man lying in one of the nesting rooms. louis vuitton handbags Mauricio Ernest Salquero, 47, of 2305 S. r louis vuitton outlet
    EAGLES SPEAK WITH BILLS LB, PER REPORT ray ban sunglasses He is optimistic about his chances of playing, as he recovers from infections in his eyes, which forced him to retire in the Dubai semifinals last week.
    Dustin Lynch: Dec. 10, tba Oakdale Theater, Wallingford, Conn. cheap air jordans What is your client-to-advisor ratio? For high-income wealthy people, a comfortable ratio is 30:1. b michael kors handbags
    But some believe the oil rally may be overdone. michael kors outlet in a Pinnacles classroom learning about the California Condor and Pinnacles’ birds, geology, flora and fauna and history.
    t Veth Real Estate Inc., to Global Homes Properties LLC, 11-13 Raymond Place, $74,900. coach outlet Brunch customers have been betatesting Jones’ new funnel cake, topped with confectioners’ sugar and on a chocolatesauce bed, reminiscent in many ways of the beignet recipe on which it’s based. michael kors outlet online
    LAMAR’S BREAKOUT http://www.louisvuittonbagsbuy.us.com The Pima College product has played sound defense in the outfield, maintaining a 1. http://www.coachhandbags.com.co
    The facility provides women’s health services, including abortions, and has long been the site of regular anti-abortion protests. A Roman Catholic priest who has held weekly Mass in front of the clinic for 20 years said Dear wasn’t part of his group. louis vuitton outlet online If you do, it may save the relationship unless you want to continue being the girlfriend of the class clown. f coach outlet
    Why do donors continue to contribute millions of dollars to institutions that have become indoctrination centers, tearing down America, stifling dissent and turning group against group? michael kors outlet online Plus there are just a few days to get the message out.
    The maximum amount of public funding available this year is $96 million. michael kors outlet Forrester says the truck will make its formal debut no later than its first scheduled event, at the Suicide Prevention Conference at National Park College in Hot Springs, 11 a.
    Cohn has worked with multiple producers throughout her career, but for her most recent release, Heartstrings Touching Ground,?she had help from Grammy Award-winning producer, . michael kors outlet online Once the girls were nearly 3 years old, he began looking for work again and landed a job last September.
    But Koerber-Walker said the Ebola situation is not comparable to what the legislation would accomplish, and she said correlation does not necessarily mean causation. http://www.michaelkorsbags.me ” This was all wishful thinking, of course.
    v us with the subject line “Downton Abbey Tea. michael kors outlet online Anything goes.
    They can mail it to us. michael kors outlet “I will be a worker and a fighter,” she said. a coach handbags
    Update: Citing a miscommunication, a Penn State spokesperson said Wednesday evening that Schnaars would only be assured of participation in passing drills, not the testing portion of the Nittany Lions’ pro day. http://www.coachstoresonline.com ” View photo.
    k One of those cut-off communities was Manning, the county seat of Clarendon County, about 60 miles southeast of Columbia. http://www.louisvuittonhandbagsrack.us.com Vertical: 32in h
    Eating fruits and vegetables that are high in fiber and lower in calories mean you can eat more volume without becoming more “voluminous. louis vuitton outlet Besides the care act, discussion topics include the state’s Medicaid system the Arizona Health Care Cost Containment System, Medicare, the health insurance marketplace and accountable care organizations. coach factory outlet
    It’s at this point that the ordering got chaotic. Trying to get a normal restaurant meal in a drive-thru setting is an exercise in logistical mental gymnastics. I scrambled to replace the items I’d meant to order with stuff that was actually on the menu. coach outlet store online As the Greeks realized, they look better when they’re moving at full fire. n coach outlet online
    INDIANAPOLIS (AP) (AP) Brionna Jones had 17 points and 11 rebounds to lead No. louis vuitton outlet The Muscular Dystrophy Association leased 3,600 square feet at 1627 W.
    – Ben Waterhouse michael kors outlet store Walker and official Madam C. b michael kors outlet
    “The most important thing is that creativity or quality of performance should never be judged on the basis of color, or ethnicity, or physical likeness. coach outlet River Road.


  4. 2017年6月10日18:17 | #4

    I not to mention my guys appeared to be going through the best helpful tips from your web blog and so instantly developed a terrible suspicion I had not expressed respect to the web site owner for those strategies. All the boys had been consequently happy to learn all of them and have in effect unquestionably been making the most of them. Appreciation for turning out to be simply kind and also for obtaining varieties of beneficial subjects most people are really desirous to discover. Our own sincere regret for not expressing gratitude to you sooner.


  5. 2017年6月20日00:07 | #5

    Nike Redskins 10 Robert Griffin III White With
    80TH Patch Mens Stitched NFL Elite Jersey.Collect 34 Thomas
    Rawls Jersey online cheapest and free Nike Packers
    12 Aaron Rodgers White Mens Stitched NFL Game Jersey give to you,
    free shipping arrive oversea.


  6. 2017年8月10日05:48 | #6

    Hi blogger i see you don’t earn on your blog. You can earn additional
    $$$ easily, search on youtube for: how to earn selling articles


  7. 2017年8月22日21:30 | #7

    Attractive part of content. I just stumbled upon your weblog
    and in accession capital to say that I get actually loved account
    your blog posts. Any way I’ll be subscribing
    to your augment and even I success you get entry to consistently quickly.


  8. 2017年8月30日21:16 | #8

    Valuable info. Lucky me I discovered your
    website by chance, and I’m shocked why this twist of fate
    didn’t happened earlier! I bookmarked it.


  9. 2018年2月23日22:15 | #9

    Bij een alles in 1 pakket vergelijken kwam je normaliter alléén Ziggo tegen als kabel provider voor web diensten.


  10. 2018年3月25日23:32 | #10

    It’s actually a great and useful piece of info. I am satisfied that yoou just shareed this helpful info woth us.
    Please stay us up to date like this. Thank you for sharing.


  1. 本文目前尚无任何 trackbacks 和 pingbacks.
:wink: :-| :-x :twisted: :) 8-O :( :roll: :-P :oops: :-o :mrgreen: :lol: :idea: :-D :evil: :cry: 8) :arrow: :-? :?: :!: