public
Description: Emacs interface to Ditz issue tracking system.
Homepage: http://github.com/kentaro/emacs-ditz/
Clone URL: git://github.com/kentaro/emacs-ditz.git
Search Repo:
Show prompt to set issue dir after failing to find dir in auto-finding 
mode.
kentaro (author)
Fri Apr 11 06:19:56 -0700 2008
commit  d63f9d1d0a7d62c8e10b5bc8eff770fde183ab63
tree    f02b9b62e89be238d72d3b30b039bea367a30753
parent  032e202acf83aec23348561c3378761fb69b2b21
0
...
32
33
34
35
36
 
 
37
38
39
...
32
33
34
 
 
35
36
37
38
39
0
@@ -32,8 +32,8 @@ system. You can get Ditz from http://ditz.rubyforge.org/.
0
   ;; Issue directory name (default: "bugs")
0
   (setq ditz-issue-directory "issues")
0
 
0
- ;; Enable automatic finding functionality.
0
- (setq ditz-find-issue-directory-automatically-flag t))
0
+ ;; Enable automatic finding functionality (default: nil)
0
+ (setq ditz-find-issue-directory-automatically-flag t)
0
 
0
 (5) Run M-x ditz-init to initialize your ditz issues.
0
 
...
159
160
161
162
163
164
165
166
167
168
 
169
170
171
...
182
183
184
185
186
187
188
189
190
...
204
205
206
 
207
208
 
 
 
 
 
 
 
209
210
211
212
213
214
215
216
217
218
219
220
221
222
 
 
 
 
 
 
 
 
 
 
 
223
224
225
226
227
228
 
 
 
 
229
230
 
 
231
232
233
...
159
160
161
 
 
 
 
 
 
 
162
163
164
165
...
176
177
178
 
 
 
179
180
181
...
195
196
197
198
199
 
200
201
202
203
204
205
206
207
208
209
 
 
 
 
 
 
 
 
 
 
 
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
 
232
233
234
235
236
0
@@ -159,13 +159,7 @@ must set it from minibuffer."
0
 (defun ditz-call-process (command &optional arg popup-flag)
0
   "Call ditz process asynchronously according with sub-commands."
0
   (let* ((buffer (get-buffer-create (concat "*ditz-" command "*")))
0
- (proc (get-buffer-process buffer))
0
- (current-directory))
0
-
0
- ;; Reserve current directory to come back later It's needed when
0
- ;; automatically finding directory.
0
- (when buffer-file-name
0
- (setq current-directory (file-name-directory (buffer-file-name))))
0
+ (proc (get-buffer-process buffer)))
0
 
0
     (if (and proc (eq (process-status proc) 'run))
0
         (when (y-or-n-p (format "A %s process is running; kill it?"
0
@@ -182,9 +176,6 @@ must set it from minibuffer."
0
                            buffer shell-file-name nil shell-command-switch
0
                            (ditz-build-command command arg))
0
 
0
- (when current-directory
0
- (setq default-directory current-directory))
0
-
0
     (cond ((or (eq major-mode 'ditz-mode)
0
                (string= popup-flag "switch"))
0
            (switch-to-buffer buffer))
0
@@ -204,30 +195,42 @@ must set it from minibuffer."
0
             (goto-char (point-min)))))))))
0
 
0
 (defvar ditz-last-visited-issue-directory nil)
0
+
0
 (defun ditz-build-command (command arg)
0
- (let (issue-directory)
0
+ (let (issue-directory current-directory)
0
+
0
+ ;; Reserve current directory to come back later It's needed when
0
+ ;; automatically finding directory.
0
+ (when buffer-file-name
0
+ (setq current-directory (file-name-directory (buffer-file-name))))
0
+
0
     (cond ((eq major-mode 'ditz-mode)
0
            (setq issue-directory ditz-last-visited-issue-directory))
0
           ((and (not (string= command "init"))
0
- ditz-find-issue-directory-automatically-flag)
0
- (catch 'loop
0
- (while t
0
- (cond ((file-exists-p ditz-issue-directory)
0
- (setq issue-directory
0
- (concat default-directory ditz-issue-directory))
0
- (throw 'loop t))
0
- ((string= "/" default-directory)
0
- (throw 'loop nil))
0
- (t
0
- (cd ".."))))))
0
+ ditz-find-issue-directory-automatically-flag
0
+ (catch 'loop
0
+ (while t
0
+ (cond ((file-exists-p ditz-issue-directory)
0
+ (throw 'loop t))
0
+ ((string= "/" default-directory)
0
+ (throw 'loop nil))
0
+ (t
0
+ (cd ".."))))))
0
+ (setq issue-directory
0
+ (concat default-directory ditz-issue-directory)))
0
           (t
0
            (setq issue-directory
0
                  (read-file-name "Issue dir: "
0
                                  (or ditz-last-visited-issue-directory
0
                                      default-directory)))))
0
 
0
+ ;; Restore default directory if needed.
0
+ (when current-directory
0
+ (setq default-directory current-directory))
0
+
0
     (setq ditz-last-visited-issue-directory issue-directory)
0
- (mapconcat 'identity (list ditz-program command arg "-i" issue-directory) " ")))
0
+ (mapconcat 'identity
0
+ (list ditz-program command arg "-i" issue-directory) " ")))
0
 
0
 ;; Hooks
0
 (defvar ditz-mode-hook nil
...
193
194
195
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
197
198
...
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
0
@@ -193,6 +193,26 @@
0
     
0
   </tr>
0
 
0
+ <tr>
0
+ <td class="issuestatus_closed">
0
+ closed: fixed
0
+ </td>
0
+ <td class="issuename">
0
+ <a href="issue-89b4dd9e965eeceef261869d99a6a0f138668e3d.html">Show prompt to set issue dir after failing to find dir in auto-finding mode.</a>
0
+ (bug)
0
+ </td>
0
+
0
+ <td class="issuerelease">
0
+
0
+
0
+ in <a href="release-0.4.html">release 0.4</a>
0
+ (released)
0
+
0
+ </td>
0
+
0
+
0
+ </tr>
0
+
0
 </table>
0
 
0
 
...
17
18
19
 
 
20
21
22
...
17
18
19
20
21
22
23
24
0
@@ -17,6 +17,8 @@
0
 
0
   <ul>
0
   
0
+ <li><a href="release-0.4.html">Release 0.4</a>, released 2008-04-11. </li>
0
+
0
     <li><a href="release-0.3.html">Release 0.3</a>, released 2008-04-11. </li>
0
   
0
     <li><a href="release-0.2.html">Release 0.2</a>, released 2008-04-10. </li>
...
44
45
46
 
 
 
 
 
 
 
 
 
 
 
 
 
...
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
0
@@ -44,3 +44,16 @@ releases:
0
     - Kentaro Kuribayashi <kentarok@gmail.com>
0
     - released
0
     - release 0.3
0
+- !ditz.rubyforge.org,2008-03-06/release
0
+ name: "0.4"
0
+ status: :released
0
+ release_time: 2008-04-11 13:18:54.902624 Z
0
+ log_events:
0
+ - - 2008-04-11 12:12:15.794477 Z
0
+ - Kentaro Kuribayashi <kentarok@gmail.com>
0
+ - created
0
+ - ""
0
+ - - 2008-04-11 13:18:54.902658 Z
0
+ - Kentaro Kuribayashi <kentarok@gmail.com>
0
+ - released
0
+ - release 0.4

Comments

    No one has commented yet.