* [sup-devel] [issue54] Log-mode and poll-mode buffers should not be killable
@ 2010-01-27 22:47 Tero Tilus
2010-01-28 2:48 ` [sup-devel] [PATCH] [issue54] log-mode and poll-mode buffers are not killable Eric Sherman
2010-01-28 14:07 ` [sup-devel] [PATCHv2] " Eric Sherman
0 siblings, 2 replies; 4+ messages in thread
From: Tero Tilus @ 2010-01-27 22:47 UTC (permalink / raw)
To: sup-devel
New submission from Tero Tilus <tero@tilus.net>:
[ this is a copy from <http://masanjin.net/sup-bugs/issue4> ]
As a related point, can I make it so that the log-mode and poll-mode buffers
aren't killable with 'x'? I get in the habit of pressing 'x', and occasionally
forget that when I'm viewing one of those buffers, I need to press 'I' instead.
----------
messages: 129
nosy: terotil
priority: feature request
ruby_version: any
status: unread
sup_version: 0.10
title: Log-mode and poll-mode buffers should not be killable
_________________________________________
Sup issue tracker <sup-bugs@masanjin.net>
<http://masanjin.net/sup-bugs/issue54>
_________________________________________
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [sup-devel] [PATCH] [issue54] log-mode and poll-mode buffers are not killable
2010-01-27 22:47 [sup-devel] [issue54] Log-mode and poll-mode buffers should not be killable Tero Tilus
@ 2010-01-28 2:48 ` Eric Sherman
2010-01-28 13:46 ` Eric Sherman
2010-01-28 14:07 ` [sup-devel] [PATCHv2] " Eric Sherman
1 sibling, 1 reply; 4+ messages in thread
From: Eric Sherman @ 2010-01-28 2:48 UTC (permalink / raw)
To: sup-devel
---
lib/sup/modes/log-mode.rb | 2 ++
lib/sup/modes/poll-mode.rb | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/lib/sup/modes/log-mode.rb b/lib/sup/modes/log-mode.rb
index de320ce..e583caf 100644
--- a/lib/sup/modes/log-mode.rb
+++ b/lib/sup/modes/log-mode.rb
@@ -52,6 +52,8 @@ class LogMode < TextMode
self.text = ""
super
end
+
+ def killable?; false; end
end
end
diff --git a/lib/sup/modes/poll-mode.rb b/lib/sup/modes/poll-mode.rb
index cf61343..deb22d6 100644
--- a/lib/sup/modes/poll-mode.rb
+++ b/lib/sup/modes/poll-mode.rb
@@ -14,6 +14,8 @@ class PollMode < LogMode
self << "Poll started at #{Time.now}\n"
PollManager.do_poll { |s| self << (s + "\n") }
end
+
+ def killable?; false; end
end
end
--
1.6.6
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [sup-devel] [PATCH] [issue54] log-mode and poll-mode buffers are not killable
2010-01-28 2:48 ` [sup-devel] [PATCH] [issue54] log-mode and poll-mode buffers are not killable Eric Sherman
@ 2010-01-28 13:46 ` Eric Sherman
0 siblings, 0 replies; 4+ messages in thread
From: Eric Sherman @ 2010-01-28 13:46 UTC (permalink / raw)
To: sup-devel
That doesn't quite work, as sup won't quit. Another patch on its way.
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [sup-devel] [PATCHv2] [issue54] log-mode and poll-mode buffers are not killable
2010-01-27 22:47 [sup-devel] [issue54] Log-mode and poll-mode buffers should not be killable Tero Tilus
2010-01-28 2:48 ` [sup-devel] [PATCH] [issue54] log-mode and poll-mode buffers are not killable Eric Sherman
@ 2010-01-28 14:07 ` Eric Sherman
1 sibling, 0 replies; 4+ messages in thread
From: Eric Sherman @ 2010-01-28 14:07 UTC (permalink / raw)
To: sup-devel
Oops. Now, with the ability to quit sup.
---
lib/sup/buffer.rb | 4 ++--
lib/sup/modes/log-mode.rb | 2 ++
lib/sup/modes/poll-mode.rb | 2 ++
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb
index 990dd4a..5fb1047 100644
--- a/lib/sup/buffer.rb
+++ b/lib/sup/buffer.rb
@@ -414,8 +414,8 @@ EOS
def kill_all_buffers_safely
until @buffers.empty?
- ## inbox mode always claims it's unkillable. we'll ignore it.
- return false unless @buffers.last.mode.is_a?(InboxMode) || @buffers.last.mode.killable?
+ ## inbox, log and poll modes always claim they're unkillable. we'll ignore them.
+ return false unless @buffers.last.mode.is_a?(InboxMode) || @buffers.last.mode.is_a?(LogMode) || @buffers.last.mode.is_a?(PollMode) || @buffers.last.mode.killable?
kill_buffer @buffers.last
end
true
diff --git a/lib/sup/modes/log-mode.rb b/lib/sup/modes/log-mode.rb
index de320ce..e583caf 100644
--- a/lib/sup/modes/log-mode.rb
+++ b/lib/sup/modes/log-mode.rb
@@ -52,6 +52,8 @@ class LogMode < TextMode
self.text = ""
super
end
+
+ def killable?; false; end
end
end
diff --git a/lib/sup/modes/poll-mode.rb b/lib/sup/modes/poll-mode.rb
index cf61343..deb22d6 100644
--- a/lib/sup/modes/poll-mode.rb
+++ b/lib/sup/modes/poll-mode.rb
@@ -14,6 +14,8 @@ class PollMode < LogMode
self << "Poll started at #{Time.now}\n"
PollManager.do_poll { |s| self << (s + "\n") }
end
+
+ def killable?; false; end
end
end
--
1.6.6
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-01-28 14:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-27 22:47 [sup-devel] [issue54] Log-mode and poll-mode buffers should not be killable Tero Tilus
2010-01-28 2:48 ` [sup-devel] [PATCH] [issue54] log-mode and poll-mode buffers are not killable Eric Sherman
2010-01-28 13:46 ` Eric Sherman
2010-01-28 14:07 ` [sup-devel] [PATCHv2] " Eric Sherman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox