* bug#19663: 24.4: eww.el delete entry from history list
@ 2015-01-23 15:57 Boruch Baum
2015-01-25 2:48 ` Lars Ingebrigtsen
0 siblings, 1 reply; 6+ messages in thread
From: Boruch Baum @ 2015-01-23 15:57 UTC (permalink / raw)
To: 19663
[-- Attachment #1: Type: text/plain, Size: 1498 bytes --]
I found it desirable to be able to delete entries from the history list.
Following is the code that seems to work for me:
(defun eww-history-delete-entry ()
"Delete an entry from the eww history list"
(interactive)
(cond
((equal (buffer-name) "*eww history*")
(setq
current-point (point)
current-line (- (line-number-at-pos (point-max))
(line-number-at-pos)))
(with-current-buffer "*eww*"
(setq eww-history (append
(butlast eww-history current-line)
(last eww-history (1- current-line))))
eww-history-position
(min eww-history-position (1- current-line))
(eww-list-histories)
(goto-char current-point)))
((equal (buffer-name) "*eww*")
(setq
current-entry (- (length eww-history)
eww-history-position)
eww-history (append
(butlast eww-history current-entry)
(last eww-history (1- current-entry))))
(when (eq current-entry 1)
(setq eww-history-position (1- eww-history-position))\
)
(eww-restore-history
(elt eww-history eww-history-position))
(when (get-buffer "*eww history*")
(eww-list-histories)))
(t
(user-error "Current buffer is neither the eww buffer, \
nor the eww history buffer"))))
--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#19663: 24.4: eww.el delete entry from history list
2015-01-23 15:57 bug#19663: 24.4: eww.el delete entry from history list Boruch Baum
@ 2015-01-25 2:48 ` Lars Ingebrigtsen
2015-01-25 7:15 ` Boruch Baum
0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2015-01-25 2:48 UTC (permalink / raw)
To: Boruch Baum; +Cc: 19663
Boruch Baum <boruch_baum@gmx.com> writes:
> I found it desirable to be able to delete entries from the history list.
This might be nice for debugging purposes, but I don't really see the
need as a user command. Closing.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#19663: 24.4: eww.el delete entry from history list
2015-01-25 2:48 ` Lars Ingebrigtsen
@ 2015-01-25 7:15 ` Boruch Baum
2015-01-26 1:57 ` Lars Ingebrigtsen
0 siblings, 1 reply; 6+ messages in thread
From: Boruch Baum @ 2015-01-25 7:15 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 19663
[-- Attachment #1: Type: text/plain, Size: 635 bytes --]
On 01/24/2015 09:48 PM, Lars Ingebrigtsen wrote:
> Boruch Baum <boruch_baum@gmx.com> writes:
>
>> I found it desirable to be able to delete entries from the history list.
>
> This might be nice for debugging purposes, but I don't really see the
> need as a user command. Closing.
>
Please reconsider. The use case (my use case) is someone downlaoding
many pages for offline reading. Once offline, I browse the history list
for whatever I want to read first. Once a page is read, I delete it from
the history list. very useful for me.
--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#19663: 24.4: eww.el delete entry from history list
2015-01-25 7:15 ` Boruch Baum
@ 2015-01-26 1:57 ` Lars Ingebrigtsen
2015-01-26 6:24 ` Boruch Baum
0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2015-01-26 1:57 UTC (permalink / raw)
To: Boruch Baum; +Cc: 19663
Boruch Baum <boruch_baum@gmx.com> writes:
> On 01/24/2015 09:48 PM, Lars Ingebrigtsen wrote:
>> Boruch Baum <boruch_baum@gmx.com> writes:
>>
>>> I found it desirable to be able to delete entries from the history list.
>>
>> This might be nice for debugging purposes, but I don't really see the
>> need as a user command. Closing.
>>
> Please reconsider. The use case (my use case) is someone downlaoding
> many pages for offline reading. Once offline, I browse the history list
> for whatever I want to read first. Once a page is read, I delete it from
> the history list. very useful for me.
Well, in that case you can just `C-x C-q' to make the buffer
non-read-only, and then kill off the lines you've read with `C-k', I
think?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#19663: 24.4: eww.el delete entry from history list
2015-01-26 1:57 ` Lars Ingebrigtsen
@ 2015-01-26 6:24 ` Boruch Baum
2015-01-26 6:38 ` Lars Ingebrigtsen
0 siblings, 1 reply; 6+ messages in thread
From: Boruch Baum @ 2015-01-26 6:24 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 19663
[-- Attachment #1: Type: text/plain, Size: 1055 bytes --]
On 01/25/2015 08:57 PM, Lars Ingebrigtsen wrote:
> Boruch Baum <boruch_baum@gmx.com> writes:
>
>> On 01/24/2015 09:48 PM, Lars Ingebrigtsen wrote:
>>> Boruch Baum <boruch_baum@gmx.com> writes:
>>>
>>>> I found it desirable to be able to delete entries from the history list.
>>>
>>> This might be nice for debugging purposes, but I don't really see the
>>> need as a user command. Closing.
>>>
>> Please reconsider. The use case (my use case) is someone downlaoding
>> many pages for offline reading. Once offline, I browse the history list
>> for whatever I want to read first. Once a page is read, I delete it from
>> the history list. very useful for me.
>
> Well, in that case you can just `C-x C-q' to make the buffer
> non-read-only, and then kill off the lines you've read with `C-k', I
> think?
>
That won't work in that the next time one presses H from the eww buffer
(eww-list-histories), any entries deleted with c-k will re-appear.
--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#19663: 24.4: eww.el delete entry from history list
2015-01-26 6:24 ` Boruch Baum
@ 2015-01-26 6:38 ` Lars Ingebrigtsen
0 siblings, 0 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2015-01-26 6:38 UTC (permalink / raw)
To: Boruch Baum; +Cc: 19663
Boruch Baum <boruch_baum@gmx.com> writes:
> That won't work in that the next time one presses H from the eww buffer
> (eww-list-histories), any entries deleted with c-k will re-appear.
Well, don't do that. >"? Or rename the history buffer so that a new
one will be created.
Using separate eww buffers instead of using the history (for offline
use) may also be simpler.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-01-26 6:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-23 15:57 bug#19663: 24.4: eww.el delete entry from history list Boruch Baum
2015-01-25 2:48 ` Lars Ingebrigtsen
2015-01-25 7:15 ` Boruch Baum
2015-01-26 1:57 ` Lars Ingebrigtsen
2015-01-26 6:24 ` Boruch Baum
2015-01-26 6:38 ` Lars Ingebrigtsen
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).