Coder Social home page Coder Social logo

Comments (18)

leungbk avatar leungbk commented on August 30, 2024 1

@spegoraro I'd be willing to take over the project if you've too little time on your hands.

from org-alert.

spegoraro avatar spegoraro commented on August 30, 2024

Hi, thanks for reporting. I haven't been able to replicate the issue but please try master now. I have merged #16 from @PierreTechoueyres which re-builds the agenda if a buffer exists so it may resolve what you're seeing.

from org-alert.

chase-dwelle avatar chase-dwelle commented on August 30, 2024

I can confirm that this is also happening for me using org-alert-20180523.1833 from MELPA.

from org-alert.

PierreTechoueyres avatar PierreTechoueyres commented on August 30, 2024

Hi @chase-dwelle,
Could you try with redefining org-alert-check like bellow:

(defun org-alert-check ()
  "Check for active, due deadlines and initiate notifications."
  (interactive)
  ;; avoid interrupting current command.
  (unless (minibufferp)
    (let ((org-agenda-saved-buffer (and org-agenda-buffer (buffer-name org-agenda-buffer))))
      (save-window-excursion
	(save-excursion
          (save-restriction
            (let ((active (org-alert--filter-active (org-alert--get-headlines))))
              (dolist (dl (org-alert--strip-states active))
		(alert dl :title org-alert-notification-title))))))
      (when org-agenda-saved-buffer
	(ignore-errors
    	  (with-current-buffer org-agenda-saved-buffer
    	    (org-agenda-redo t)))))))

If this correct your problem, I'll propose a new PR to fix this.

from org-alert.

chase-dwelle avatar chase-dwelle commented on August 30, 2024

That works but opens a new org-agenda buffer called *temp*, with the agenda functionality intact.

from org-alert.

PierreTechoueyres avatar PierreTechoueyres commented on August 30, 2024

I can't reproduce the creation of *temp* buffer.
How do you open the agenda buffer ? What's your version of org mode and Emacs ?

from org-alert.

chase-dwelle avatar chase-dwelle commented on August 30, 2024

Ah, the *temp* buffer is only created when I'm in one of my custom agenda layouts. The solution works for the "standard" org-agenda.

from org-alert.

PierreTechoueyres avatar PierreTechoueyres commented on August 30, 2024

Could you try the version bellow:

(defun org-alert-check ()
  "Check for active, due deadlines and initiate notifications."
  (interactive)
  ;; avoid interrupting current command.
  (unless (minibufferp)
    (let ((org-agenda-saved-buffer (and org-agenda-buffer (buffer-name org-agenda-buffer))))
      (save-window-excursion
	(save-excursion
          (save-restriction
            (let ((active (org-alert--filter-active (org-alert--get-headlines))))
              (dolist (dl (org-alert--strip-states active))
		(alert dl :title org-alert-notification-title))))))
      (when org-agenda-saved-buffer
	(ignore-errors
    	  (with-current-buffer org-agenda-saved-buffer
    	    (org-agenda-redo-all t)))))))

from org-alert.

chase-dwelle avatar chase-dwelle commented on August 30, 2024

Still get the same behavior, duplicating the agenda into a *temp* buffer, unfortunately.

from org-alert.

PierreTechoueyres avatar PierreTechoueyres commented on August 30, 2024

And this one ?

(defun org-alert-check ()
  "Check for active, due deadlines and initiate notifications."
  (interactive)
  ;; avoid interrupting current command.
  (unless (minibufferp)
    (let ((org-agenda-saved-buffer (and org-agenda-buffer (buffer-name org-agenda-buffer))))
      (save-window-excursion
	(save-excursion
          (save-restriction
            (let ((active (org-alert--filter-active (org-alert--get-headlines))))
              (dolist (dl (org-alert--strip-states active))
		(alert dl :title org-alert-notification-title))))))
      (when org-agenda-saved-buffer
	(ignore-errors
    	  (with-current-buffer org-agenda-saved-buffer
    	    (let ((org-agenda-this-buffer-name org-agenda-this-buffer-name))
	      (org-agenda-redo t))))))))

from org-alert.

chase-dwelle avatar chase-dwelle commented on August 30, 2024

Same thing. This is the custom view I'm using:

(setq org-agenda-custom-commands
      '(
        ;; Daily agenda perspectives
        ("d" . "Daily perspectives")    ;Label for daily perspectives.
        ("da" "Daily priority agenda"
         ((tags-todo "SCHEDULED<\"<+1d>\"&PRIORITY=\"A\"" ;Priority tasks available to do today
                     ((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
                      (org-agenda-overriding-header "High-priority unfinished tasks:")))
          (agenda "" ((org-agenda-span 'day)
                      (org-scheduled-delay-days -14)))
          (tags-todo "SCHEDULED<\"<+1d>\"" ;All tasks available today
                     ((org-agenda-skip-function '(or (org-agenda-skip-entry-if 'todo 'done)
                                                     (air-org-skip-subtree-if-priority ?A)))
                      (org-agenda-overriding-header "Available tasks:")))))))

from org-alert.

PierreTechoueyres avatar PierreTechoueyres commented on August 30, 2024

I think I won't be able to provide a better solution.
I think also that the right thing to do is to use the solution provided by @jakecoble in PR #17.

from org-alert.

jakecoble avatar jakecoble commented on August 30, 2024

@chase-dwelle What versions of Emacs and org are you using?

from org-alert.

chase-dwelle avatar chase-dwelle commented on August 30, 2024

I'm using Emacs 26.1 and org 9.1.13 from elpa.

from org-alert.

jakecoble avatar jakecoble commented on August 30, 2024

I think this deserves more attention, and I’ll look into it. As much as I like my solution, I don’t think we should merge a breaking change for a bug we haven’t been able to replicate yet.

@chase-dwelle For now, I suggest use my fork if it works around your problem (I’m currently running it successfully with Emacs 26 and org 9.)

from org-alert.

MCSH avatar MCSH commented on August 30, 2024

Did you found any solutions for the rename of the custom agenda buffer to *temp*? I don't mind not being the default name, but I would prefer something that I can find in the buffers, like *temp agenda* at least.

from org-alert.

spegoraro avatar spegoraro commented on August 30, 2024

Unfortunately I've had very little time to work on this project, if anybody would like to take over maintenance I'll happily send the repo over. Otherwise at best I can have a look next month.

from org-alert.

ntBre avatar ntBre commented on August 30, 2024

I think this should be taken care of after the restructuring from #17, but I will be happy to reopen it if not.

from org-alert.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.