unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Pierre Neidhardt <ambrevar@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: emacs-devel@gnu.org
Subject: Re: EWW improvements: open in new buffer, tags, quickmarks, search engines, ...
Date: Mon, 16 Apr 2018 16:48:52 +0530	[thread overview]
Message-ID: <87wox7bdr7.fsf@gmail.com> (raw)
In-Reply-To: <87o9ij4e12.fsf@mouse.gnus.org>

[-- Attachment #1: Type: text/plain, Size: 5058 bytes --]


Lars Ingebrigtsen <larsi@gnus.org> writes:

>> - Enhances eww-next-url / eww-previous-url so that when there is no next /
>>   previous links, it tries to increment / decrement the last number in
>>   the last element of the URL.  ("do what you mean" style.)
>
> Hm...  Are there many web sites where that is meaningful?

Emacs (and all GNU) mailing list archives for a start! :)
Many websites use increments in URL while they forget the previous/next
hint.

>> - Change `eww-open-in-new-buffer' so that it queries for a URL instead
>>   of cloning the current buffer (which is not very useful in my
>>   opinion).
>
> That's not what it's supposed to do -- it opens the link under point in
> a new buffer.

Sorry, I meant when there is no link under point.
Right now there is no way to just open a new eww buffer.

>> - Make eww-update-header-line-format also update the buffer name so that
>>   it contains the page title.  _Very useful_ to browse / search *eww*
>>   buffers (think Ivy/Helm).
>
> Sounds nice, but also sounds like something not everybody would want, so
> it should have a configuration option to switch on/off (but can default
> to on).

Sure.

>> - Make `eww-add-bookmark' run a customizable function to decide when.
>>   to error out.  For instance, error out when a duplicate is detected
>>   with protocol stripped out (https://foo.bar is seen as a duplicate of
>>   http://foo.bar).
>
> Hm...  Doesn't really sound all that useful?  But having that command
> give feedback (and perhaps query the user about what to do) in that
> situation would be handy.

Why not useful?  `eww-add-bookmark' already does duplicate detection,
except that it's very dumb: it won't realize if two bookmarks are the
same up to the protocol.

The command would obviously explain what's wrong when erroring out.

>> - Bookmarks can have a mark which is a string saved under the key :mark.
>>   The mark should be unique.  It could be used like the "quickmark"
>>   function found in some browsers: use it to quickly load a
>>   bookmark. (Work in progress.)
>
> A mark in addition to a tag?  Sounds like a bit more than most users
> would want to invest in a bookmarking system, but I don't object.

Maybe I should have explained the overall bookmark logic beforehand :p

- "tags" are optional words used to categorize bookmarks, e.g. "cinema", "emacs",
  "books".  They can be used to filter & lookup bookmarks.

- "mark" serves two purposes: it allows to open a link with a simple
  keybinding (optional) + it serves as a prefix for search engines (in
  which case it's no longer optional).  For example, say github has mark
  "gh", then

		M-x eww RET gh

  opens github, so does `C-c e g h' if `C-c e' is quickmark prefix key.
  If github comes with a search engine `:search "/search?q=%s", then

		M-x eww RET gh foobar

  opens a github search query of "foobar".

The point of centralizing search engines, quickmarks and bookmarks is
that it makes it easier to configure and, most importantly, it allows
for searching for all URLs at the same spot (name the bookmarks).

>> - Bookmarks can have a search engine which is either appended to the
>>   bookmark' URL if it does not start with "https?://", or used as-is
>>   otherwise.
>>   The search engine is stored as a string under the key :search.
>>   A "%s" must be present in the search engine string as a place-holder
>>   for the query.
>
> Hm.  Sounds more complicated than users will want to do to me.

See my previous comment.

I think this is actually simpler that adding search engine support with
seperate functions and variables.  With my suggestion we re-use the
current implementation without adding any new variable / function.

>> - Make `eww-bookmark-prepare' only load  bookmarks from file if not
>>   already set.  This makes it possible to display a custom / narrowed
>>   list of bookmarks in the bookmark buffer.
>
> I don't quite follow...  What about just adding narrowing and sorting to
> that mode?

We could also do, but that does not compose as well as my suggestion.
For instance, how would you filter bookmarks by tags?
Narrowind and sorting would not be enough.

>> - Make `eww--dwim-expand-url' follow a different logic to bind it all together:
>>
>>   - With a multi-word query, if first word is a mark of a bookmark with a search engine,
>>   then use the said search engine over the rest of the query.
>>
>>   - With a single word query, if first word is a mark then open the
>>     corresponding bookmark.
>>
>>   - Else query the default search engine.
>
> Sounds confusing.  :-)  But also quite DWIM, which I like.

The description is, but in practice it's crystal clear and always does
what you want.

> Sounds great to me.  :-)  Make each thing into a patch (with
> documentation) and let the apply-to-Emacs-fest commence.  That is, if
> you've been through the assign-copyright-to-the-FSF-process.  I don't
> see you in the copyright.list file, but that's apparently out of date
> these days...

I am assigned to Emms, does it count?

--
Pierre Neidhardt


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  reply	other threads:[~2018-04-16 11:18 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-16 10:26 EWW improvements: open in new buffer, tags, quickmarks, search engines, Pierre Neidhardt
2018-04-16 10:54 ` Lars Ingebrigtsen
2018-04-16 11:18   ` Pierre Neidhardt [this message]
2018-04-16 12:08     ` Lars Ingebrigtsen
2018-04-16 12:22       ` Pierre Neidhardt
2018-04-16 12:27         ` Lars Ingebrigtsen
2018-04-16 12:32         ` Lars Ingebrigtsen
2018-04-16 17:55           ` Eli Zaretskii
2018-04-17 11:18 ` Charles A. Roelli
2018-04-17 19:18   ` Pierre Neidhardt
2018-04-24  5:56     ` Pierre Neidhardt
2018-04-24 14:50       ` Lars Ingebrigtsen
2018-04-24 17:57         ` The importance of secrecy (was: EWW improvements: open in new buffer, tags, quickmarks, search engines, ...) Stefan Monnier
2018-04-24 19:45           ` The importance of secrecy John Wiegley
2018-04-24 20:16           ` The importance of secrecy (was: EWW improvements: open in new buffer, tags, quickmarks, search engines, ...) Joost Kremers
2018-04-24 20:53             ` The importance of secrecy Stefan Monnier
2018-04-24 22:40             ` Lars Ingebrigtsen
2018-04-24 22:44               ` Stefan Monnier
2018-04-24 15:58       ` EWW improvements: open in new buffer, tags, quickmarks, search engines, T.V Raman
2018-04-25  6:48         ` Pierre Neidhardt
2018-04-25 15:25           ` T.V Raman
2018-04-25 16:25             ` Pierre Neidhardt
2018-04-25 23:36               ` T.V Raman
2018-04-26 12:46                 ` Stefan Monnier
2018-04-24 16:24       ` Drew Adams
2018-04-25  7:00         ` Pierre Neidhardt
2018-04-25 12:30           ` Lars Ingebrigtsen
2018-04-25 15:29           ` Drew Adams
2018-05-03  6:52             ` Pierre Neidhardt
2018-05-03  6:54             ` Pierre Neidhardt
2018-05-03 15:12               ` Drew Adams
2018-04-24 16:49       ` Eli Zaretskii
2018-04-25  6:32         ` Pierre Neidhardt
2018-04-25 15:55           ` Eli Zaretskii
2018-04-25 16:13             ` Pierre Neidhardt
2018-04-25 16:19               ` Eli Zaretskii
2018-04-17 19:01 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wox7bdr7.fsf@gmail.com \
    --to=ambrevar@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).