From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from pcdesk.net (mail.pcdesk.net [70.58.191.25]) by hurricane.the-brannons.com (Postfix) with ESMTPS id D7427787DC for ; Sat, 22 Nov 2014 23:07:14 -0800 (PST) Message-ID: <5471874C.4020603@pcdesk.net> Date: Sat, 22 Nov 2014 23:05:48 -0800 From: Tyler Spivey User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: edbrowse-dev@lists.the-brannons.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: [Edbrowse-dev] bookmarks X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 07:07:15 -0000 I propose the following change. If using the A command on a page (not on a link), and the page has a title, use that as the auto-suggested bookmark name. Old: ref=s9_dnav_bw_ir12_s new: Amazon.com: Science Fiction - Science Fiction & Fantasy: Kindle Store I don't have git's email sender setup, so I'll just paste a patch here. I did notice one bug I do'nt know how to fix, though it might not matter much. If a link contains < > or &, they're not turned into < > and &. This also applies to the title. I'm not very familiar with the code, but this seems to work. I'll see how it works when I bookmark more. >>From 08d9dbd675aa77146c8f1f072a64929de8639a57 Mon Sep 17 00:00:00 2001 From: Tyler Spivey Date: Sat, 22 Nov 2014 22:57:43 -0800 Subject: [PATCH] Make A suggest title if it can Make the A command suggest the page title if it has one, if we're not on a link. --- src/buffers.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/buffers.c b/src/buffers.c index 540cb99..4799838 100644 --- a/src/buffers.c +++ b/src/buffers.c @@ -3479,7 +3479,9 @@ static char *showLinks(void) stringAndString(&a, &a_l, "\n"); - s = (char *)getDataURL(h); + s = cw->ft; + if (!s || !*s) + s = (char *)getDataURL(h); if (!s || !*s) s = h; t = s + strcspn(s, "\1?#"); -- 1.9.1