@@ -166,6 +166,11 @@ functions, especially `ebib-get-field-value' and
166
166
:group 'ebib-reading-list
167
167
:type 'hook )
168
168
169
+ (defcustom ebib-reading-list-update-index nil
170
+ " Whether or not index is updated on reading list changes."
171
+ :group 'ebib-reading-list
172
+ :type 'boolean )
173
+
169
174
(defun ebib--reading-list-buffer ()
170
175
" Return the buffer containing the reading list.
171
176
If the file has not been opened yet, open it, creating it if
@@ -208,6 +213,9 @@ return nil."
208
213
(insert (ebib--reading-list-fill-template key db))
209
214
(run-hooks 'ebib-reading-list-new-item-hook )
210
215
(save-buffer )
216
+ (when ebib-reading-list-update-index
217
+ (ebib-db-set-current-entry-key (ebib--get-key-at-point) ebib--cur-db)
218
+ (ebib--update-index-buffer))
211
219
key)))
212
220
213
221
(defun ebib--reading-list-remove-item (key )
@@ -221,6 +229,9 @@ do nothing and return nil."
221
229
(funcall ebib-reading-list-remove-item-function)
222
230
(run-hooks 'ebib-reading-list-remove-item-hook )
223
231
(save-buffer )
232
+ (when ebib-reading-list-update-index
233
+ (ebib-db-set-current-entry-key (ebib--get-key-at-point) ebib--cur-db)
234
+ (ebib--update-index-buffer))
224
235
key))))
225
236
226
237
(defun ebib--reading-list-fill-template (key db )
0 commit comments