X-Git-Url: http://christophe.rhodes.io/gitweb/?p=iplayer-el.git;a=blobdiff_plain;f=iplayer.el;h=388a58ef3d29654799f442a70998dbd36a891347;hp=cb61f3b5bf4db81d8e37e63c9b9dfc45ceb368fe;hb=HEAD;hpb=9868c8ed623fb6c9d8b5ce1da431535bf7396762 diff --git a/iplayer.el b/iplayer.el index cb61f3b..388a58e 100644 --- a/iplayer.el +++ b/iplayer.el @@ -1,10 +1,11 @@ ;;; iplayer.el --- Browse and download BBC TV/radio shows -;; Copyright (C) 2012-2014 Christophe Rhodes +;; Copyright (C) 2012-2015 Christophe Rhodes ;; Author: Christophe Rhodes +;; URL: https://github.com/csrhodes/iplayer-el ;; Version: 0.1 -;; Keywords: multimedia +;; Keywords: multimedia, bbc ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -226,17 +227,20 @@ The presets are defined in the variable `iplayer-presets'." (state (process-get process 'iplayer-state)) (progress (process-get process 'iplayer-progress))) (with-current-buffer (get-buffer-create "*iplayer-progress*") - (goto-char (point-min)) - (let ((found (re-search-forward (format "^%s:" id) nil 'end))) - (unless found - (unless (= (point) (progn (forward-line 0) (point))) - (goto-char (point-max)) - (newline))) - (forward-line 0) - (let ((beg (point))) - (end-of-line) - (delete-region beg (point))) - (insert (format "%s: %s %s%%" id state progress)))))) + (special-mode) + (save-excursion + (goto-char (point-min)) + (let ((found (re-search-forward (format "^%s:" id) nil 'end)) + (inhibit-read-only t)) + (unless found + (unless (= (point) (progn (forward-line 0) (point))) + (goto-char (point-max)) + (newline))) + (forward-line 0) + (let ((beg (point))) + (end-of-line) + (delete-region beg (point))) + (insert (format "%s: %s %s%%" id state progress))))))) (defun iplayer-download-process-filter (process string) (catch 'no-progress