Skip to content

Latest commit

 

History

History
470 lines (352 loc) · 16.2 KB

TODO.org

File metadata and controls

470 lines (352 loc) · 16.2 KB

TODO

Tasks

Error when M-w on one line (sometimes)

Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
  indicate-copied-region()
  #<subr kill-ring-save>(455056 455119 nil)
  apply(#<subr kill-ring-save> (455056 455119))
  kill-ring-save(455056 455119)
  funcall-interactively(kill-ring-save 455056 455119)
  command-execute(kill-ring-save)

Les chiffres sont des positions dans mon buffer…

Test, then add leuven-remove-matching-lines-between-buffers

(defun leuven-remove-matching-lines-between-buffers (buffer-a buffer-b)
  "Remove lines from BUFFER-A that match any lines in BUFFER-B."
  (interactive "bBuffer A: \nbBuffer B: ")
  (with-current-buffer buffer-a
    (let ((patterns (with-current-buffer buffer-b
                      (sort (split-string (buffer-string) "\n")))))
      (goto-char (point-min))
      (while (not (eobp))
        (let ((line (buffer-substring (line-beginning-position) (line-end-position))))
          (when (member line patterns)
            (delete-region (line-beginning-position) (line-end-position))
            (beginning-of-line))))
        (forward-line)))))

See delete-matching-lines…

Install Emacs packages that can integrate an online task manager with an Org mode file

There are several Emacs packages available that can integrate an online task manager with an Org mode file. Here are a few options:

Org-capture-Web
This package allows you to capture tasks and notes from your web browser and save them to an Org mode file. It supports popular online task managers like Trello, Asana, and JIRA.
Orgzly
This is an Android app that can sync with your Org mode files and online task managers like Todoist, Trello, and Google Tasks. You can use it to manage your tasks on the go and then sync them back to your Emacs setup.
Org-sync-trello
This package lets you synchronize your Trello boards with your Org mode files. It supports bidirectional syncing, so changes made in either Trello or Emacs will be reflected in both places.
Orgzit
This is a web-based task manager that integrates with Org mode via a REST API. You can use it to create and manage tasks, and then sync them to your Org mode files using Emacs.
org-sync-jira
This package lets you sync your JIRA issues with your Org mode files. You can create, update, and close JIRA issues directly from Emacs, and changes made in either JIRA or Emacs will be synced bidirectionally.
org-web-tools
This package provides a collection of functions for interacting with web-based services, including online task managers. It includes functions for capturing tasks, creating links to tasks, and syncing tasks with Org mode files.
org-web-tools-trello
This package extends org-web-tools to support Trello specifically. It provides functions for capturing Trello cards as Org mode tasks, syncing Trello cards with Org mode files, and more.
org-roam-server
This package provides a web interface for browsing and editing your Org mode files, including tasks and notes. You can use it to access your Org mode files from anywhere with an internet connection, making it easy to integrate with online task managers.
org-protocol-capture-html
This package allows you to capture web pages as Org mode tasks, including tasks for online task managers. It works by sending the web page content to Emacs using the org-protocol mechanism.
org-todoist
This package provides an interface to the Todoist API, allowing you to create, update, and delete tasks in your Todoist account directly from Emacs.
org-sync-todoist
This package lets you sync your Todoist tasks with your Org mode files. It supports bidirectional syncing, so changes made in either Todoist or Emacs will be reflected in both places.

These packages offer a range of features and integrations with different online task managers, so you may find that one or more of them is a good fit for your needs.

SDAY Add YASnippets

:date
19/05/2023
tod
19/05/2023
:now
It’s {{mytime}}
email
Hey ,\n\n\n\nBest regards,\nFabrice
ty
Thank you for reaching out!
tom
Are you available tomorrow?
meet2h
Are you available at 11:42 PM? (= now + 2h)
:sig1
All the best, Fabrice
:br
Best Regards,\nFabrice
:ch
Cheers ;)
:log
Could you please print the output of ‘espanso log’ here?
:espanso
Hi there!
:sor
I’m sorry you experienced this problem
:ip
{{output of curl ‘https://api.ipify.org’}}
:localip
{{output of ip a | grep ‘inet 192’ | awk ‘{ print $2 }’}}
:contact
Hi,\nThank you for contacting us!\nBest regards,\nThe Support Team
???
Thank you for your email and for bringing this to our attention
???
I am sorry that you’re disappointed with our product
???
Could you please let me know what specific issues you’ve encountered?
???
Looking forward to hearing from you
???
All the best
???
Espanso Support Team
???

See others at https://espanso.org/.

Install format-all for Emacs

https://github.com/emacsmirror/format-all

Add Imenu regexp for AXVW files

Check out features of IntelliJ IDEA

https://www.jetbrains.com/help/idea/2016.1/intellij-idea-editor.html (bookmarks, breakpoints, syntax highlighting, code completion, zooming, folding code blocks, macros, highlighted TODO items, code analysis, intention actions, intelligent and fast navigation, etc.)

How does package-autoremove decide which packages to remove?

http://emacs.stackexchange.com/questions/18253/how-does-package-autoremove-decide-which-packages-to-remove

Port old advices to Emacs 24.4+

https://www.gnu.org/software/emacs/manual/html_node/elisp/Porting-old-advices.html#Porting-old-advices

Publish doc of Emacs-Leuven

Use my Org html theme!

Others did already:

Or put in on RTD:

Use the bug hunter

The Bug Hunter https://travis-ci.org/Malabarba/elisp-bug-hunter.svg?branch=master

Automatically debug and bisect your init (.emacs) file!

(progn (find-file "~/test.java")
       (require 'helm-imenu)
       (helm-imenu)
       nil)

Check out other configs

https://alhassy.github.io/init/

Re: Goto last edit location – explanation provided!!! (from l. david andersson)

[2015-06-24 Wed 18:53]

From Email from l. david andersson: Re: Goto last edit location –

Error in post-command-hook (hl-tags-update): (void-function sgml-get-context)

Ouvrir client-bldgops-cost-report.axvw au démarrage d’Emacs…

Improve writing of time-substract

(let ((time (current-time)))
  (org-id-find "zangwill.nick_2014:aesthetic.judgment")
  (format "%ss" (time-to-seconds (time-subtract (current-time) time))))

Profile code performance

In case this helps anyone, I’ve found this code makes profiling a lot easier. It automatically instruments the desired functions, runs the code you want to test, removes the instrumentation, and presents the results.

(defmacro profile-org (times &rest body)
  `(let (output)
     (dolist (p '("org-"))            ; Symbol prefixes to instrument.
       (elp-instrument-package p))
     (dotimes (x ,times)
       ,@body)
     (elp-results)
     (elp-restore-all)
     (point-min)
     (forward-line 20)
     (delete-region (point) (point-max))
     (setq output (buffer-substring-no-properties (point-min) (point-max)))
     (kill-buffer)
     (delete-window)
     output))

;; Used like this:
(profile-org 10
  (org-table-next-field)
  (org-table-align))

Update setcdr assoc constructs

(setcdr (assoc value alist) new-value)

works pretty well (but you’ll probably need to add a not-found check).

In Emacs 25:

(setf (alist-get key alist) new-value)

even without not-found checking.

Improve documentation of navigation and search

Excellent example: http://www.jetbrains.com/resharper/features/navigation_search.html

Other: https://support.rstudio.com/hc/en-us/articles/200710523

Automate reporting of style errors

Report all errors with:

(checkdoc-current-buffer t)
  • Format the documentation string so that it fits in an Emacs window on an 80-column screen. It is a good idea for most lines to be no wider than 60 characters. The first line should not be wider than 67 characters or it will look bad in the output of apropos.

    You can fill the text if that looks good. However, rather than blindly filling the entire documentation string, you can often make it much more readable by choosing certain line breaks with care. Use blank lines between topics if the documentation string is long.

  • Do not indent subsequent lines of a documentation string so that the text is lined up in the source code with the text of the first line. This looks nice in the source code, but looks bizarre when users view the documentation.

    Remember that the indentation before the starting double-quote is not part of the string!

Optimize startup time

Context

Identify what parts of your .emacs take so long. You can do this e.g. by starting Emacs with emacs -q, set up your load-path, and then evaluate

(benchmark-run
  (require 'some-package))

The first number appearing in the echo area will be the time needed to run that command.

Use autoloads, which delay the loading of the complete package until one of the interactive functions is used.

If you want to set options which need to be evaluated after a package is loaded, you can use eval-after-load.

With (eval-after-load "pkg-autoloads" ...), you make sure that you only run code when the package is installed/available through package.el.

Timings from my system

After much optimization…

$ time emacs -f kill-emacs real 0m0.157s user 0m0.140s sys 0m0.012s $ time emacs -q -f kill-emacs real 0m0.137s user 0m0.116s sys 0m0.016s $ time emacs -Q -f kill-emacs real 0m0.051s user 0m0.028s sys 0m0.020s

time emacs -f kill-emacs 2>&1
time emacs -q -f kill-emacs 2>&1
time emacs -Q -f kill-emacs 2>&1

Note that your first test is going to be dramatically slower than subsequent tests.

Add emphasis + font-lock for ‘alert’

;; Add 'alert' emphasis. The text enclosed by '!' will be displayed in bold
;; and red to indicate emphasis.
(add-to-list 'org-emphasis-alist
             '("!" (bold :foreground "red")))

See custom emphasis in org-emphasis-alist

Emacs Key Bindings for Atom Editor

https://github.com/dvorka/atom-editor-emacs-key-bindings

Notes

Learning GNU Emacs

Yes, there is. It’s called Learning Gnu Emacs and is published by O’Reilly press. Worth every cent if you’re serious about Emacs.

Dribble file in Emacs

The precise commands we need to type to reproduce the bug. If at all possible, give a full recipe for an Emacs started with the `-Q’ option (*note Initial Options::). This bypasses your `.emacs’ customizations.

One way to record the input to Emacs precisely is to write a dribble file. To start the file, execute the Lisp expression

(open-dribble-file “~/dribble”)

using `M-:’ or from the `*scratch*’ buffer just after starting Emacs. From then on, Emacs copies all your input to the specified dribble file until the Emacs process is killed.

Why Emacs?

Personally, my first love with Emacs was when someone showed M-q to me and the most uglily indented text aligned nicely between the margins.

Emacs replace by upcase version

You can force a matched regex text pattern to upper case by entering C-M-% your_regexp RET \,(upcase \num_of_match).

A better Java mode for Emacs

https://github.com/espenhw/malabar-mode

Gnu.emacs.bug: Always reply by email! (from Glenn Morris)

[2013-01-27 Sun 20:54]

From Email from Glenn Morris: bug#13546: 24.2.92; Error(s) w

Execute R, LaTeX, JavaScript, etc. online!

See http://www.compileonline.com/.

Even with the Emacs editor!!

Colors (Emacs theme)

http://www.colorhexa.com/

How do I use emacsclient to connect to a remote emacs instance?

https://emacs.stackexchange.com/questions/371/how-do-i-use-emacsclient-to-connect-to-a-remote-emacs-instance