[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to activate hook for a specific buffer...?

From: Carlo Tambuatco
Subject: How to activate hook for a specific buffer...?
Date: Wed, 25 Apr 2018 15:48:34 -0400

I’ve got some setup code for my org mode in emacs: 

(defun org-summary-todo (n-done n-not-done)
  "Switch entry to DONE when all subentries are done, to TODO otherwise."
  (let (org-log-done org-log-states)   ; turn off logging
    (org-todo (if (= n-not-done 0) "DONE" "TODO"))))

(add-hook 'org-after-todo-statistics-hook 'org-summary-todo nil t)

that I want to run only in specific org buffers. I do not want to set this 
globally. I do not want to turn off
logging globally for all org buffers.

This code will set TODO entries in an org buffer to DONE when all children of 
the entry are DONE.

This snippet is taken directly from the org manual website:

I want this to apply only to certain org buffers and to have it apply to those 
certain buffers automatically 
whenever I open those buffers.

Do I place this code inside a #+STARTUP: tag, or inside some 



Is there a better way to do this? 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]