Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makes termux-emacs dead #23

Closed
bokuno opened this issue May 16, 2018 · 4 comments
Closed

Makes termux-emacs dead #23

bokuno opened this issue May 16, 2018 · 4 comments

Comments

@bokuno
Copy link

bokuno commented May 16, 2018

When used in termux's Emacs, I saw the Android System load was growing high. Then my phone got frozen, I had to restart my phone.

@TatriX
Copy link
Owner

TatriX commented May 16, 2018

Sorry, I don't think I can help you with that as I'm only using Emacs on desktop.

@seagle0128
Copy link

OMGD, using Emacs on phone???!!!

@mcrosson
Copy link

mcrosson commented Aug 14, 2024

I just setup pomidor inside termux to see if this issue still applies. I'm not seeing any indications it's an active problem and the issue can likely be closed.

I'm testing with cli emacs 29.4 and termux 0.118.1 (per termux-info). The cpu use and memory use (per top) are within norms that I've seen prior to setting up pomidor. Nothing unexpected or out of line for my emacs config inside termux.

I'm using the below config for pomidor and my full emacs config with pomidor setup is available here.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; pomidor
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(use-package pomidor
  :bind (("C-w P" . pomidor))
  :config (setq pomidor-update-interval 30
                pomidor-save-session-file "~/org/pomidor-sessions.json"
                pomidor-alert nil
                pomidor-sound-tick nil
                pomidor-sound-tack nil
                pomidor-sound-overwork nil
                pomidor-sound-break-over nil)
  :hook (pomidor-mode . (lambda ()
                          (display-line-numbers-mode -1) ; Emacs 26.1+
                          (setq left-fringe-width 0 right-fringe-width 0)
                          (setq left-margin-width 2 right-margin-width 0)
                          ;; force fringe update
                          (set-window-buffer nil (current-buffer)))))

; setup 6 pomodoros for 8 hr work day
; 7 hours of work, with 1 hr of long breaks
; each pomodor is:
;   warm up of 15 mins
;   work of 45 mins
;   total work period: 60 mins
;   10 min break
;   total interval period: 70 mins
; long break is 30 mins
;   every 3rd pomodoro give 30 minute break

(setq pomidor-seconds (* 60 60)) ; total work period
(setq pomidor-warmup-seconds (* 15 60)) ; warmup time
(setq pomidor-break-seconds (* 10 60))
(setq pomidor-breaks-before-long 3)
(setq pomidor-long-break-seconds (* 30 60))

(defun my-pomidor-update-hook ()
  (let* ((state (pomidor--current-state))
         (total (pomidor--total-duration state))
         (ellapsed (round (time-to-seconds total))))
      (if (<= ellapsed pomidor-warmup-seconds)
        (setq pomidor-header-separator " 🌡️↑ ")
        (setq pomidor-header-separator "")
      )
  )
)
(add-hook 'pomidor-update-hook #'my-pomidor-update-hook)

; pop win pomidor setup
;   main way to invoke
;   ensure pomidor is running before trying to open the buffer
;   use global buffer name for pomidor
;   make the popwin window 'sticky'
;   position sticky popwin @ top
(push '(pomidor-mode :position top :stick t) popwin:special-display-config)
(global-set-key (kbd "C-w p")
  (lambda () (interactive)
    ; make sure pomidor is running + active w/o resetting the current state
    (when (or (not (boundp 'pomidor-buffer-name))
              (not (get-buffer pomidor-buffer-name)))
      (pomidor)
      (previous-buffer) ; pomidor switches buffers -- go back to orig buffer
    )
    ; open pomidor in popwin
    (popwin:display-buffer (get-buffer pomidor-buffer-name))
  )
)

@TatriX
Copy link
Owner

TatriX commented Aug 16, 2024

@mcrosson thank you for the report!

@TatriX TatriX closed this as completed Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants