elisp

What does internal mean in function names in Emacs Lisp?

懵懂的女人 提交于 2019-12-10 13:27:46
问题 Some people use double dash to indicate that the function is subject to change: What does the double minus (--) convention in function names mean in Emacs Lisp Does including internal in function names mean similar things? Two examples where-is-internal internal-make-var-non-special The function where-is-internal has a detailed docstring and is mentioned in the manual as well. Is where-is-internal an exception? Is there a difference between having -internal as suffix and having internal- as

Org Agenda regexp search Categories

99封情书 提交于 2019-12-10 13:26:16
问题 I like to structure my org-mode projects using the :CATEGORY: property, however categories seem not to be recognised by org-agenda-filter-by-regexp (bound to = ). When viewing a rather large list of TODO items, it would be helpful to be able to narrow the list to matching categories. I know that I can use org-agenda-filter-by-category ( < ), but this command must be executed on the category entry. Is there a way to regexp filter the Org Agenda including categories? The function below performs

Emacs: can I change the name of a started process?

核能气质少年 提交于 2019-12-10 13:22:16
问题 I can use process-name to get the name of the process, but can I change the name after starting it? I looked in the manual, and even in the source and haven't found anything that seems like it would do this. 回答1: There's only one line in Emacs' process.c source file where p->name is set for a process p , and that is in the function make_process . All other functions just read that value, they never (re-)set it. So it seems the answer to your question is "no". You could, of course, try to

How to find which file provide(d) the feature in emacs elisp

我是研究僧i 提交于 2019-12-10 13:10:17
问题 Currently i am using the load-history variable to find the file from which a feature came from. suppose to find the file the feature gnus came from. I execute the following code in scratch buffer which prints filename and the symbols in separate lines consecutively. (dolist (var load-history) (princ (format "%s\n" (car var))) (princ (format "\t%s\n" (cdr var)))) and then search for "(provide . gnus)" and then move the point to the start of line(Ctrl+A). The file name in the previous line is

Stop loading emacs configuration file setting a break point

只愿长相守 提交于 2019-12-10 10:50:18
问题 I'm rewriting my Emacs' .init file and I'd like to be able to stop loading it at some specific points. It's like inserting a break point, but nothing to do with debugging. I've tried using 'throw' and 'catch' but that's not really what I'm looking for. Thanks 回答1: You can add (debug) at suitable places. That will open a debugger window, where you can hit c to continue and q to quit. 来源: https://stackoverflow.com/questions/24060841/stop-loading-emacs-configuration-file-setting-a-break-point

How to distinguish between different overlays at point

牧云@^-^@ 提交于 2019-12-10 10:33:48
问题 ORIGINAL QUESTION : I'm looking for some assistance, please, to distinguish between overlays that may exist at point. If the overlays-at point is made with the lawlist-red-face then do X . If the overlays-at point is made with calendar-holiday-marker , then do Y . The overlays are made with these two functions. (calendar-mark-visible-date (car holiday) lawlist-red-face) (calendar-mark-visible-date (car holiday) calendar-holiday-marker) EDIT (January 1, 2014): @Drew wrote a nice test for this

macro expansion: to quote the body forms or not?

蓝咒 提交于 2019-12-10 10:27:35
问题 I'm having a hard time understanding exactly how macro expansion works. What is the difference in how the elisp interpreter handles these two snippets of code? (defmacro foo (arg) (message "arg is: %s" arg)) (foo "bar") and: (defmacro foo (arg) `(message "arg is: %s" ,arg)) (foo "bar") 回答1: You example may be confusing because message both displays a message and returns it. strings (like "bar") are self-evaluating. Instructive Example (defconst zzz 123) (defmacro zzz1 (arg) `(insert (format

Waiting for comint-mode buffer

北战南征 提交于 2019-12-10 10:11:35
问题 I'm trying to open a background buffer with a comint erlang-shell, and once it's up, run a call a function in emacs (using distel to send it's binaries to the erlang node). ie: ... (let ((args (append (list "-sname" node-name "-pa") path))) (get-buffer-create buffer-name) (apply #'make-comint-in-buffer node-name buffer-name "erl" nil args) (erl-check-backend (make-node-name node-name)) ... The problem is that when I call distel, the node is not yet up (epmd has no registered names) so it

how to specify a property value of a variable in emacs lisp

≯℡__Kan透↙ 提交于 2019-12-10 10:04:41
问题 I use the following code in .emacs file to set default publish behavior. I put the org base directory in difference locations for difference computers: ;; define machine specific directories storing my org files (cond ((system-name-is-home) (setq org-dir "/data/org")) ((system-name-is-work) (setq org-dir "~/org"))) Thus I'd like to use a variable to specify :base-directory to org-dir instead of hard-coding it as "~/org" . How can I do that? (require 'org-publish) (setq org-publish-project

Generate unique random numbers in a loop

血红的双手。 提交于 2019-12-10 09:23:22
问题 OK, after few hours of insane debugging, I finally have this: (defmacro assoc-bind (bindings expression &rest body) (let* ((i (gensym)) (exp (gensym)) (abindings (let ((cursor bindings) result) (while cursor (push (caar cursor) result) (push (cdar cursor) result) (setq cursor (cdr cursor))) (setq result (nreverse result)) (cons (list i `(quote ,result)) (cons (list exp expression) result))))) `(let (,@abindings) (while ,i (set (car ,i) (caar ,exp)) (setq ,i (cdr ,i)) (set (car ,i) (cdar ,exp)