Bugs to be fixed
----------------
+- [ ] I cannot dup a mark in a mark:moving handler. That is too
+ restrictive. I need a different way to decide that incoming marks
+ get notified.
+- [ ] when map-attr returns text to be inserted, check for '<' and
+ double them
+- [ ] when w3m text is copied we get the markup. I find this useful,
+ but is it *right*??
- [ ] notmuch: don't mark up links in text created by w3m - they are
already marked if needed.
- [X] notmuch: "reply" should clear unread/new flags.
search to get confused. What should we do?
Don't redefine doc:char. Enable mark-moving notification on point
and on 'refresh' move to appropriate end of a marker if on one
-- [ ] use mark-moving on point to step over "quoted lines"
+- [X] use mark-moving on point to step over "quoted lines"
- [X] why doesn't doc-to-text auto-load - because only attach-
autoloads. I need a complete redesign of autoload
- [ ] use mimetypes.guess_type() to interpret filenames in email attachments??
self.qview = focus.call("doc:add-view", self) - 1
self.extra_headers = False
+ self.point = focus.call("doc:point", ret='mark')
+ self.prev_point = None
+ self.have_prev = False
+ self.call("doc:request:mark:moving")
choose = {}
m = edlib.Mark(focus)
focus.call("Display:external-viewer", url)
return 1
+ def handle_moving(self, key, focus, mark, mark2, **a):
+ "handle:mark:moving"
+ if mark == self.point and not self.have_prev:
+ # We cannot dup because that triggers a recursive notification
+ #self.prev_point = mark.dup()
+ self.prev_point = self.vmark_at_or_before(self.qview, mark)
+ self.have_prev = True
+ self.damaged(edlib.DAMAGED_VIEW)
+ return 1
+
+ def handle_review(self, key, focus, **a):
+ "handle:Refresh:view"
+ # if point is in a "quoted line" section that is hidden,
+ # Move it to start or end opposite prev_point
+ if not self.have_prev:
+ return 1
+ m = self.vmark_at_or_before(self.qview, self.point)
+ if m and m != self.point and m['quote-length'] and m['quote-hidden'] == "yes":
+ if not self.prev_point or self.prev_point < self.point:
+ # moving toward end of file
+ m = m.next()
+ if self.point != m:
+ self.point.to_mark(m)
+ self.prev_point = None
+ self.have_prev = False
+ return 1
+
def notmuch_doc(key, home, focus, comm2, **a):
# Create the root notmuch document
nm = notmuch_main(home)