There debugging calls got left in..
Signed-off-by: NeilBrown <neil@brown.name>
def handle_attach(self, key, focus, **a):
"handle:K:CC:C-A"
p = focus.call("PopupTile", "2", "", ret='pane')
- edlib.LOG(p)
if not p:
return edlib.Efail
p['prompt'] = "Attachment"
p['pane-title'] = "Attachment File"
p = p.call("attach-history", "*Attachment History*", "popup:close",
ret='pane')
- edlib.LOG("now", p)
p.call("attach-file-entry", "file")
return 1
def handle_do_attach(self, key, focus, str1, str2, **a):
"handle:compose-email:attach"
- edlib.LOG("attaching", str1)
if not str1:
return 1
if str2:
(type, encoding) = mimetypes.guess_type(str1, False)
if not type:
type = "application/octet-stream"
- edlib.LOG("type=", type)
f, l = self.vmarks(self.view)
m = edlib.Mark(orig=l)
self.call("doc:set-ref", 0, m)
def handle_next(self, key, focus, mark, **a):
"handle-list/K:A-p/K:Prior"
# Find previous diff hunk
- edlib.LOG("prev")
try:
focus.call("text-search", 0, 1, "^([^-+]|$)", mark)
focus.call("text-search", 0, 1, "^[-+]", mark)
except edlib.commandfailed:
- edlib.LOG("failed")
pass
return 1
while b:
r += b
b = os.read(self.pipe.stdout.fileno(), 4096)
- edlib.LOG("read", len(r))
except IOError:
return 1
if r is None or len(r) == 0:
set_tag = ""
if tag:
set_tag = "/usr/bin/notmuch %s;" % tag
- edlib.LOG(set_tag)
m['email:sendmail'] = set_tag + "/usr/bin/notmuch insert --folder=sent --create-folder -new -unread +outbox"
# NOTE this cannot be in ThisPane, else the pane we want to copy
# content from will disappear.
# Might be the first part of a multi-path alternative,
# look earlier in the path
i -= 1
- edlib.LOG("consider", p, i, )
if p[i].startswith("alternative:"):
# this is one of several - can we handle it?
group = ','.join(p[:i])
comm2("cb", focus, val)
return 1
return edlib.Efalse
- edlib.LOG(key, str)
if key == "result":
self.result = str
if key == "hex-result" or key == "oct-result":
"handle:Commit"
p = focus
while p != p.parent:
- edlib.LOG(p == self, p)
p = p.parent
par = self
- edlib.LOG("try", par, par.parent);
p = PresenterPane(par.parent)
if p:
p.call("attach-viewer")