如何实现「把一段文字每隔一个字就隐藏一个字」?(内容有改动)

能正确分割子句,然后pred那里改一下函数就好了

我用 overlay 实现 elfeed 只显示当前行的标题

(bind-key "b"
          (lambda ()
            (interactive)
            (my/overlay-show)
            (elfeed-search-browse-url)
            (my/overlay-screen)
            )
          elfeed-search-mode-map)

(bind-key "n"
          (lambda ()
            (interactive)
            (my/overlay-show)
            (next-line)
            (my/overlay-screen)
            )
          elfeed-search-mode-map)

(bind-key "p"
          (lambda ()
            (interactive)
            (my/overlay-show)
            (previous-line)
            (my/overlay-screen)
            )
          elfeed-search-mode-map)

(defun my/overlay-line ()
  (interactive)
  (let ((begin (line-beginning-position))
        (end (line-end-position))
        ov
        (background (face-attribute 'default :background)))
    (defface my-overlay-default-face
      `((t (:background ,background  :foreground ,background)))
      "My Overlay default face")
    (setq ov (make-overlay begin end))
    (overlay-put ov 'face 'my-overlay-default-face)))

(defun my/overlay-screen ()
  (interactive)
  (let ((line-number (line-number-at-pos))
        (begin (window-start))
        (end (save-excursion
               (goto-char (window-end))
               (forward-line 2)
               (point))))
    (save-excursion
      (goto-char begin)
      (while (< (point) end)
        (unless (eq line-number (line-number-at-pos))
          (my/overlay-line))
        (forward-line 1)))))

(defun my/overlay-show ()
  (interactive)
  (let ((lst (overlay-lists)))
    (mapc #'delete-overlay (car lst))
    (mapc #'delete-overlay (cdr lst))))