Skip to main content

Questions tagged [arguments]

"arguments" refer to those inputs to a function or program which are configurable by the caller, potentially differing on each call. Every argument is an input, but not every input is an argument -- for instance, a stream of data from a mouse could be an input and not an argument.

Filter by
Sorted by
Tagged with
2 votes
2 answers
374 views

How to handle arguments in an efficient and flexible way?

PRE-FACE Avid libre computing and copyleft supporter, Long year GNU Emacs mainstream user, just surpassing the point where GNU Emacs becomes play dough, essentially by starting to learn eLisp. Before ...
starquake's user avatar
  • 107
0 votes
3 answers
63 views

Function with DEEP parameter that in body of other function gets list of the arguments of its ancestor functions

I need a function with DEEP parameter that if it is placed in the body of another function returns the list of the arguments of the ancestor function depending on DEEP parameter. If DEEP = 0 returns ...
Mitu Gabriel's user avatar
0 votes
1 answer
68 views

Passing arguments to functions invoked via a keymap?

Is it possible to have multiple keymap entries set up to call the same interactive function, but with different arguments associated with each mapping? For example, suppose I have this function ... ...
HippoMan's user avatar
  • 656
0 votes
1 answer
105 views

pass arguments in call-process as key/value

I try to run a command which takes some arguments and requires to pass some attributes to the API. I understand that call-process takes args as strings but any invocation complains about wrong-type-...
b10n1k's user avatar
  • 101
0 votes
1 answer
180 views

Using ignore function with a more appropriate name

I want to use the function ignore but I want a more meaningful name when using its functionality of not doing anything. Would like to make a function that takes the same argument possibilities as ...
Dilna's user avatar
  • 1,465
0 votes
1 answer
40 views

Printing an alist to a specific buffer

I have the following code to print an alist. But I now want to recode this in a way that one can specify the buffer used for display. In addition, I would like that whether on not to erase the ...
Dilna's user avatar
  • 1,465
1 vote
1 answer
379 views

How do I pass an optional argument to a command called programmatically?

I would like to call a certain command from Emacs Lisp. This function takes two arguments plus a third optional argument. This third argument, when non-nil, doesn't ask for confirmation. I would like ...
Pablo's user avatar
  • 359
0 votes
1 answer
95 views

Fetch necessary function call arguments in Emacs

I started writing code in Emacs some days ago and i'm doing very well, however, a very difficult and boring situation is always annoying me, that is the moment of call a function written by me. To ...
Rômulo peres de moraes's user avatar
0 votes
1 answer
142 views

Changing value of a function argument

Have been playing with the following function (defun ignition (featr actm) "TODO." (when (eq 'sweep featr) (setq featr 'icomplt)) (message "%S" featr)) Calling the ...
Dilna's user avatar
  • 1,465
0 votes
1 answer
242 views

How to call a interactive function with prompt from a lambda?

I have this little LaTeX helper function: (defun my--insert-chord (chord) "Prompt for a CHORD and insert it at point. TODO: make it agnostic to the package used." (interactive "...
Alessandro Bertulli's user avatar
0 votes
2 answers
118 views

How to write a function that handles its argument [closed]

I would like to implement a sensible strategy for handling optional arguments. In this instance, I want the function to be as for a function like abbrev-mode (although not in the context of a minor ...
Dilna's user avatar
  • 1,465
0 votes
1 answer
24 views

Passing numeric value to a function

I have got the following function but want to pass a numeric mode even if completing-read asks for a string. (defun mycompany (mode) "Enables or disables company text completion in buffer."...
Dilna's user avatar
  • 1,465
0 votes
3 answers
66 views

Handling empty function optional argument [duplicate]

This function starts a new named shell buffer. How can I handle the case where bufrnm set by interactive in empty? (defun galaxy-shell (&optional bufrnm) "TODO" (interactive "...
Dilna's user avatar
  • 1,465
0 votes
1 answer
60 views

Handling optional arguments

This function makes a new named buffer that can run shell commands. But it only works properly when no argument is passed. When an argument is passed or set through the interactive clause, I would ...
Dilna's user avatar
  • 1,465
0 votes
2 answers
57 views

Checking optional function argument

If I have an optional function argument, how can I determine if name has been supplied. And if it has been supplied, how can I test its validity (not nil or not empty string). (defun myfunc (&...
Dilna's user avatar
  • 1,465

15 30 50 per page